Re: archive command in streaming replication in windows server

From: Atul Kumar <akumar14871(at)gmail(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: archive command in streaming replication in windows server
Date: 2020-10-29 19:36:42
Message-ID: CA+ONtZ7Sd4HcdiY6YYGE2WCE05VxaVU0hbdbucJtEwUxV4bRFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

Still it is not getting copied in the archive directory

show archive_command
"copy "%p" "C:\Program Files\PostgreSQL\10\archive_files\%f""

in postgresql.conf
archive_command = 'copy "%p" "C:\\Program
Files\\PostgreSQL\\10\\archive_files\\%f"'

and when I restarted the postgres service using command prompt I am
getting the below
alert in cmd
C:\Program Files\PostgreSQL\10\bin> 0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.
0 file(s) copied.

Please help.

Regards,
Atul

On 10/30/20, Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> wrote:
>
>
> Am 29.10.20 um 20:12 schrieb Atul Kumar:
>> hi,
>>
>> I am trying to configure streaming replication on windows server.
>>
>> i have postgres version 10
>>
>> after successful installation of postgres, I create a archive
>> directory "C:\Program Files\PostgreSQL\10\archive_files" and here in
>> archive_flies, I need to copy the wal files.
>>
>> in postgresql conf file I gave path in archive_command like this:
>>
>> 'copy %p C:\Program Files\PostgreSQL\10\archive_files\%f'
>>
>> After successfully restarting the postgres service, I could not find
>> any file in the archive directory.
>>
>> and when I am giving command
>> show archive_command
>>
>> I get this as an output
>>
>> "copy %p C:Program FilesPostgreSQL archive_files%f"
>>
>> So please help in setting me the correct path format.
>
> from the fine documentation an example:
>
> archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p
> /mnt/server/archivedir/%f' # Unix
> archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
>
>
> https://www.postgresql.org/docs/current/continuous-archiving.html
>
>
> Regards, Andreas
>
> --
> 2ndQuadrant - The PostgreSQL Support Company.
> www.2ndQuadrant.com
>
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2020-10-29 20:07:04 Re: Multi-row insert: error at terminal row. [RESOLVED]
Previous Message Andreas Kretschmer 2020-10-29 19:16:38 Re: archive command in streaming replication in windows server