Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
Date
Msg-id d75c4198-8cf0-e344-22a9-bcbc19a2dc76@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression  (Andres Freund <andres@anarazel.de>)
List pgsql-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



pgsql-hackers by date:

Previous
From: Neha Khatri
Date:
Subject: Re: [HACKERS] If subscription to foreign table valid ?
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Is there any way to access heap_open() from _PG_init ??