Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs)
От
Justin Pryzby
Тема
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs)
Дата
Msg-id
20191029035633.GR23808@telsasoft.com
Ответ на
Re: update ALTER TABLE with ATTACH PARTITION lock mode (Alvaro Herrera)
Список
Дерево обсуждения
update ALTER TABLE with ATTACH PARTITION lock mode Justin Pryzby <pryzby@telsasoft.com>
Re: update ALTER TABLE with ATTACH PARTITION lock mode Michael Paquier <michael@paquier.xyz>
Re: update ALTER TABLE with ATTACH PARTITION lock mode Alvaro Herrera <alvherre@2ndquadrant.com>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Justin Pryzby <pryzby@telsasoft.com>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Michael Paquier <michael@paquier.xyz>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Justin Pryzby <pryzby@telsasoft.com>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Michael Paquier <michael@paquier.xyz>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Justin Pryzby <pryzby@telsasoft.com>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Michael Paquier <michael@paquier.xyz>
Re: update ALTER TABLE with ATTACH PARTITION lock mode (docs) Michael Paquier <michael@paquier.xyz>
Re: update ALTER TABLE with ATTACH PARTITION lock mode Amit Langote <amitlangote09@gmail.com>
On Mon, Oct 28, 2019 at 12:06:44PM -0300, Alvaro Herrera wrote:
> On 2019-Oct-28, Michael Paquier wrote:
>
> > On Sun, Oct 27, 2019 at 07:12:07PM -0500, Justin Pryzby wrote:
> > > commit #898e5e32 (Allow ATTACH PARTITION with only ShareUpdateExclusiveLock)
> > > updates ddl.sgml but not alter_table.sgml, which only says:
> > >
> > > https://www.postgresql.org/docs/12/release-12.html
> > > |An ACCESS EXCLUSIVE lock is held unless explicitly noted.
> >
> > +
> > + Attaching a partition acquires a SHARE UPDATE EXCLUSIVE
> > + lock on the partitioned table, in addition to an
> > + ACCESS EXCLUSIVE lock on the partition.
> > +
> > Updating the docs of ALTER TABLE sounds like a good idea. This
> > sentence looks fine to me. Perhaps others have suggestions?
>
> Doesn't the command also acquire a lock on the default partition if
> there is one? It sounds worth noting.
I suppose it should something other than partition(ed), since partitions can be
partitioned, too...
Attaching a partition acquires a SHARE UPDATE EXCLUSIVE
lock on the parent table, in addition to
ACCESS EXCLUSIVE locks on the child table and the
DEFAULT partition (if any).
Thanks,
Justin
В списке pgsql-hackers по дате отправления
От: Wyatt Alt
Дата: