Content-Length: 2462 | pFad | http://github.com/postgrespro/testgres/pull/113.patch
thub.com
From 3c4b89c9d2cbf199655f501f63d82bdbb0a3d294 Mon Sep 17 00:00:00 2001
From: asavchkov
Date: Wed, 6 Mar 2024 14:22:15 +0700
Subject: [PATCH 1/2] Run the archive command through exec
---
testgres/plugins/pg_probackup2/pg_probackup2/app.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testgres/plugins/pg_probackup2/pg_probackup2/app.py b/testgres/plugins/pg_probackup2/pg_probackup2/app.py
index 07825673..4a145d8c 100644
--- a/testgres/plugins/pg_probackup2/pg_probackup2/app.py
+++ b/testgres/plugins/pg_probackup2/pg_probackup2/app.py
@@ -661,7 +661,7 @@ def set_archiving(
options['archive_mode'] = 'on'
if custom_archive_command is None:
- archive_command = " ".join([f'"{init_params.probackup_path}"',
+ archive_command = " ".join(['exec', f'"{init_params.probackup_path}"',
'archive-push', *self.backup_dir.pb_args])
if os.name == "nt":
archive_command = archive_command.replace("\\", "\\\\")
From 2a3901ebed9f97359f51db37f65d0153daa089d7 Mon Sep 17 00:00:00 2001
From: asavchkov
Date: Wed, 6 Mar 2024 19:38:16 +0700
Subject: [PATCH 2/2] Invoke exec only on Linux
---
testgres/plugins/pg_probackup2/pg_probackup2/app.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/testgres/plugins/pg_probackup2/pg_probackup2/app.py b/testgres/plugins/pg_probackup2/pg_probackup2/app.py
index 4a145d8c..94dcd997 100644
--- a/testgres/plugins/pg_probackup2/pg_probackup2/app.py
+++ b/testgres/plugins/pg_probackup2/pg_probackup2/app.py
@@ -661,9 +661,13 @@ def set_archiving(
options['archive_mode'] = 'on'
if custom_archive_command is None:
- archive_command = " ".join(['exec', f'"{init_params.probackup_path}"',
+ archive_command = " ".join([f'"{init_params.probackup_path}"',
'archive-push', *self.backup_dir.pb_args])
- if os.name == "nt":
+ if os.name == 'posix':
+ # Dash produces a core dump when it gets a SIGQUIT from its
+ # child process so replace the shell with pg_probackup
+ archive_command = 'exec ' + archive_command
+ elif os.name == "nt":
archive_command = archive_command.replace("\\", "\\\\")
archive_command += f' --instance={instance}'
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/postgrespro/testgres/pull/113.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy