pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Have the REPACK decoding worker use timeout values from the stee
4+ messages / 1 participants
[nested] [flat]

* pgsql: Have the REPACK decoding worker use timeout values from the stee
@ 2026-09-17 10:48 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 4+ messages in thread

From: Álvaro Herrera @ 2026-09-17 10:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Have the REPACK decoding worker use timeout values from the steering backend

The worker connects as the table owner in a new session, so a role- or
database-level lock_timeout and transaction_timeout unhelpfully apply to
it, possibly canceling the wait for older transactions.  This cannot be
overridden by the REPACK calling session.  Fix by passing the timeout
values from the steering backend via the DecodingWorkerShared struct and
adopting these values in the worker; this way, values from session-local
SET reach the worker too.

In passing, remove a pointless member from the same struct.

Author: Shihao Zhong <zhong950419@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAGRkXqTYaBjFvjtjPb1+=sZWvt93=2c472bmM+xdG7w9ZvAydA@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/repack.c          |  5 ++++-
src/backend/commands/repack_worker.c   | 11 ++++++++++-
src/include/commands/repack_internal.h |  5 ++++-
3 files changed, 18 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Have the REPACK decoding worker use timeout values from the stee
@ 2026-09-17 10:48 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 4+ messages in thread

From: Álvaro Herrera @ 2026-09-17 10:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Have the REPACK decoding worker use timeout values from the steering backend

The worker connects as the table owner in a new session, so a role- or
database-level lock_timeout and transaction_timeout unhelpfully apply to
it, possibly canceling the wait for older transactions.  This cannot be
overridden by the REPACK calling session.  Fix by passing the timeout
values from the steering backend via the DecodingWorkerShared struct and
adopting these values in the worker; this way, values from session-local
SET reach the worker too.

In passing, remove a pointless member from the same struct.

Author: Shihao Zhong <zhong950419@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAGRkXqTYaBjFvjtjPb1+=sZWvt93=2c472bmM+xdG7w9ZvAydA@mail.gmail.com

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/746a507a391b7c1d333ff969ab08d60575da9630

Modified Files
--------------
src/backend/commands/repack.c          |  5 ++++-
src/backend/commands/repack_worker.c   | 11 ++++++++++-
src/include/commands/repack_internal.h |  5 ++++-
3 files changed, 18 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Have the REPACK decoding worker use temp_file_limit from the ste
@ 2026-11-11 16:19 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 4+ messages in thread

From: Álvaro Herrera @ 2026-11-11 16:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Have the REPACK decoding worker use temp_file_limit from the steering backend

Expand the a62ff0829d6b shenanigans to temp_file_limit, to override any
role- or database-specific configured value with the value from the
current session.

Author: Shihao Zhong <zhong950419@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAGRkXqTYaBjFvjtjPb1+=sZWvt93=2c472bmM+xdG7w9ZvAydA@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/repack.c          | 6 +++++-
src/backend/commands/repack_worker.c   | 4 +++-
src/include/commands/repack_internal.h | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Have the REPACK decoding worker use temp_file_limit from the ste
@ 2026-11-11 16:19 Álvaro Herrera <alvherre@kurilemu.de>
  0 siblings, 0 replies; 4+ messages in thread

From: Álvaro Herrera @ 2026-11-11 16:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Have the REPACK decoding worker use temp_file_limit from the steering backend

Expand the a62ff0829d6b shenanigans to temp_file_limit, to override any
role- or database-specific configured value with the value from the
current session.

Author: Shihao Zhong <zhong950419@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAGRkXqTYaBjFvjtjPb1+=sZWvt93=2c472bmM+xdG7w9ZvAydA@mail.gmail.com

Branch
------
REL_19_STABLE

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

Modified Files
--------------
src/backend/commands/repack.c          | 6 +++++-
src/backend/commands/repack_worker.c   | 4 +++-
src/include/commands/repack_internal.h | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-11-11 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 10:48 pgsql: Have the REPACK decoding worker use timeout values from the stee Álvaro Herrera <alvherre@kurilemu.de>
2026-09-17 10:48 pgsql: Have the REPACK decoding worker use timeout values from the stee Álvaro Herrera <alvherre@kurilemu.de>
2026-11-11 16:19 pgsql: Have the REPACK decoding worker use temp_file_limit from the ste Álvaro Herrera <alvherre@kurilemu.de>
2026-11-11 16:19 pgsql: Have the REPACK decoding worker use temp_file_limit from the ste Álvaro Herrera <alvherre@kurilemu.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox