Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYDPi-0004uu-EN for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 19:16:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYDPf-0007Ui-VR for pgsql-general@arkaria.postgresql.org; Thu, 29 Oct 2020 19:16:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYDPf-0007Ub-Nx for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 19:16:43 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYDPd-000828-AB for pgsql-general@lists.postgresql.org; Thu, 29 Oct 2020 19:16:43 +0000 Received: from [192.168.178.20] (unknown [185.38.49.17]) by mail.i-mark.de (Postfix) with ESMTPSA id 5CF7715843E6 for ; Thu, 29 Oct 2020 20:16:35 +0100 (CET) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 185.38.49.17) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.178.20] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: archive command in streaming replication in windows server To: pgsql-general@lists.postgresql.org References: From: Andreas Kretschmer Message-ID: <1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de> Date: Thu, 29 Oct 2020 20:16:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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