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

From Alvaro Herrera
Subject Re: pgsql-server: Rearrange pg_subtrans handling as
Date
Msg-id 20040824034153.GF27308@dcc.uchile.cl
Whole thread Raw
In response to Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
On Tue, Aug 24, 2004 at 09:17:59AM +0800, Christopher Kings-Lynne wrote:
> Just random speculation, but could we use a pg_subtrans-like setup to do 
> row share locks?
> 
> ie. Store them in a sort of table to avoid the problems with limited 
> shared memory size?

Hmm ... how would you map the row number to an array index?  I think it
could work if you answer the above question.  The problem is doing it
for any possible table/row combination, and make it so that in a given
moment only a small space in the array is used.  (If you don't do that,
there will be a lot of thrashing.)

What's needed is a four-dimension integer array:

pg_database    oid
pg_class    oid    BlockNumber    OffsetNumber

The value would keep how many share-lockers there are.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Cómo ponemos nuestros dedos en la arcilla del otro. Eso es la amistad; jugar
al alfarero y ver qué formas se pueden sacar del otro" (C. Halloway en
La Feria de las Tinieblas, R. Bradbury)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as
Next
From: Tom Lane
Date:
Subject: Re: auto-casting a bit more intelligent in 8.0 ... ?