Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

From: Soumyadeep Chakraborty <soumyadeep2007(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Ashwin Agrawal <ashwinstar(at)gmail(dot)com>, vanjared(at)vmware(dot)com
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Date: 2022-06-09 18:21:58
Message-ID: CAE-ML+9NycfS3Q9PhMVpgB2NN62HMa9OBCwNW60AiO8NgCCNXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 18, 2022 at 6:26 PM Zhihong Yu <zyu(at)yugabyte(dot)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 Content-Type Size
v3-0001-Allow-ATSETAM-on-partition-roots.patch text/x-patch 15.0 KB
v3-0002-Make-ATSETAM-recurse-by-default.patch text/x-patch 3.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-06-09 18:22:37 Re: Collation version tracking for macOS
Previous Message Robert Haas 2022-06-09 18:20:01 Re: BTMaxItemSize seems to be subtly incorrect