Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBq5V-0002Wk-Ah for pgsql-admin@arkaria.postgresql.org; Thu, 04 Apr 2019 00:18:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBq5U-0005Xu-0h for pgsql-admin@arkaria.postgresql.org; Thu, 04 Apr 2019 00:18:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBq5T-0005Xl-AT for pgsql-admin@lists.postgresql.org; Thu, 04 Apr 2019 00:18:35 +0000 Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBq5Q-0008D0-1H for pgsql-admin@lists.postgresql.org; Thu, 04 Apr 2019 00:18:34 +0000 Received: from resomta-ch2-16v.sys.comcast.net ([69.252.207.112]) by resqmta-ch2-05v.sys.comcast.net with ESMTP id BpjchxprrN6PaBq5KhNYHe; Thu, 04 Apr 2019 00:18:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1554337106; bh=CAzY5Glcgfsq2cov5TMQcSl1auCr6uN/d8vYckEZHss=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=ITYMB7qymOdBArDGeVQf062NOnIGZO226QXDdbqJdIFjW5gb3aqERu+MEvF8XCC2+ Iv1N7VKmyUCxrr3XJfjMaHs7eWyiI6Oxib7nGtmKV00RMIa2YId+hiIbowlLBzwUnW o+BqRfiTJItWseuXZDpJq4Cz78kcDqTljxM05+Z7M4uBh5nh6vfJAN0H7u0VJq1q9S xmtrbYu3PhT57VvJI9CSq/DxLybGvgRlWpKxR1xS2yPF3V5iTA2zFfYbZ7S6rklTJf RgWBali0oaaF000sIJLhcIZwUNsSzmpzJO2WY5Ziz++ATXJQ2zzVPT1gNGhAg924yg 0VRVn7vQ9zfKw== Received: from jsievers.comcast.net ([67.173.71.136]) by resomta-ch2-16v.sys.comcast.net with ESMTPA id Bq5JhUiCeiROnBq5KhLR8B; Thu, 04 Apr 2019 00:18:26 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduuddrtdeggdefudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfgvrhhrhicuufhivghvvghrshcuoehgshhivghvvghrshduleestghomhgtrghsthdrnhgvtheqnecukfhppeeijedrudejfedrjedurddufeeinecurfgrrhgrmhephhgvlhhopehjshhivghvvghrshdrtghomhgtrghsthdrnhgvthdpihhnvghtpeeijedrudejfedrjedurddufeeipdhmrghilhhfrhhomhepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepphhgshhqlhdqrggumhhinheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheplhgvrhhohigpthgvnhhnihhsohhnsehprhhoughighihrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-Xfinity-VMeta: sc=-100;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id EF97026005A; Wed, 3 Apr 2019 19:18:24 -0500 (CDT) From: Jerry Sievers To: LEROY TENNISON Cc: Pgsql-admin Subject: Re: archive_command options? References: <1222332414.512321.1554322572303.ref@mail.yahoo.com> <1222332414.512321.1554322572303@mail.yahoo.com> Date: Wed, 03 Apr 2019 19:18:24 -0500 In-Reply-To: <1222332414.512321.1554322572303@mail.yahoo.com> (LEROY TENNISON's message of "Wed, 3 Apr 2019 20:16:12 +0000 (UTC)") Message-ID: <87mul6pqr3.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk LEROY TENNISON writes: > Postgresql documentation lists the following as an archive command > for log shipping: > > archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/ > server/archivedir/%f' > > The problem is that it is very fragile. If anything breaks the copy > (either system failing, network issues) then log shipping stops > because the file exists in some intermediate state. The result is > that logs build up on the source system filling disk space. I've had > to deal with a few of these this week, in two cases the file system > was 98% full. Is there a reason rsync isn't used? It has the > ability to restart interrupted transfers. I don't want to use it > only to find out i got myself into another predicament. Any other > less-fragile options? Thanks for the help. You are free to use any $better thing as archive command. The classic example given in the docs is appealing for simplicity's sake. I don't understand your piece about "restart interrupted transfers". Postgres will only archive 1 file at a time anyhow and will retry/restart till whatever your archive_command is returns true. 16M WAL segments aren't these days large enough IMO that being able to carry on a half-copied file is compelling. HTH > > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net