Re: ALTER TABLE SET ACCESS METHOD on partitioned tables - Mailing list pgsql-hackers

From Soumyadeep Chakraborty
Subject Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Date
Msg-id CAE-ML+9NycfS3Q9PhMVpgB2NN62HMa9OBCwNW60AiO8NgCCNXw@mail.gmail.com
Whole thread Raw
In response to Re: ALTER TABLE SET ACCESS METHOD on partitioned tables  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: ALTER TABLE SET ACCESS METHOD on partitioned tables  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, May 18, 2022 at 6:26 PM Zhihong Yu <zyu@yugabyte.com> wrote:

> +       accessMethodId = ((Form_pg_class) GETSTRUCT(tup))->relam;
>
> -   /* look up the access method, verify it is for a table */
> -   if (accessMethod != NULL)
> -       accessMethodId = get_table_am_oid(accessMethod, false);
> +       if (!HeapTupleIsValid(tup))
> +           elog(ERROR, "cache lookup failed for relation %u", relid);
>
> The validity check of tup should be done before fetching the value of relam field.

Thanks. Fixed and rebased.

Regards,
Soumyadeep (VMware)
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: BTMaxItemSize seems to be subtly incorrect
Next
From: Peter Geoghegan
Date:
Subject: Re: Collation version tracking for macOS