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

From Andres Freund
Subject Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Date
Msg-id 20230627182332.uq6afduhvdip7pol@awork3.anarazel.de
Whole thread Raw
In response to Re: BUG #18000: Access method used by matview can be dropped leaving broken matview  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #18000: Access method used by matview can be dropped leaving broken matview  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
Hi,

On 2023-06-27 15:33:30 +0900, Michael Paquier wrote:
> +    /*
> +     * Now that pg_class has been updated with its relevant information for
> +     * the swap, update the dependency of the relation to point to its new
> +     * table AM, if it has changed.
> +     */
> +    if (relam1 != relam2)
> +    {
> +        changeDependencyFor(RelationRelationId,
> +                            r1,
> +                            AccessMethodRelationId,
> +                            relam1,
> +                            relam2);
> +    }

Should we check changeDependencyFor()'s return value? On a first glance it
looks like it would be an error to return 0 in this case?

Greetings,

Andres Freund



pgsql-bugs by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Next
From: PG Bug reporting form
Date:
Subject: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook