Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2023-06-27T18:23:32Z
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
Commits
-
Fix pg_depend entry to AMs after ALTER TABLE .. SET ACCESS METHOD
- 93401ec02f40 15.4 landed
- 97d89101045f 16.0 landed