Re: Poorly thought out code in vacuum
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2012-01-06T17:45:55Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make VACUUM avoid waiting for a cleanup lock, where possible.
- bbb6e559c4ea 9.2.0 cited
On Fri, Jan 6, 2012 at 12:34 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> On Fri, Jan 6, 2012 at 12:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> So at this point I've got serious doubts as to the quality of testing of >>> that whole patch, not just this part. > >> I tested the case where we skip a block during the first pass, but I >> admit that I punted on testing the case where we skip a block during >> the second pass, because I couldn't think of a good way to exercise >> it. Any suggestions? > > Hack ConditionalLockBufferForCleanup to have a 50% probability of > failure regardless of anything else, for instance via > > static int ctr = 0; > > if ((++ctr) % 2) > return false; Oh, that's brilliant. OK, I'll go try that. Note to self: Try to remember to take that hack back out before committing. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company