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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: 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-27 18:23:32
Message-ID: 20230627182332.uq6afduhvdip7pol@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-06-27 20:27:42 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
Previous Message Nathan Bossart 2023-06-27 17:03:48 Re: BUG #18000: Access method used by matview can be dropped leaving broken matview