pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: exclusion@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Date: Mon, 26 Jun 2023 17:35:44 +0900
Message-ID: <ZJlN4DFm4FvVxe6v@paquier.xyz> (raw)
In-Reply-To: <18000-9145c25b1af475ca@postgresql.org>
References: <18000-9145c25b1af475ca@postgresql.org>

On Mon, Jun 26, 2023 at 08:00:01AM +0000, PG Bug reporting form wrote:
> But if the access method was set during a matview creation, it's deletion
> is
> prevented as expected:
> CREATE ACCESS METHOD heap2 TYPE TABLE HANDLER heap_tableam_handler;
> CREATE MATERIALIZED VIEW heapmv USING heap2 AS SELECT 1::int;
> DROP ACCESS METHOD heap2;
> ERROR:  cannot drop access method heap2 because other objects depend on it
> DETAIL:  materialized view heapmv depends on access method heap2
> HINT:  Use DROP ... CASCADE to drop the dependent objects too.
> 
> Reproduced on REL_15_STABLE .. master.

Thanks for the report!

ALTER TABLE .. SET ACCESS METHOD is on me.  Will look..
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (10+ messages)  latest in thread

Message-ID: <ZJlN4DFm4FvVxe6v@paquier.xyz>
Permalink:  ../ZJlN4DFm4FvVxe6v@paquier.xyz/
Also on:    postgresql.org/message-id/ZJlN4DFm4FvVxe6v@paquier.xyz

 · 

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: michael@paquier.xyz, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
  In-Reply-To: <ZJlN4DFm4FvVxe6v@paquier.xyz>

* 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