pgsql: Fix assertion if index is dropped during REFRESH CONCURRENTLY

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix assertion if index is dropped during REFRESH CONCURRENTLY
Date: 2024-02-05 09:28:32
Message-ID: E1rWvHE-004kv4-6B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assertion if index is dropped during REFRESH CONCURRENTLY

When assertions are disabled, the built SQL statement is invalid and
you get a "syntax error". So this isn't a serious problem, but let's
avoid the assertion failure.

Backpatch to all supported versions.

Reviewed-by: Noah Misch

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/add8bc9b8c31fd0c7acfd64a4e2af71ea7b6b58c

Modified Files
--------------
src/backend/commands/matview.c | 7 +++++--
src/test/regress/expected/matview.out | 16 ++++++++++++++++
src/test/regress/sql/matview.sql | 17 +++++++++++++++++
3 files changed, 38 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Aleksander Alekseev 2024-02-05 12:48:41 Re: pgsql: Generate syscache info from catalog files
Previous Message Amit Kapila 2024-02-05 05:28:01 pgsql: Enhance libpqrcv APIs to support slot synchronization.