pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Don't reset relhasindex for partitioned tables on ANALYZE 2+ messages / 1 participants [nested] [flat]
* pgsql: Don't reset relhasindex for partitioned tables on ANALYZE @ 2021-07-01 16:58 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2021-07-01 16:58 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't reset relhasindex for partitioned tables on ANALYZE Commit 0e69f705cc1a introduced code to analyze partitioned table; however, that code fails to preserve pg_class.relhasindex correctly. Fix by observing whether any indexes exist rather than accidentally falling through to assuming none do. Backpatch to 14. Author: Alexander Pyhalov <a.pyhalov@postgrespro.ru> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CALNJ-vS1R3Qoe5t4tbzxrkpBtzRbPq1dDcW4RmA_a+oqweF30w@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d700518d744e53994fdded14b23ebc15b031b0dd Modified Files -------------- src/backend/commands/analyze.c | 32 +++++++++++++++++++++++--------- src/test/regress/expected/vacuum.out | 22 ++++++++++++++++++++++ src/test/regress/sql/vacuum.sql | 16 ++++++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Don't reset relhasindex for partitioned tables on ANALYZE @ 2021-07-01 16:58 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2021-07-01 16:58 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't reset relhasindex for partitioned tables on ANALYZE Commit 0e69f705cc1a introduced code to analyze partitioned table; however, that code fails to preserve pg_class.relhasindex correctly. Fix by observing whether any indexes exist rather than accidentally falling through to assuming none do. Backpatch to 14. Author: Alexander Pyhalov <a.pyhalov@postgrespro.ru> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CALNJ-vS1R3Qoe5t4tbzxrkpBtzRbPq1dDcW4RmA_a+oqweF30w@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/be280cdad2985749e558212b0a5c8bdf9abb4e6a Modified Files -------------- src/backend/commands/analyze.c | 32 +++++++++++++++++++++++--------- src/test/regress/expected/vacuum.out | 22 ++++++++++++++++++++++ src/test/regress/sql/vacuum.sql | 16 ++++++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-07-01 16:58 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-07-01 16:58 pgsql: Don't reset relhasindex for partitioned tables on ANALYZE Alvaro Herrera <alvherre@alvh.no-ip.org> 2021-07-01 16:58 pgsql: Don't reset relhasindex for partitioned tables on ANALYZE Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox