Re: SIREAD lock versus ACCESS EXCLUSIVE lock

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Cc: "Heikki Linnakangas" <heikki.linnakangas@enterprisedb.com>, "<Simon Riggs" <simon@2ndquadrant.com>, "Dan Ports" <drkp@csail.mit.edu>, pgsql-hackers@postgresql.org
Date: 2011-06-03T19:46:15Z
Lists: pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
>> I think you'll need to just memorize the lock deletion command in
>> a backend-local list, and perform the deletion in a post-commit
>> function. Something similar to the PendingRelDelete stuff in
>> storage.c. In fact, hooking into smgrDoPendingDeletes would work,
>> but that seems like a modularity violation.
 
> Thanks.  That's helpful.  Will look at that code and do something
> similar.

Keep in mind that it's too late to throw any sort of error post-commit.
Any code you add there will need to have negligible probability of
failure.

			regards, tom lane