Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE
Date: 2026-11-09 10:00:06
Message-ID: CABPTF7X5BoiFF48RrqAa6vcY0naNmsX_ArL-VybiV3ULxgW5VQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 9, 2026 at 11:45 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> Note also that I have changed the SQL function to use a integer for
> the restart time, defaulting to -1 to map with the never-restart.
> Passing down a restart time of 0 also makes the test faster, as the
> worker is restarted without a delay.

That's a clever trick. I did not pay much attention to making tests
faster by shortening the interval like this before. I found two
similar test cases for speedup(027_nosuperuser.pl and
033_run_as_table_owner.pl). With the patch of setting
wal_retrieve_retry_interval to 100ms, the combined runtime decreased
from roughly 11.56s to 8s in local runs without parallelism.

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

Attachment Content-Type Size
0001-Speed-up-logical-replication-permission-tests.patch application/octet-stream 1.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-11-09 10:30:09 Re: Honor inherited ownership when finishing prepared transactions
Previous Message Etsuro Fujita 2026-11-09 09:35:29 Update comments in functions for statistics import in postgres_fdw.c