pgsql: Fix REPACK CONCURRENTLY for stored generated columns
pgsql: Fix REPACK CONCURRENTLY for stored generated columns
От:
Álvaro Herrera <alvherre@kurilemu.de>
Дата:
Fix REPACK CONCURRENTLY for stored generated columns In order to replay concurrent changes, REPACK CONCURRENTLY needs the pg_attrdef tuples for the transient table to be there, in case a tuple is modified concurrently with REPACK and requires to store the value from the generated column (which, with the current arrangements, means all tuples concurrently updated or inserted). Fix by creating a copy of them from the original table. Add a test that tickles the bug. Author: Antonin Houska Reported-by: Ewan Young Diagnosed-by: Ewan Young Reviewed-by: Ewan Young Backpatch-through: 19 Discussion: https://postgr.es/m/CAON2xHMrELwx9vKg6niSf8fMBA=-MGXmG=MPQU6+vMVhGjF8kQ@mail.gmail.com Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fb284f2f9bdb9dd5e866132f7d0b8eeaa972e521 Modified Files -------------- src/backend/commands/repack.c | 103 ++++++++++++++++++++- .../modules/injection_points/specs/repack.spec | 3 +- 2 files changed, 104 insertions(+), 2 deletions(-)