Re: Question about alter table rename - Mailing list pgsql-novice

From David G. Johnston
Subject Re: Question about alter table rename
Date
Msg-id CAKFQuwaWGyYEcpEjr5H2TgnVWVCK=pv0htxoj_U05R=-3UgmwQ@mail.gmail.com
Whole thread Raw
In response to Question about alter table rename  (Garry Chen <gc92@cornell.edu>)
List pgsql-novice
On Mon, Dec 11, 2017 at 8:54 AM, Garry Chen <gc92@cornell.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?


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.

pgsql-novice by date:

Previous
From: Garry Chen
Date:
Subject: Question about alter table rename
Next
From: Efraín Déctor
Date:
Subject: Question about Logical Replication