Re: Moving more work outside WALInsertLock
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-12-15T23:37:18Z
Lists: pgsql-hackers
On Thu, Dec 15, 2011 at 7:06 PM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: >> Please try again to explain what you're doing? > > > Ok: I'm moving the creation of rdata entries for backup blocks outside the > critical section, so that it's done before grabbing the lock. I'm also > moving the CRC calculation so that it's done after all the rdata entries > have been created, including the ones for backup blocks. It's more readable > to do it that way, as a separate step, instead of sprinkling the COMP_CRC > macros in many places. There's a comment that says we can't undo the linking of the rdata chains, but it looks like a reversible process to me. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services