On Mon, 2025-01-20 at 16:26 -0500, Corey Huinker wrote: > Attached is the patch, along with the regression test output prior to > the change to stat_utils.c.
Comments: * For indexes, it looks like do_analyze_rel is opening the parent table with ShareUpdateExclusive and the indexes with just AccessShare. Let's follow that pattern. * The import code allows setting stats for partitioned indexes while ANALYZE does not, so it's hard to say for sure what we should do for partitioned indexes. I suggest we treat them the same as ordinary indexes. Alternatively, we could refuse to set stats on a partitioned index, but the rest of the import feature is generally permissive about what can be set, so I'm inclined to just treat them like ordinary indexes with respect to locking semantics. Regards, Jeff Davis