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

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Vadim Mikheev" <vadim(at)krs(dot)ru>, "PostgreSQL Developers List" <hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Date: 1999-12-04 23:45:30
Message-ID: NDBBIJLOILGIKBGDINDFAEFICBAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: owner-pgsql-hackers(at)postgreSQL(dot)org
> [mailto:owner-pgsql-hackers(at)postgreSQL(dot)org]On Behalf Of Tom Lane
>
> "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)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(at)tpf(dot)co(dot)jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Mascari 1999-12-05 01:07:31 When is 7.0 going Beta?
Previous Message Bruce Momjian 1999-12-04 21:09:09 Re: [HACKERS] Raising funds for PostgreSQL