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

From Christopher Kings-Lynne
Subject Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling
Date
Msg-id 412AC458.1030708@familyhealth.com.au
Whole thread Raw
In response to Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> pg_subtrans is trivial to index --- it's a linear array subscripted by
> TransactionId.  I'm not sure what we'd do to handle row locks, which
> would need a key like (DBoid, RELoid, BlockNum, LineNum) and would be
> extremely non-dense in that space.
> 
> 'Tis something to think about though...

I've been thinking about it and I am wondering what the reason is that 
we need to record every transaction that has a row share lock?

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..?

Chris



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: New warning in pg_dump
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as