Re: REPACK (CONCURRENTLY) might keep dropped-column data

From: Alvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Radim Marek <radim(at)boringsql(dot)com>, Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: REPACK (CONCURRENTLY) might keep dropped-column data
Date: 2026-10-05 11:35:00
Message-ID: asOEsmPw75ifqMua@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

On 2026-Oct-05, Fujii Masao wrote:

> repack_dropped isolation test should also be listed in Makefile, in
> addition to meson.build?

Oh, right.

> +teardown {
> + DROP TABLE repack_dropped;
> + DROP FUNCTION repack_dropped_f;
> +}
>
> Should teardown also drop the injection_points extension created by
> setup, as the other tests that create the injection_points extension
> do?
>
> This missing DROP seems harmless with the current Meson test order, since
> repack_missingval runs next, uses CREATE EXTENSION IF NOT EXISTS, and
> then drops the extension. However, that seems fragile.

Hmm, agreed, let's do this also.

I think the repeated creating/dropping is a bit wasteful though and we
don't need it. Wouldn't it make more sense to have all tests use CREATE
IF NOT EXISTS and then remove all the DROPs of it? We would end up
having the extension after the tests are run, but since the database is
specifically created to run the isolation tests, it's not a problem if
it remains there. The attached patch would do that. (I am proposing
this change just for pg20.)

Thanks!

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

Attachment Content-Type Size
cine-injpts.patch text/x-diff 11.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2026-10-05 11:48:10 Re: Reducing relcache memory usage 2: shrink sizeof(RelationData)
Previous Message Peter Eisentraut 2026-10-05 11:25:18 Re: pgindent to ignore build directories