pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>
To: exclusion@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17339: Assert failed on attempt to detach a sequence concurrently
Date: Mon, 20 Dec 2021 21:57:47 +0100
Message-ID: <c19d2596-c525-1405-fe14-73bed9af6bde@enterprisedb.com> (raw)
In-Reply-To: <YcB5K6/Mrh9X82lG@paquier.xyz>
References: <17339-a9e09aaf38a3457a@postgresql.org>
	<YcB5K6/Mrh9X82lG@paquier.xyz>


On 20.12.21 13:38, Michael Paquier wrote:
> On Sun, Dec 19, 2021 at 06:00:02AM +0000, PG Bug reporting form wrote:
>> CREATE SEQUENCE seq;
>> CREATE TABLE range_parted(a int) PARTITION BY RANGE(a);
>> ALTER TABLE range_parted DETACH PARTITION seq CONCURRENTLY;
> 
> The same error happens additionally for views or materialized views.
> Looking at the code, I think that we should just apply
> ATSimplePermissions() on (ATT_TABLE | ATT_FOREIGN_TABLE) when
> executing the detach command to check for the supported relkinds.
> That would make the logic consistent with the attach code path that
> does the same check on the partition attached, while generating an
> error message already generic enough for this purpose.
> 
> Attached is a patch, with some regression tests.

Is it possible for child tables in partitioned tables to have different 
ownerships?  Then this change would introduce a new failure mode.





view thread (7+ messages)  latest in thread

Message-ID: <c19d2596-c525-1405-fe14-73bed9af6bde@enterprisedb.com>
Permalink:  ../c19d2596-c525-1405-fe14-73bed9af6bde@enterprisedb.com/
Also on:    postgresql.org/message-id/c19d2596-c525-1405-fe14-73bed9af6bde@enterprisedb.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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, michael@paquier.xyz, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17339: Assert failed on attempt to detach a sequence concurrently
  In-Reply-To: <c19d2596-c525-1405-fe14-73bed9af6bde@enterprisedb.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