Re: Any idea for serializing INSERTING SERIAL column?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Any idea for serializing INSERTING SERIAL column?
Дата
Msg-id 20110601.153044.857710717416464421.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Any idea for serializing INSERTING SERIAL column?  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: Any idea for serializing INSERTING SERIAL column?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
>> 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)? An advisory lock should not
>> interfere with autovacuum. Obviously, this would only work if all the
>> INSERTs in your example were coming from a single application (i.e.
>> pgpool) which would honor the advisory lock.
> 
> Problem with the advisory lock is, it will not work if the target
> table is empty.

Oops. I was wrong. the key for advisory lock needs to be a unique
value, but not necessarily a row value in a table. Seems this is the
way I should go(though need to be carefull since the lock is not
released even after a transaction ends). Thanks!
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Getting a bug tracker for the Postgres project
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: patch for new feature: Buffer Cache Hibernation