v27-0005-Fix-error-for-windows.patch
text/x-patch
Filename: v27-0005-Fix-error-for-windows.patch
Type: text/x-patch
Part: 0
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 v27-0005
Subject: Fix error for windows
| File | + | − |
|---|---|---|
| src/bin/pg_basebackup/pg_createsubscriber.c | 6 | 0 |
From 753c7e8322a6eb61af97760550974581fb454ce2 Mon Sep 17 00:00:00 2001
From: Shlok Kyal <shlok.kyal.oss@gmail.com>
Date: Fri, 8 Mar 2024 12:26:45 +0530
Subject: [PATCH v27 5/5] Fix error for windows
'sub_base_conninfo' variable should not have 'host' set to 'opt.socket_dir' in case of Windows.
---
src/bin/pg_basebackup/pg_createsubscriber.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index 85bbc3ba8f..571e3e0a55 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -1891,8 +1891,14 @@ main(int argc, char **argv)
exit(1);
pg_log_info("validating connection string on subscriber");
+
+#ifdef WIN32
+ sub_base_conninfo = psprintf("port=%s user=%s fallback_application_name=%s",
+ opt.sub_port, opt.sub_username, progname);
+#else
sub_base_conninfo = psprintf("host=%s port=%s user=%s fallback_application_name=%s",
opt.socket_dir, opt.sub_port, opt.sub_username, progname);
+#endif
if (opt.database_names.head == NULL)
{
--
2.41.0.windows.3