pg_receivewal: remove extra conn = NULL; in StreamLog
Hi,
It seems there's a redundant assignment statement conn = NULL in
pg_receivewal's StreamLog function. Attaching a tiny patch herewith.
Thoughts?
Regards,
Bharath Rupireddy.
Attachments:
v1-0001-pg_receivewal-remove-extra-conn-NULL-in-StreamLog.patchapplication/octet-stream; name=v1-0001-pg_receivewal-remove-extra-conn-NULL-in-StreamLog.patchDownload
From 2d5e1734db0b8a6d9c7f315d985e4cae4f2b0cd8 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Sat, 28 Aug 2021 11:53:53 +0000
Subject: [PATCH v1] pg_receivewal: remove extra conn = NULL; in StreamLog
---
src/bin/pg_basebackup/pg_receivewal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index 4474273daf..9d1843728d 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -449,8 +449,6 @@ StreamLog(void)
FreeWalDirectoryMethod();
pg_free(stream.walmethod);
-
- conn = NULL;
}
/*
--
2.25.1
On 28 Aug 2021, at 14:10, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
It seems there's a redundant assignment statement conn = NULL in
pg_receivewal's StreamLog function. Attaching a tiny patch herewith.
Thoughts?
Agreed, while harmless this is superfluous since conn is already set to NULL
after the PQfinish call a few lines up (which was added in a4205fa00d526c3).
Unless there are objections I’ll apply this tomorrow or Monday.
--
Daniel Gustafsson https://vmware.com/
On Sun, Aug 29, 2021 at 1:27 AM Daniel Gustafsson <daniel@yesql.se> wrote:
On 28 Aug 2021, at 14:10, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
It seems there's a redundant assignment statement conn = NULL in
pg_receivewal's StreamLog function. Attaching a tiny patch herewith.
Thoughts?Agreed, while harmless this is superfluous since conn is already set to NULL
after the PQfinish call a few lines up (which was added in a4205fa00d526c3).
Unless there are objections I’ll apply this tomorrow or Monday.
Thanks for picking this up. I added this to CF to not lose it in the
wild - https://commitfest.postgresql.org/34/3317/
Regards,
Bharath Rupireddy.
On 1 Sep 2021, at 10:58, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
On Sun, Aug 29, 2021 at 1:27 AM Daniel Gustafsson <daniel@yesql.se> wrote:
On 28 Aug 2021, at 14:10, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
It seems there's a redundant assignment statement conn = NULL in
pg_receivewal's StreamLog function. Attaching a tiny patch herewith.
Thoughts?Agreed, while harmless this is superfluous since conn is already set to NULL
after the PQfinish call a few lines up (which was added in a4205fa00d526c3).
Unless there are objections I’ll apply this tomorrow or Monday.Thanks for picking this up. I added this to CF to not lose it in the
wild - https://commitfest.postgresql.org/34/3317/
Pushed to master, and entry closed. Thanks.
--
Daniel Gustafsson https://vmware.com/