pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedarchive command in streaming replication in windows server
4+ messages / 3 participants
[nested] [flat]
* archive command in streaming replication in windows server
@ 2020-10-29 19:12 Atul Kumar <akumar14871@gmail.com>
2020-10-29 19:16 ` Re: archive command in streaming replication in windows server Andreas Kretschmer <andreas@a-kretschmer.de>
0 siblings, 1 reply; 4+ messages in thread
From: Atul Kumar @ 2020-10-29 19:12 UTC (permalink / raw)
To: pgsql-general <pgsql-general@lists.postgresql.org>
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.
My target is to configure streaming replication on same windows
machine using 2 differnet instances having different ports.(like
example master will be on 5432 and slave will be 5433).
Regards,
Atul
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: archive command in streaming replication in windows server
2020-10-29 19:12 archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
@ 2020-10-29 19:16 ` Andreas Kretschmer <andreas@a-kretschmer.de>
2020-10-29 19:36 ` Re: archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Kretschmer @ 2020-10-29 19:16 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: archive command in streaming replication in windows server
2020-10-29 19:12 archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
2020-10-29 19:16 ` Re: archive command in streaming replication in windows server Andreas Kretschmer <andreas@a-kretschmer.de>
@ 2020-10-29 19:36 ` Atul Kumar <akumar14871@gmail.com>
2020-10-30 05:23 ` Re: archive command in streaming replication in windows server Loles <lolesft@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Atul Kumar @ 2020-10-29 19:36 UTC (permalink / raw)
To: Andreas Kretschmer <andreas@a-kretschmer.de>; +Cc: pgsql-general@lists.postgresql.org
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@a-kretschmer.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
>
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: archive command in streaming replication in windows server
2020-10-29 19:12 archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
2020-10-29 19:16 ` Re: archive command in streaming replication in windows server Andreas Kretschmer <andreas@a-kretschmer.de>
2020-10-29 19:36 ` Re: archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
@ 2020-10-30 05:23 ` Loles <lolesft@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Loles @ 2020-10-30 05:23 UTC (permalink / raw)
To: Atul Kumar <akumar14871@gmail.com>; +Cc: Andreas Kretschmer <andreas@a-kretschmer.de>; pgsql-general@lists.postgresql.org
I would try..
Read the server log
Try copying to another simpler path like C:\wal_archives
Maybe blankspaces give problems
Have you forgotten to configure any other parameter like max_wal_senders?
I hope some of this hemos you
Loles
El jue., 29 oct. 2020 20:36, Atul Kumar <akumar14871@gmail.com> escribió:
> 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@a-kretschmer.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
> >
> >
> >
> >
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-10-30 05:23 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 19:12 archive command in streaming replication in windows server Atul Kumar <akumar14871@gmail.com>
2020-10-29 19:16 ` Andreas Kretschmer <andreas@a-kretschmer.de>
2020-10-29 19:36 ` Atul Kumar <akumar14871@gmail.com>
2020-10-30 05:23 ` Loles <lolesft@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox