Re: Concurrent ALTER SEQUENCE RESTART Regression

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jason Petersen <jason(at)citusdata(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression
Date: 2017-06-13 19:04:35
Message-ID: bbb46016-21f4-6cc3-ae2a-eefed97da2d2@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 5/2/17 12:45, Robert Haas wrote:
> Another thing that doesn't look so good about AlterSequence is that it
> uses RangeVarGetRelid() instead of RangeVarGetsRelidExtended() with
> RangeVarCallbackOwnsRelation or some derivative thereof. That of
> course means you can obstruct access to a sequence you don't own.

Here is a patch for this. Note that this is old code, but it seems
worth fixing now while we're at it.

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

Attachment Content-Type Size
0001-Use-RangeVarGetRelidExtended-in-AlterSequence.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-06-13 20:38:52 Re: [BUGS] Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64
Previous Message balakishan sandeveni 2017-06-13 18:05:55 Re: Error-Report Postgresql

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Anderson 2017-06-13 19:14:26 Re: v10beta pg_catalog diagrams
Previous Message Bruce Momjian 2017-06-13 18:56:22 Re: WIP: Data at rest encryption