From 43e6929bb2945553df021874914ade88743abc1f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 14 Nov 2025 09:08:53 -0500 Subject: doc: double-quote use of %f, %p, and %r in literal commands. Path expansion might expose characters like spaces which would cause command failure, so double-quote the examples. While %f doesn't need quoting since it uses a fixed character set, it is best to be consistent. Discussion: https://postgr.es/m/aROPCQCfvKp9Htk4@momjian.us Backpatch-through: master --- src/backend/utils/misc/postgresql.conf.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 08bcef50c19..fdb37e927de 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -283,7 +283,7 @@ #archive_command = '' # command to use to archive a WAL file # placeholders: %p = path of file to archive # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' + # e.g. 'test ! -f "/mnt/server/archivedir/%f" && cp "%p" "/mnt/server/archivedir/%f"' #archive_timeout = 0 # force a WAL file switch after this # number of seconds; 0 disables @@ -294,7 +294,7 @@ #restore_command = '' # command to use to restore an archived WAL file # placeholders: %p = path of file to restore # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' + # e.g. 'cp "/mnt/server/archivedir/%f" "%p"' #archive_cleanup_command = '' # command to execute at every restartpoint #recovery_end_command = '' # command to execute at completion of recovery -- cgit v1.2.3