Adjust macro name in pg_backup_stop()

Started by Bharath Rupireddyover 3 years ago2 messages
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
1 attachment(s)

Hi, it looks like the commit [1]commit 39969e2a1e4d7f5a37f3ef37d53bbfe171e7d77a Author: Stephen Frost <sfrost@snowman.net> Date: Wed Apr 6 14:41:03 2022 -0400 renamed pg_stop_backup() to
pg_backup_stop() but forgot to rename the associated
PG_STOP_BACKUP_V2_COLS macro. While this is harmless, here's a patch
to rename the macro to be in sync with the function name.

Thoughts?

[1]: commit 39969e2a1e4d7f5a37f3ef37d53bbfe171e7d77a Author: Stephen Frost <sfrost@snowman.net> Date: Wed Apr 6 14:41:03 2022 -0400
commit 39969e2a1e4d7f5a37f3ef37d53bbfe171e7d77a
Author: Stephen Frost <sfrost@snowman.net>
Date: Wed Apr 6 14:41:03 2022 -0400

Remove exclusive backup mode

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachments:

v1-0001-Adjust-macro-name-in-pg_backup_stop.patchapplication/octet-stream; name=v1-0001-Adjust-macro-name-in-pg_backup_stop.patchDownload
From ee8c8a6bc91d40e59d3414042f2dc24adf64a5d7 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Mon, 12 Sep 2022 11:32:11 +0000
Subject: [PATCH v1] Adjust macro name in pg_backup_stop()

Commit 39969e2a1e4d7f5a37f3ef37d53bbfe171e7d77a renamed
pg_stop_backup() to pg_backup_stop() but forgot to rename the
associated PG_STOP_BACKUP_V2_COLS macro. Rename the macro to be
in sync with the function name.
---
 src/backend/access/transam/xlogfuncs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 9cc757f1af..27aeb6e281 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -104,10 +104,10 @@ pg_backup_start(PG_FUNCTION_ARGS)
 Datum
 pg_backup_stop(PG_FUNCTION_ARGS)
 {
-#define PG_STOP_BACKUP_V2_COLS 3
+#define PG_BACKUP_STOP_V2_COLS 3
 	TupleDesc	tupdesc;
-	Datum		values[PG_STOP_BACKUP_V2_COLS] = {0};
-	bool		nulls[PG_STOP_BACKUP_V2_COLS] = {0};
+	Datum		values[PG_BACKUP_STOP_V2_COLS] = {0};
+	bool		nulls[PG_BACKUP_STOP_V2_COLS] = {0};
 
 	bool		waitforarchive = PG_GETARG_BOOL(0);
 	XLogRecPtr	stoppoint;
-- 
2.34.1

#2Michael Paquier
michael@paquier.xyz
In reply to: Bharath Rupireddy (#1)
Re: Adjust macro name in pg_backup_stop()

On Mon, Sep 12, 2022 at 05:06:16PM +0530, Bharath Rupireddy wrote:

Hi, it looks like the commit [1] renamed pg_stop_backup() to
pg_backup_stop() but forgot to rename the associated
PG_STOP_BACKUP_V2_COLS macro. While this is harmless, here's a patch
to rename the macro to be in sync with the function name.

This is the last reference to pg_start/stop_backup() in the code, so
done.
--
Michael