On Tue, Jan 21, 2025 at 10:21:51PM -0500, Corey Huinker wrote: > After some research, I think that we should treat partitioned indexes like > we were before, and just handle the existing special case for regular > indexes.
Hmm, why? Sounds strange to me to not have the same locking semantics for the partitioned parts, and this even if partitioned indexes don't have stats that can be manipulated in relation_stats.c as far as I can see. These stats APIs are designed to be permissive as Jeff says. Having a better locking from the start makes the whole picture more consistent, while opening the door for actually setting real stat numbers for partitioned indexes (if some make sense, at some point)? > That patch is attached below, along with a few updates to pg_dump. > There are more changes in the works addressing your earlier feedback, but > those seem to break as many things as they fix, so I'm still working on > them. if ((rel->rd_rel->relkind == RELKIND_INDEX - || (rel->rd_rel->relkind == RELKIND_PARTITIONED_INDEX)) + || (rel->rd_rel->relkind == RELKIND_PARTITIONED_INDEX)) && (rel->rd_indexprs != NIL) && (rel->rd_index->indkey.values[attnum - 1] == 0)) { Some noise. +/* Test for proper locking */ Could it be possible to not mix the style of the comments in stats_import.sql? stats_utils.c does not need storage/lockdefs.h. The order of catalog/index.h is incorrect. -- Michael
signature.asc
Description: PGP signature