pgsql: Use WaitLatch() instead of pg_usleep() at the end of backups

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use WaitLatch() instead of pg_usleep() at the end of backups
Date: 2021-07-05 23:36:02
Message-ID: E1m0Y8A-0008Ly-PP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use WaitLatch() instead of pg_usleep() at the end of backups

This concerns pg_stop_backup() and BASE_BACKUP, when waiting for the
WAL segments required for a backup to be archived. This simplifies a
bit the handling of the wait event used in this code path.

Author: Bharath Rupireddy
Reviewed-by: Michael Paquier, Stephen Frost
Discussion: https://postgr.es/m/CALj2ACU4AdPCq6NLfcA-ZGwX7pPCK5FgEj-CAU0xCKzkASSy_A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2aca19f2989aa938ece7306678f5494a984ece3f

Modified Files
--------------
src/backend/access/transam/xlog.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2021-07-06 00:25:06 pgsql: Reduce the number of pallocs when building partition bounds
Previous Message Tom Lane 2021-07-05 20:53:21 pgsql: Reduce overhead of cache-clobber testing in LookupOpclassInfo().