Re: GiST concurrency - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GiST concurrency
Date
Msg-id 2049.1119361363@sss.pgh.pa.us
Whole thread Raw
In response to GiST concurrency  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: GiST concurrency
List pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
> Now I basically finished recovery for GiST (of course, it's need a hard testing) 
> and go to concurrency. As it described in Kornaker, Mohan and Hellerstein's 
> paper 
> (http://www.sai.msu.su/~megera/postgres/gist/papers/concurrency/sigmod97-gist.pdf) 
> it's need a way to get global LSN, in our case - XLogRecPtr of last changed 
> page. As I understand, I can't use ProcLastRecPtr because it is one-process 
> wide, I need value stored in shared memory.

If the method needs a truly global LSN, then it is broken --- the only
way you could have such a value and have it stay good long enough to do
anything with it is to block all other backends from inserting any new
WAL records.  Which is the very antithesis of concurrency.

I think you probably misunderstood the paper.  It looks to me like the
proposal in the paper is to use the LSN assigned to the WAL record that
represents a page split operation.  Which you get from the XLogInsert
--- there's no need for an extra call.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] O_DIRECT for WAL writes
Next
From: Robert Treat
Date:
Subject: Re: [PATCHES] default database creation with initdb