pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Andrey Klychkov <aaklychkov@mail.ru>
Cc: Victor Yegorov <vyegorov@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Alter index rename concurrently to
Date: Thu, 02 Aug 2018 16:51:10 -0400
Message-ID: <6645.1533243070@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa=6M5tdXDgLM3YxXF6ogGy=QOJ8zj6oogetp=zCE+3hQ@mail.gmail.com>
References: <CAGnEboiyFkmGbQFAvc+tViayyPnbJkWTd93kvmhhML+cQQ_OkA@mail.gmail.com>
	<1531828116.497549417@f411.i.mail.ru>
	<6cf6b35f-b730-60fc-bab7-82699dca59ed@2ndquadrant.com>
	<CA+TgmobtmFT5g-0dA=vEFFtogjRAuDHcYPw+qEdou5dZPnF=pg@mail.gmail.com>
	<c3d9a44c-2ca1-6726-ad03-ed9c37cc7c29@2ndquadrant.com>
	<10678.1533072318@sss.pgh.pa.us>
	<4aadd527-9986-36bd-978c-2300a95e7aec@2ndquadrant.com>
	<CA+TgmoZVYSVqNuuw3tzUWcTNaeBj_XvAB8F9+bsesw-NKj=SKA@mail.gmail.com>
	<20180801193616.gi7mfs4kn5kggamf@alap3.anarazel.de>
	<CA+TgmoZ6vjMjQmzbpQkLBB9iY03SBx+gWHpsgwpyjzQAoZ3nrw@mail.gmail.com>
	<20180802200251.ekgtnkqpgfsmfmdf@alap3.anarazel.de>
	<CA+Tgmoa=6M5tdXDgLM3YxXF6ogGy=QOJ8zj6oogetp=zCE+3hQ@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> [ reasons why DDL under less than AEL sucks ]

Unfortunately, none of these problems are made to go away with an
AcceptInvalidationMessages at statement start.  That just makes the
window smaller.  But DDL effects could still be seen - or not -
partway through a statement, with just as much ensuing hilarity
as in your example.  Maybe more.

The real issue here, and the reason why I'm very unhappy with the mad rush
in certain quarters to try to reduce locking levels for DDL, is exactly
that it generally results in uncertainty about when the effects will be
seen.  I do not think your proposal does much more than put a fig leaf
over that problem.

Barring somebody having a great idea about resolving that, I think we
just need to be very clear that any DDL done with less than AEL has
exactly this issue.  In the case at hand, couldn't we just document
that "the effects of RENAME CONCURRENTLY may not be seen in other
sessions right away; at worst, not till they begin a new transaction"?
If you don't like that, don't use CONCURRENTLY.

			regards, tom lane




view thread (31+ messages)  latest in thread

Message-ID: <6645.1533243070@sss.pgh.pa.us>
Permalink:  ../6645.1533243070@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6645.1533243070@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, aaklychkov@mail.ru, vyegorov@gmail.com
  Subject: Re: Alter index rename concurrently to
  In-Reply-To: <6645.1533243070@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox