On Sat, Aug 29, 2026 at 4:52 AM Nathan Bossart <[email protected]> wrote: > This is probably the way to go for v19. As you note, the analogous VACUUM > command has long ERROR'd, and we could always look into removing this > restriction in the future. I'd rather do it that way than ship an > incorrect fix in v19 that will be tougher to back out.
I'm ok with this. I have a few review comments on Antonin's patch. As with my patch, I think it would be better to document the restriction and add tests covering the following cases: - plain REPACK is allowed in a transaction block - REPACK (ANALYZE) is not allowed in a transaction block - REPACK (ANALYZE) is not allowed from a function + * Technically, transaction block is not a problem for REPACK + * (ANALYZE), but if it's called from a pl/pgsql function, Since it can also be called from procedures, functions and DO blocks, mentioning only a PL/pgSQL function seems too narrow. + * cluster_rel() might start a new transaction while SPI session is in Is this correct? It seems that the new transaction for ANALYZE is started in process_single_relation(), not in cluster_rel(). + * that's just consistent with VACUUM (FULL, ANALYZE), which is a + * synonym for REPACK (ANALYZE). Is VACUUM (FULL, ANALYZE) really a synonym for REPACK (ANALYZE)? Regards, -- Fujii Masao
