pgsql: Wake up a subscription's replication worker processes after DDL. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Wake up a subscription's replication worker processes after DDL.
Date
Msg-id E1pDvC7-002OGs-HV@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Wake up a subscription's replication worker processes after DDL.

Waken related worker processes immediately at commit of a transaction
that has performed ALTER SUBSCRIPTION (including the RENAME and
OWNER variants).  This reduces the response time for such operations.
In the real world that might not be worth much, but it shaves several
seconds off the runtime for the subscription test suite.

In the case of PREPARE, we just throw away this notification state;
it doesn't seem worth the work to preserve it.  The workers will
still react after the eventual COMMIT PREPARED, but not as quickly.

Nathan Bossart

Discussion: https://postgr.es/m/20221122004119.GA132961@nathanxps13

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xact.c        |  6 ++++
src/backend/commands/alter.c             |  4 +++
src/backend/commands/subscriptioncmds.c  |  6 ++++
src/backend/replication/logical/worker.c | 52 ++++++++++++++++++++++++++++++++
src/include/replication/logicalworker.h  |  4 +++
5 files changed, 72 insertions(+)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Allow hyphens in ltree labels
Next
From: David Rowley
Date:
Subject: pgsql: Add additional regression tests for select_active_windows