v4-0002-Fixed-small-bugs-to-keep-compiler-quiet.patch
application/octet-stream
Filename: v4-0002-Fixed-small-bugs-to-keep-compiler-quiet.patch
Type: application/octet-stream
Part: 1
Message:
RE: speed up a logical replica setup
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v4-0002
Subject: Fixed small bugs to keep compiler quiet
| File | + | − |
|---|---|---|
| src/bin/pg_basebackup/.gitignore | 1 | 0 |
| src/bin/pg_basebackup/pg_subscriber.c | 5 | 5 |
From 5a356aa7f273221b574c6f0b307cc86905d1cf45 Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Date: Wed, 10 Jan 2024 05:30:23 +0000
Subject: [PATCH v4 2/3] Fixed small bugs to keep compiler quiet
---
src/bin/pg_basebackup/.gitignore | 1 +
src/bin/pg_basebackup/pg_subscriber.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/bin/pg_basebackup/.gitignore b/src/bin/pg_basebackup/.gitignore
index 26048bdbd8..0e5384a1d5 100644
--- a/src/bin/pg_basebackup/.gitignore
+++ b/src/bin/pg_basebackup/.gitignore
@@ -1,5 +1,6 @@
/pg_basebackup
/pg_receivewal
/pg_recvlogical
+/pg_subscriber
/tmp_check/
diff --git a/src/bin/pg_basebackup/pg_subscriber.c b/src/bin/pg_basebackup/pg_subscriber.c
index b96ce26ed7..c2d17dcda3 100644
--- a/src/bin/pg_basebackup/pg_subscriber.c
+++ b/src/bin/pg_basebackup/pg_subscriber.c
@@ -465,7 +465,7 @@ get_sysid_from_conn(const char *conninfo)
sysid = strtou64(PQgetvalue(res, 0, 0), NULL, 10);
- pg_log_info("system identifier is %ld on publisher", sysid);
+ pg_log_info("system identifier is " UINT64_FORMAT " on publisher", sysid);
disconnect_database(conn);
@@ -495,7 +495,7 @@ get_control_from_datadir(const char *datadir)
sysid = cf->system_identifier;
- pg_log_info("system identifier is %ld on subscriber", sysid);
+ pg_log_info("system identifier is " UINT64_FORMAT " on subscriber", sysid);
pfree(cf);
@@ -539,7 +539,7 @@ modify_sysid(const char *pg_resetwal_path, const char *datadir)
if (!dry_run)
update_controlfile(datadir, cf, true);
- pg_log_info("system identifier is %ld on subscriber", cf->system_identifier);
+ pg_log_info("system identifier is " UINT64_FORMAT " on subscriber", cf->system_identifier);
pg_log_info("running pg_resetwal on the subscriber");
@@ -631,7 +631,7 @@ create_logical_replication_slot(PGconn *conn, LogicalRepInfo *dbinfo,
char *slot_name)
{
PQExpBuffer str = createPQExpBuffer();
- PGresult *res;
+ PGresult *res = NULL;
char *lsn = NULL;
bool transient_replslot = false;
@@ -1204,7 +1204,7 @@ main(int argc, char **argv)
}
#endif
- while ((c = getopt_long(argc, argv, "D:P:S:d:t:v",
+ while ((c = getopt_long(argc, argv, "D:P:S:d:nv",
long_options, &option_index)) != -1)
{
switch (c)
--
2.43.0