pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add test for CREATE INDEX CONCURRENTLY with not-so-immutable pre
Date: 2021-06-28 02:19:02
Message-ID: E1lxgrW-00013U-Ie@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate

83158f7 has improved index_set_state_flags() so as it is possible to use
transactional updates when updating pg_index state flags, but there was
not really a test case which stressed directly the possibility it fixed.
This commit adds such a test, using a predicate that looks valid in
appearance but calls a stable function.

Author: Andrey Lepikhov
Discussion: https://postgr.es/m/9b905019-5297-7372-0ad2-e1a4bb66a719@postgrespro.ru
Backpatch-through: 9.6

Branch
------
REL_13_STABLE

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

Modified Files
--------------
src/test/regress/expected/create_index.out | 12 ++++++++++++
src/test/regress/sql/create_index.sql | 13 ++++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-06-28 03:23:55 pgsql: Fix variable initialization with ALTER SUBSCRIPTION DROP PUBLICA
Previous Message Michael Paquier 2021-06-28 01:46:17 pgsql: Make index_set_state_flags() transactional