From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Garry Chen <gc92(at)cornell(dot)edu> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Question about alter table rename |
Date: | 2017-12-11 16:02:16 |
Message-ID: | CAKFQuwaWGyYEcpEjr5H2TgnVWVCK=pv0htxoj_U05R=-3UgmwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Mon, Dec 11, 2017 at 8:54 AM, Garry Chen <gc92(at)cornell(dot)edu> wrote:
> Hi all,
>
> For Postgresl release 10 an access exclusive lock is held
> when an alter table rename was performing. Does it prohibit a select
> operation against the table?
>
>
> https://www.postgresql.org/docs/10/static/explicit-locking.html
ACCESS EXCLUSIVE
Conflicts with locks of all modes (ACCESS SHARE, ROW SHARE, ROW EXCLUSIVE,
SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE, EXCLUSIVE, and ACCESS
EXCLUSIVE). This mode guarantees that the holder is the only transaction
accessing the table in any way.
ACCESS SHARE
Conflicts with the ACCESS EXCLUSIVE lock mode only.
The SELECT command acquires a lock of this mode on referenced tables. In
general, any query that only reads a table and does not modify it will
acquire this lock mode.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Efraín Déctor | 2017-12-11 19:26:48 | Question about Logical Replication |
Previous Message | Garry Chen | 2017-12-11 15:54:12 | Question about alter table rename |