Re: Any idea for serializing INSERTING SERIAL column? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Any idea for serializing INSERTING SERIAL column?
Date
Msg-id 7719.1306899272@sss.pgh.pa.us
Whole thread Raw
In response to Re: Any idea for serializing INSERTING SERIAL column?  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Tatsuo Ishii <ishii@postgresql.org> writes:
>> Sorry, I'm not real familiar with pgpool, but have you thought about
>> using an advisory lock on the target table, instead of a "real" lock
>> (SELECT ... FOR UPDATE / LOCK table)?

> Problem with the advisory lock is, it will not work if the target
> table is empty.

(a) why not?  You could surely use the table OID as a key for the   advisory lock.
(b) advisory lock on the sequence might be better anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] Hash Anti Join performance degradation