pgsql: Optimize the origin drop functionality.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Optimize the origin drop functionality.
Date: 2023-02-03 03:13:03
Message-ID: E1pNmVa-001JzT-HS@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Optimize the origin drop functionality.

To interlock against concurrent drops, we use to hold ExclusiveLock on
pg_replication_origin till xact commit. This blocks even concurrent drops
of different origins by tablesync workers. So, instead, lock the specific
origin to interlock against concurrent drops.

This reduces the test time variability in src/test/subscription where
multiple tables are being synced.

Author: Vignesh C
Reviewed-by: Hou Zhijie, Amit Kapila
Discussion: https://postgr.es/m/1412708.1674417574@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e577ff602fe3438ac60771c4a6d027d881619b0

Modified Files
--------------
src/backend/replication/logical/origin.c | 62 +++++++++++++++++---------------
1 file changed, 33 insertions(+), 29 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2023-02-03 03:21:13 pgsql: Reduce code duplication between heapgettup and heapgettup_pagemo
Previous Message Thomas Munro 2023-02-03 01:33:14 pgsql: ci: Upgrade macOS version from 12 to 13.