Re: Any idea for serializing INSERTING SERIAL column?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: schmiddy(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Any idea for serializing INSERTING SERIAL column?
Date: 2011-06-01 03:34:32
Message-ID: 7719.1306899272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <ishii(at)postgresql(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-06-01 03:47:42 Re: [PERFORM] Hash Anti Join performance degradation
Previous Message Tom Lane 2011-06-01 03:30:50 Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup