From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Simplify do_pg_start_backup's API by opening pg_tblspc internall
Date: Mon, 04 Dec 2017 23:37:58 +0000
Message-ID: <E1eM0JC-0005yh-Tf@gemulon.postgresql.org> (raw)
Simplify do_pg_start_backup's API by opening pg_tblspc internally.
do_pg_start_backup() expects its callers to pass in an open DIR pointer
for the pg_tblspc directory, but there's no apparent advantage in that.
It complicates the callers without adding any flexibility, and there's no
robustness advantage, since we surely have to be prepared for errors during
the scan of pg_tblspc anyway. In fact, by holding an extra kernel resource
during operations like the preliminary checkpoint, we might be making
things a fraction more failure-prone not less. Hence, remove that argument
and open the directory just for the duration of the actual scan.
Discussion: https://postgr.es/m/28752.1512413887@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/066bc21c0e085e2642ff25cc665c4efad3669d6f
Modified Files
--------------
src/backend/access/transam/xlog.c | 6 ++++--
src/backend/access/transam/xlogfuncs.c | 15 ++-------------
src/backend/replication/basebackup.c | 19 ++++---------------
src/include/access/xlog.h | 2 +-
4 files changed, 11 insertions(+), 31 deletions(-)
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: Simplify do_pg_start_backup's API by opening pg_tblspc internall
In-Reply-To: <E1eM0JC-0005yh-Tf@gemulon.postgresql.org>
References: <E1eM0JC-0005yh-Tf@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