Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Noah Misch <noah(at)leadboat(dot)com>, Jason Petersen <jason(at)citusdata(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression
Date: 2017-05-11 15:35:22
Message-ID: 4c69c740-67e2-34be-3310-c74d4924843b@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 5/10/17 12:24, Andres Freund wrote:
> The issue isn't the strength, but that we currently have this weird
> hackery around open_share_lock():
> /*
> * Open the sequence and acquire AccessShareLock if needed
> *
> * If we haven't touched the sequence already in this transaction,
> * we need to acquire AccessShareLock. We arrange for the lock to
> * be owned by the top transaction, so that we don't need to do it
> * more than once per xact.
> */
>
> This'd probably need to be removed, as we'd otherwise would get very
> weird semantics around aborted subxacts.

Can you explain in more detail what you mean by this?

--
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 Peter Eisentraut 2017-05-11 20:27:48 Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression
Previous Message bitekas 2017-05-11 01:28:24 BUG #14647: pgAdmin crashed

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-05-11 16:00:18 Re: renaming "transaction log"
Previous Message Remi Colinet 2017-05-11 15:24:16 Re: [PATCH v2] Progress command to monitor progression of long running SQL queries