Re: Alter index rename concurrently to

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Andrey Klychkov <aaklychkov@mail.ru>, Robert Haas <robertmhaas@gmail.com>, Victor Yegorov <vyegorov@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-10-17T22:11:51Z
Lists: pgsql-hackers
On 13/10/2018 04:01, Andres Freund wrote:
> I don't see how this could be argued. It has to be a self-conflicting
> lockmode, otherwise you'd end up doing renames of tables where you
> cannot see the previous state. And you'd get weird errors about updating
> invisible rows etc.

> I don't buy this description. Imo it's a fundamental correctness
> thing. Without it concurrent DDL would potentially overwrite the rename,
> because they could start updating while still seeing the old version.

OK, I can refine those descriptions/comments.  Do you have any concerns
about the underlying principle of this patch?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Lower lock level for renaming indexes