For now, I’ve limited the change to REPLICA IDENTITY to see whether there are objections to this approach. If there are none, I plan to extend the same warning behavior to the other sub-commands listed above. After that, users can reasonably assume that an ALTER TABLE partitioned_table ... action will recurse to child partitions unless a warning explicitly tells them otherwise.
It should be a notice, not a warning.
Make sense. I changed to NOTICE in v2.
How about indicating how many partitions were affected in the notice and
I added partition count in the notice message in v2.
allowing the absence of such a notice to be the indicator that cascading did not happen?
David J.
I don’t think relying on the absence of a notice works well in this case.
Currently, cascading never happens, which is exactly why I’m adding a NOTICE. If we rely on silence to indicate “no cascade”, users have no signal that their expectation was incorrect.
The ALTER TABLE documentation says:
```
If ONLY is specified before the table name, only that table is altered. If ONLY is not specified, the table and all its descendant tables (if any) are altered.
```
Given this, users reasonably expect that omitting ONLY will cause REPLICA IDENTITY to cascade to partitions. In reality, it never does, which breaks that expectation. The NOTICE is intended to make this behavior explicit in exactly that case.
On Jan 12, 2026, at 23:23, Greg Sabino Mullane <htamfids@gmail.com> wrote:
On Mon, Jan 12, 2026 at 9:40 AM David G. Johnston <david.g.johnston@gmail.com> wrote: How about indicating how many partitions were affected in the notice and allowing the absence of such a notice to be the indicator that cascading did not happen?
I like the idea of number of partitions, but think we need to be more explicit than people surmising the lack of a notice is significant.
Cheers, Greg
As explained above, the NOTICE is only emitted in the case where the documented ALTER TABLE semantics suggest cascading, but REPLICA IDENTITY
does not actually cascade to partitions. This makes the behavior explicit, rather than relying on users to infer meaning from the absence of a message.
PSA v2:
* Changed level log to NOTICE
* Rephrased the notice message and included partition count in the message.
Now, the message is like:
```
evantest=# alter table sensor_data replica identity full;
NOTICE: REPLICA IDENTITY does not apply to partitions (1 affected)