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}' pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy