pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org, Noah Misch <noah@leadboat.com>
Cc: Jason Petersen <jason@citusdata.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Subject: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
Date: Fri, 12 May 2017 10:28:10 -0400
Message-ID: <d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com> (raw)
In-Reply-To: <20170511212839.b6i6xccdv5slrttx@alap3.anarazel.de>
References: <CAB7nPqQ=yHXxiWU2FuaC13L_5y7UG7R_OkJhWQbXYMJPXCDtNg@mail.gmail.com>
	<20170430080517.GA811193@rfd.leadboat.com>
	<59aeb834-b113-6769-bfe4-65f2f8c875e3@2ndquadrant.com>
	<20170507234334.yimkp6aq2o43wtt2@alap3.anarazel.de>
	<4521f870-bb1f-1b29-3b3f-42419696efe7@2ndquadrant.com>
	<20d59e42-4a08-fa34-29df-9f54b3ef5ba7@2ndquadrant.com>
	<2913.1494426542@sss.pgh.pa.us>
	<20170510162450.bzfktkeexezepf6c@alap3.anarazel.de>
	<90255529-1de1-0aad-c545-f75d08479a9a@2ndquadrant.com>
	<8863.1494537678@sss.pgh.pa.us>
	<20170511212839.b6i6xccdv5slrttx@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 5/11/17 17:28, Andres Freund wrote:
> Isn't that pretty much the point?  The whole open_share_lock()
> optimization looks like it really only can make a difference with
> subtransactions?

Yeah that confused me too.  That keep-the-lock-for-the-whole-transaction
logic was introduced in a2597ef17958e75e7ba26507dc407249cc9e7134 around
7.3, way before subtransactions (8.0).  The point there was apparently
just to avoid hitting the lock manager on subsequent calls.  That code
has since been moved around end refactored many times.  When
subtransactions were introduced, the current logic of keeping the lock
across subtransactions was added in order to keep the original intent.

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


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



view thread (84+ messages)  latest in thread

Message-ID: <d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com>
Permalink:  ../d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com/
Also on:    postgresql.org/message-id/d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, petr.jelinek@2ndquadrant.com, noah@leadboat.com, jason@citusdata.com, michael.paquier@gmail.com
  Subject: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
  In-Reply-To: <d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com>
  References: <CAB7nPqQ=yHXxiWU2FuaC13L_5y7UG7R_OkJhWQbXYMJPXCDtNg@mail.gmail.com> <20170430080517.GA811193@rfd.leadboat.com> <59aeb834-b113-6769-bfe4-65f2f8c875e3@2ndquadrant.com> <20170507234334.yimkp6aq2o43wtt2@alap3.anarazel.de> <4521f870-bb1f-1b29-3b3f-42419696efe7@2ndquadrant.com> <20d59e42-4a08-fa34-29df-9f54b3ef5ba7@2ndquadrant.com> <2913.1494426542@sss.pgh.pa.us> <20170510162450.bzfktkeexezepf6c@alap3.anarazel.de> <90255529-1de1-0aad-c545-f75d08479a9a@2ndquadrant.com> <8863.1494537678@sss.pgh.pa.us> <20170511212839.b6i6xccdv5slrttx@alap3.anarazel.de> <d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com>

* 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