pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Jason Petersen <jason@citusdata.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression
Date: Wed, 26 Apr 2017 18:12:58 -0700
Message-ID: <20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de> (raw)
In-Reply-To: <99a009ea-1797-5b82-f3d3-eb4a5a8eb5dc@2ndquadrant.com>
References: <D992B4C2-8F80-4DE0-8348-6E0696C3F967@citusdata.com>
	<CAB7nPqRUXMvo5xy9cLFyhuHErN9WVCckuKaUbJpxPGBzxqVFdw@mail.gmail.com>
	<CAB7nPqRev_wK4k39hQBpQZRQ17v29guxfobnnmTYT_-hUU67BA@mail.gmail.com>
	<16ed823b-44e4-dc51-3da9-a3d66b71ed5c@2ndquadrant.com>
	<CAB7nPqSDhVn6+yrteh+K4Z58F93dQd-S40N5HL6HQsFMYccL6w@mail.gmail.com>
	<9240bf94-44a8-671a-27bd-500eb868226a@2ndquadrant.com>
	<20170426174813.slaq6mka7v6xohap@alap3.anarazel.de>
	<CAB7nPqR_K5pSnP9WUyvgn_76Qurz7BtJZgF6tL1+3cFwxwj68w@mail.gmail.com>
	<99a009ea-1797-5b82-f3d3-eb4a5a8eb5dc@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2017-04-26 21:07:20 -0400, Peter Eisentraut wrote:
> On 4/26/17 19:12, Michael Paquier wrote:
> > Well, there are more DDL commands where it is possible to see "tuple
> > concurrently updated" easily, an example is ALTER ROLE. So nothing is
> > concurrent-proof with this code and I think needs a careful lookup
> > because this error should never be something that is user-visible.
> 
> Yeah, it's been like this since time immemorial, so I don't think we
> need a last minute fix now.

Uh.  Until v10 this worked in a somewhat weird way, but it worked.


> One thing we could do, since all catalog updates now go through
> CatalogTupleUpdate(), is not use simple_heap_update() there but do the
> heap_update() directly and provide a better user-facing error message.

I think it's unacceptable to regress with an error message here.  I've
seen sequence DDL being used while concurrent DML was onging in a number
of production use cases, and just starting to error out instead of
properly blocking doesn't seem acceptable to me.

- Andres


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (84+ messages)  latest in thread

Message-ID: <20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de>
Permalink:  ../20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, peter.eisentraut@2ndquadrant.com, michael.paquier@gmail.com, jason@citusdata.com
  Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression
  In-Reply-To: <20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de>
  References: <D992B4C2-8F80-4DE0-8348-6E0696C3F967@citusdata.com> <CAB7nPqRUXMvo5xy9cLFyhuHErN9WVCckuKaUbJpxPGBzxqVFdw@mail.gmail.com> <CAB7nPqRev_wK4k39hQBpQZRQ17v29guxfobnnmTYT_-hUU67BA@mail.gmail.com> <16ed823b-44e4-dc51-3da9-a3d66b71ed5c@2ndquadrant.com> <CAB7nPqSDhVn6+yrteh+K4Z58F93dQd-S40N5HL6HQsFMYccL6w@mail.gmail.com> <9240bf94-44a8-671a-27bd-500eb868226a@2ndquadrant.com> <20170426174813.slaq6mka7v6xohap@alap3.anarazel.de> <CAB7nPqR_K5pSnP9WUyvgn_76Qurz7BtJZgF6tL1+3cFwxwj68w@mail.gmail.com> <99a009ea-1797-5b82-f3d3-eb4a5a8eb5dc@2ndquadrant.com> <20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de>

* 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