Re: Concurrent ALTER SEQUENCE RESTART Regression

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jason Petersen <jason(at)citusdata(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression
Date: 2017-04-25 19:17:39
Message-ID: 16ed823b-44e4-dc51-3da9-a3d66b71ed5c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 4/25/17 00:26, Michael Paquier wrote:
> So things are broken for sequences since commit 1753b1b0 (adding Peter
> in CC) that has changed the way sequence metadata is handled. The
> failure happens in CatalogTupleUpdate() which uses
> simple_heap_update() that caller can only use if updates are
> concurrent safe. But since 1753b1b0 that is not true as the sequence
> is locked with AccessShareLock.

I think you are confusing locking the sequence versus locking the
pg_sequence catalog. The error is coming from CatalogTupleUpdate() on
pg_sequence, which is locked using RowExclusiveLock, which is what we
use for most DDL commands doing catalog changes.

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Danilo Olivares 2017-04-25 23:40:40 COPY .. FREEZE, (apparently) not working on 9.6
Previous Message K S, Sandhya (Nokia - IN/Bangalore) 2017-04-25 14:54:08 Re: Crash observed during the start of the Postgres process

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-25 19:26:06 Re: Re: logical replication and PANIC during shutdown checkpoint in publisher
Previous Message Tels 2017-04-25 19:17:29 Re: PG 10 release notes