Re: REPACK (CONCURRENTLY) can crash a logical decoding session

Поиск
Список
Период
Сортировка
Искать

Re: REPACK (CONCURRENTLY) can crash a logical decoding session

От:
Alexander Lakhin <exclusion@gmail.com>
Дата:
Hello Sawada-san,

11.09.2026 20:56, Masahiko Sawada wrote:
No objections here -- they look good to me too.  The isolation spec
addition is great, thanks.
Thank you for looking at the patches! Pushed.

A recent failure of repack_decode.spec emitted by skink [1]:
# diff -U3 /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out
# --- /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out    2026-09-25 23:32:42.088355239 +0200
# +++ /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out    2026-09-29 18:01:56.818281263 +0200
# @@ -26,7 +26,7 @@
#  
#  count
#  -----
# -    8
# +   12
#  (1 row)
#  
#  injection_points_detach
# 1 of 16 tests failed.

apparently shows that the test is not immune to autovacuum.

I can reproduce such failures locally with:
--- a/src/test/modules/injection_points/Makefile
+++ b/src/test/modules/injection_points/Makefile
@@ -21,3 +21,3 @@ ISOLATION = basic \
            repack_commit_race \
-           repack_decode \
+           $(shell printf 'repack_decode %.0s' `seq 100`) \
            repack_missingval \

and
echo "autovacuum_naptime = 1" >/tmp/temp.config
TEMP_CONFIG=/tmp/temp.config make -s check -C src/test/modules/injection_points/
...
ok 9         - repack_decode                             272 ms
# diff -U3 .../src/test/modules/injection_points/expected/repack_decode.out .../src/test/modules/injection_points/output_iso/results/repack_decode.out
# --- .../src/test/modules/injection_points/expected/repack_decode.out    2026-09-29 14:51:55.810851901 -0400
# +++ .../src/test/modules/injection_points/output_iso/results/repack_decode.out  2026-09-29 15:09:00.871263055 -0400
# @@ -26,7 +26,7 @@
#  
#  count
#  -----
# -    8
# +   12
#  (1 row)
#  
#  injection_points_detach
not ok 10    - repack_decode                             302 ms
...
# 26 of 115 tests failed.

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2026-09-29%2014%3A01%3A15

Best regards,
Alexander

Re: REPACK (CONCURRENTLY) can crash a logical decoding session

От:
Masahiko Sawada <sawada.mshk@gmail.com>
Дата:
Вложения:
On Tue, Sep 29, 2026 at 1:00 PM Alexander Lakhin  wrote:
>
> Hello Sawada-san,
>
> 11.09.2026 20:56, Masahiko Sawada wrote:
>
> No objections here -- they look good to me too.  The isolation spec
> addition is great, thanks.
>
> Thank you for looking at the patches! Pushed.
>
>
> A recent failure of repack_decode.spec emitted by skink [1]:
> # diff -U3 /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out
> # --- /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out    2026-09-25 23:32:42.088355239 +0200
> # +++ /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out    2026-09-29 18:01:56.818281263 +0200
> # @@ -26,7 +26,7 @@
> #
> #  count
> #  -----
> # -    8
> # +   12
> #  (1 row)
> #
> #  injection_points_detach
> # 1 of 16 tests failed.
>
> apparently shows that the test is not immune to autovacuum.

Thank you for the report. My bad.

I've attached the patch that should fix the issue.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Re: REPACK (CONCURRENTLY) can crash a logical decoding session

От:
Masahiko Sawada <sawada.mshk@gmail.com>
Дата:
On Wed, Sep 30, 2026 at 10:19 AM Masahiko Sawada  wrote:
>
> On Tue, Sep 29, 2026 at 1:00 PM Alexander Lakhin  wrote:
> >
> > Hello Sawada-san,
> >
> > 11.09.2026 20:56, Masahiko Sawada wrote:
> >
> > No objections here -- they look good to me too.  The isolation spec
> > addition is great, thanks.
> >
> > Thank you for looking at the patches! Pushed.
> >
> >
> > A recent failure of repack_decode.spec emitted by skink [1]:
> > # diff -U3 /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out
> > # --- /home/bf/bf-build/skink-master/HEAD/pgsql/src/test/modules/injection_points/expected/repack_decode.out    2026-09-25 23:32:42.088355239 +0200
> > # +++ /home/bf/bf-build/skink-master/HEAD/pgsql.build/testrun/injection_points/isolation/results/repack_decode.out    2026-09-29 18:01:56.818281263 +0200
> > # @@ -26,7 +26,7 @@
> > #
> > #  count
> > #  -----
> > # -    8
> > # +   12
> > #  (1 row)
> > #
> > #  injection_points_detach
> > # 1 of 16 tests failed.
> >
> > apparently shows that the test is not immune to autovacuum.
>
> Thank you for the report. My bad.
>
> I've attached the patch that should fix the issue.

Pushed.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com


FAQ