Re: BUG #18000: Access method used by matview can be dropped leaving broken matview - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Date
Msg-id ZJlN4DFm4FvVxe6v@paquier.xyz
Whole thread Raw
In response to BUG #18000: Access method used by matview can be dropped leaving broken matview  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
List pgsql-bugs
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

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #17998: Postgres crashes when executing WorkTableScan.