v23-0008-Avoid-possible-null-report.patch

application/octet-stream

Filename: v23-0008-Avoid-possible-null-report.patch
Type: application/octet-stream
Part: 7
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 v23-0008
Subject: Avoid possible null report
File+
src/bin/pg_basebackup/pg_createsubscriber.c 2 1
From 5ea134e6e74bed7004539bbd87e96c6cfa1d0a8b Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Date: Mon, 19 Feb 2024 04:20:00 +0000
Subject: [PATCH v23 08/13] Avoid possible null report

---
 src/bin/pg_basebackup/pg_createsubscriber.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index ea4eb7e621..f10e8002c6 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -921,7 +921,8 @@ check_subscriber(LogicalRepInfo *dbinfo)
 				 max_lrworkers);
 	pg_log_debug("subscriber: max_replication_slots: %d", max_repslots);
 	pg_log_debug("subscriber: max_worker_processes: %d", max_wprocs);
-	pg_log_debug("subscriber: primary_slot_name: %s", primary_slot_name);
+	if (primary_slot_name)
+		pg_log_debug("subscriber: primary_slot_name: %s", primary_slot_name);
 
 	PQclear(res);
 
-- 
2.41.0.windows.3