Re: Enabling Checksums - Mailing list pgsql-hackers
From | Daniel Farina |
---|---|
Subject | Re: Enabling Checksums |
Date | |
Msg-id | CAAZKuFZrK+pZeJZ+B6vsudT_j7YLdrGNUKmV2ZTmQTUtCtNKHg@mail.gmail.com Whole thread Raw |
In response to | Re: Enabling Checksums (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Responses |
Re: Enabling Checksums
Re: Enabling Checksums Re: Enabling Checksums |
List | pgsql-hackers |
On Mon, Mar 4, 2013 at 1:22 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > On 04.03.2013 23:00, Jeff Davis wrote: >> >> On Mon, 2013-03-04 at 22:27 +0200, Heikki Linnakangas wrote: >>> >>> Yeah, fragmentation will certainly hurt some workloads. But how badly, >>> and which workloads, and how does that compare with the work that >>> PostgreSQL has to do to maintain the checksums? I'd like to see some >>> data on those things. >> >> >> I think we all would. Btrfs will be a major filesystem in a few years, >> and we should be ready to support it. > > > Perhaps we should just wait a few years? If we suspect that this becomes > obsolete in a few years, it's probably better to just wait, than add a > feature we'll have to keep maintaining. Assuming it gets committed today, > it's going to take a year or two for 9.3 to get released and all the bugs > ironed out, anyway. Putting aside the not-so-rosy predictions seen elsewhere in this thread about the availability of a high performance, reliable checksumming file system available on common platforms, I'd like to express what benefit this feature will have to me: Corruption has easily occupied more than one person-month of time last year for us. This year to date I've burned two weeks, although admittedly this was probably the result of statistical clustering. Other colleagues of mine have probably put in a week or two in aggregate in this year to date. The ability to quickly, accurately, and maybe at some later date proactively finding good backups to run WAL recovery from is one of the biggest strides we can make in the operation of Postgres. The especially ugly cases are where the page header is not corrupt, so full page images can carry along malformed tuples...basically, when the corruption works its way into the WAL, we're in much worse shape. Checksums would hopefully prevent this case, converting them into corrupt pages that will not be modified. It would be better yet if I could write tools to find the last-good version of pages, and so I think tight integration with Postgres will see a lot of benefits that would be quite difficult and non-portable when relying on file system checksumming. You are among the most well-positioned to make assessments of the cost of the feature, but I thought you might appreciate a perspective of the benefits, too. I think they're large, and for me they are the highest pole in the tent for "what makes Postgres stressful to operate as-is today." It's a testament to the quality of the programming in Postgres that Postgres programming error is not the largest problem. For sense of reference, I think the next largest operational problem is the disruption caused by logical backups, e.g. pg_dump, and in particular its long running transactions and sessions.
pgsql-hackers by date: