pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check for two_phase change at end of process_syncing_tables_for_
Date: Fri, 06 Jan 2023 22:28:11 +0000
Message-ID: <E1pDvC7-002OGr-H4@gemulon.postgresql.org> (raw)

Check for two_phase change at end of process_syncing_tables_for_apply.

Previously this function checked to see if we were ready to switch
to two_phase mode at its start, but that's silly: we should check
at the end, after we've done the work that might make us ready.
This simple change removes one sleep cycle from the time needed to
switch to two_phase mode.  In the real world that might not be
worth much, but it shaves a few seconds off the runtime for the
subscription test suite.

Nathan Bossart

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4c032dd8046b145a25032643f536aab83deb19e3

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 51 ++++++++++++++++-------------
1 file changed, 29 insertions(+), 22 deletions(-)



Message-ID: <E1pDvC7-002OGr-H4@gemulon.postgresql.org>
Permalink:  ../E1pDvC7-002OGr-H4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pDvC7-002OGr-H4@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Check for two_phase change at end of process_syncing_tables_for_
  In-Reply-To: <E1pDvC7-002OGr-H4@gemulon.postgresql.org>
  References: <E1pDvC7-002OGr-H4@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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