Re: pgsql-server: Rearrange pg_subtrans handling as

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql-server: Rearrange pg_subtrans handling as
Date: 2004-08-24 03:41:53
Message-ID: 20040824034153.GF27308@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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)

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-08-24 04:30:16 Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling
Previous Message Tom Lane 2004-08-24 03:02:01 Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling as

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2004-08-24 03:44:10 Re: New warning in pg_dump
Previous Message Philip Warner 2004-08-24 03:32:07 Re: New warning in pg_dump