pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent reindex of invalid indexes on TOAST tables
2+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent reindex of invalid indexes on TOAST tables
@ 2020-03-10 06:41 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2020-03-10 06:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent reindex of invalid indexes on TOAST tables

Such indexes can only be duplicated leftovers of a previously failed
REINDEX CONCURRENTLY command, and a valid equivalent is guaranteed to
exist.  As toast indexes can only be dropped if invalid, reindexing
these would lead to useless duplicated indexes that can't be dropped
anymore, except if the parent relation is dropped.

Thanks to Justin Pryzby for reminding that this problem was reported
long ago during the review of the original patch of REINDEX
CONCURRENTLY, but the issue was never addressed.

Reported-by: Sergei Kornilov, Justin Pryzby
Author: Julien Rouhaud
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/36712441546604286%40sas1-890ba5c2334a.qloud-c.yandex.net
Discussion: https://postgr.es/m/20200216190835.GA21832@telsasoft.com
Backpatch-through: 12

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/61d7c7bce3686ec02bd64abac742dd35ed9b9b01

Modified Files
--------------
src/backend/catalog/index.c         | 28 ++++++++++++++++++++++++++++
src/backend/commands/indexcmds.c    | 10 ++++++++++
src/backend/utils/cache/lsyscache.c | 23 +++++++++++++++++++++++
src/include/utils/lsyscache.h       |  1 +
4 files changed, 62 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Prevent reindex of invalid indexes on TOAST tables
@ 2020-03-10 06:41 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2020-03-10 06:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent reindex of invalid indexes on TOAST tables

Such indexes can only be duplicated leftovers of a previously failed
REINDEX CONCURRENTLY command, and a valid equivalent is guaranteed to
exist.  As toast indexes can only be dropped if invalid, reindexing
these would lead to useless duplicated indexes that can't be dropped
anymore, except if the parent relation is dropped.

Thanks to Justin Pryzby for reminding that this problem was reported
long ago during the review of the original patch of REINDEX
CONCURRENTLY, but the issue was never addressed.

Reported-by: Sergei Kornilov, Justin Pryzby
Author: Julien Rouhaud
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/36712441546604286%40sas1-890ba5c2334a.qloud-c.yandex.net
Discussion: https://postgr.es/m/20200216190835.GA21832@telsasoft.com
Backpatch-through: 12

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8bca5f93547c77f3beb5ac679d6471504fc09a43

Modified Files
--------------
src/backend/catalog/index.c         | 28 ++++++++++++++++++++++++++++
src/backend/commands/indexcmds.c    | 10 ++++++++++
src/backend/utils/cache/lsyscache.c | 23 +++++++++++++++++++++++
src/include/utils/lsyscache.h       |  1 +
4 files changed, 62 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-03-10 06:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 06:41 pgsql: Prevent reindex of invalid indexes on TOAST tables Michael Paquier <michael@paquier.xyz>
2020-03-10 06:41 pgsql: Prevent reindex of invalid indexes on TOAST tables Michael Paquier <michael@paquier.xyz>

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