RE: [HACKERS] Re: [GENERAL] drop/rename table and transactions

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема RE: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Дата
Msg-id NDBBIJLOILGIKBGDINDFAEFICBAA.Inoue@tpf.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> -----Original Message-----
> From: owner-pgsql-hackers@postgreSQL.org
> [mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom Lane
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> >> OK case by case. I will be glad to check them one by one.
> 
> > I'm checking them for AccessExclusiveLock now.
> 
> > 7) commands/async.c(LISTEN/UNLISTEN)
> >     This case seems dangerous too but unfortunately I couldn't
> >     point out a concrete flaw now.
> 
> Holding the lock on pg_listener longer than absolutely necessary strikes
> me as very risky, since any other backend might need to grab the lock
> before it can complete its own transaction (in order to send or receive
> notifies).  Deadlock could ensue depending on what other locks are held.
>

It's difficult for me to find a flaw for this case.
There aren't so many conflicts. For example,LISTEN/UNLISTEN never
conflict relatively because they could be issued only for its own backend.
And as you say,it's very bad to hold the lock till end of transaction in
LISTEN/UNLISTEN.
Row level locking in MVCC may allow another(RowExclusiveLock?)
lock instead of AccessExclusiveLock.
I'm not sure now.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp  


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

Предыдущее
От: "Aaron J. Seigo"
Дата:
Сообщение: Re: [HACKERS] Raising funds for PostgreSQL
Следующее
От: Mike Mascari
Дата:
Сообщение: When is 7.0 going Beta?