Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as
Date
Msg-id 28372.1093322972@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> ie. why can't we just record the number of locks each backend has, sort 
> of, and use a reference counting sort of method.  Per-backend in case 
> the backend dies and we need to discount those locks..?

Uh ... the interesting question is usually not "does this backend hold
any row locks", it is "is this row locked by any backends".  If the
latter question is not *exceedingly* cheap to answer, at least in the
normal case where the answer is no, you don't have a workable solution,
because you'll be adding nontrivial overhead to every row update.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling