public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Justin Pryzby <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Soumyadeep Chakraborty <[email protected]>
Cc: Zhihong Yu <[email protected]>
Cc: [email protected]
Cc: Ashwin Agrawal <[email protected]>
Cc: [email protected]
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Date: Tue, 20 Feb 2024 15:47:46 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<ZCJuW3GOfE/[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On 19.07.23 20:13, Justin Pryzby wrote:
> On Thu, Jun 01, 2023 at 08:50:50AM -0400, Michael Paquier wrote:
>> On Wed, May 31, 2023 at 06:35:34PM -0500, Justin Pryzby wrote:
>>> What do you think the comment ought to say ?  It already says:
>>>
>>> src/backend/catalog/heap.c-              * Make a dependency link to force the relation to be deleted if its
>>> src/backend/catalog/heap.c-              * access method is.
>>
>> This is the third location where we rely on the fact that
>> RELKIND_HAS_TABLE_AM() does not include RELKIND_PARTITIONED_TABLE, so
>> it seems worth documenting what we are relying on as a comment?  Say:
>>   * Make a dependency link to force the relation to be deleted if its
>>   * access method is.
>>   *
>>   * No need to add an explicit dependency for the toast table, as the
>>   * main table depends on it.  Partitioned tables have a table access
>>   * method defined, and RELKIND_HAS_TABLE_AM ignores them.
> 
> You said that this location "relies on" the macro not including
> partitioned tables, but I would say the opposite: the places that use
> RELKIND_HAS_TABLE_AM() and do *not* say "or relkind==PARTITIONED_TABLE"
> are the ones that "rely on" that...
> 
> Anyway, this updates various comments.  No other changes.

It would be helpful if this patch could more extensively document in its 
commit message what semantic changes it makes.  Various options of 
possible behaviors were discussed in this thread, but it's not clear 
which behaviors were chosen in this particular patch version.

The general idea is that you can set an access method on a partitioned 
table.  That much seems very agreeable.  But then what happens with this 
setting, how can you override it, how can you change it, what happens 
when you change it, what happens with existing partitions and new 
partitions, etc. -- and which of these behaviors are new and old.  Many 
things to specify.







view thread (32+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox