Re: BUG #18000: Access method used by matview can be dropped leaving broken matview

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Date: 2023-06-26 08:35:44
Message-ID: ZJlN4DFm4FvVxe6v@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2023-06-26 08:43:03 Re: BUG #17998: Postgres crashes when executing WorkTableScan.
Previous Message Michael Paquier 2023-06-26 08:05:37 Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index