Re: SIREAD lock versus ACCESS EXCLUSIVE lock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "<Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SIREAD lock versus ACCESS EXCLUSIVE lock
Date: 2011-06-03 19:46:15
Message-ID: 7904.1307130375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-06-03 19:46:16 Re: Nested CASE-WHEN scoping
Previous Message Peter Eisentraut 2011-06-03 19:26:13 Re: [HACKERS] DOCS: SGML identifier may not exceed 44 characters