pgsql: Fix crash when ALTER TABLE recreates indexes on partitions

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix crash when ALTER TABLE recreates indexes on partitions
Date: 2018-06-29 15:50:42
Message-ID: E1fYvfW-0004vb-Mt@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Fix crash when ALTER TABLE recreates indexes on partitions

The skip_build flag was not being passed correctly when recursing to
indexes on partitions, leading to attempts to rebuild indexes when they
were not yet ready to be rebuilt.

Reported-by: Rajkumar Raghuwanshi
Discussion: https://postgr.es/m/CAKcux6mxNCGsgATwf5CGMF8g4WSupCXicCVMeKUTuWbyxHOMsQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/41372071dfaab97a1a8dca83e32b88413460f477

Modified Files
--------------
src/backend/commands/indexcmds.c | 2 +-
src/test/regress/expected/indexing.out | 8 ++++++++
src/test/regress/sql/indexing.sql | 9 +++++++++
3 files changed, 18 insertions(+), 1 deletion(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-06-29 16:05:25 pgsql: psql: show cloned triggers in partitions
Previous Message Michael Paquier 2018-06-29 13:23:22 pgsql: Replace search.cpan.org with metacpan.org

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-06-29 15:52:58 Re: Server crashed with "TRAP: unrecognized TOAST vartag("1", File: "heaptuple.c", Line: 1490)"
Previous Message Tomas Vondra 2018-06-29 15:03:13 Re: POC: GROUP BY optimization