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 1k3rSX-0003YV-L1 for pgsql-general@arkaria.postgresql.org; Fri, 07 Aug 2020 01:46:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k3rSW-00018W-Jx for pgsql-general@arkaria.postgresql.org; Fri, 07 Aug 2020 01:46:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3rSW-00018O-1G for pgsql-general@lists.postgresql.org; Fri, 07 Aug 2020 01:46:12 +0000 Received: from resqmta-ch2-12v.sys.comcast.net ([2001:558:fe21:29:69:252:207:44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3rST-0007IB-SF for pgsql-general@lists.postgresql.org; Fri, 07 Aug 2020 01:46:11 +0000 Received: from resomta-ch2-02v.sys.comcast.net ([69.252.207.98]) by resqmta-ch2-12v.sys.comcast.net with ESMTP id 3qsNkbvnC8dHA3rSQk9Dh5; Fri, 07 Aug 2020 01:46:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1596764766; bh=mb9kohbwOXBsPVBUy5TeXvN6whYuaj1VxmYAjk4iMUg=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=JmrG1MFe7xPdUFzyD2NDi3wMeVe8OJo2UXmvmHLnHJoTuZmZ6ioR6jiDE8nWBg776 mJfJSor/MEq8f6txVOx+mZaHgnkpV8FFYL7i+/dvUDLZhjYP+GV0Uv0zpk9RgbPdTp 8jIr/Kv/1t00Ha4Cyq9kUCX+hszVuqeH0vGVFg8nQ4Pzl1VPR6ynxa0aHiTzYVotIZ I6xknW9mAM3rk0wV+bF9ZLt41dbSJfAE/9cmr373bJQLZjI2zw5pvmFfJyvld+5PAr PqYH/tYhEjzQynd2BA06gkL15NeAhMXcP1yXfx3Ei7+OLJb7LLE3iD4NM68IijSOGe DE1qGTZadDKqQ== Received: from jsievers.comcast.net ([12.187.116.132]) by resomta-ch2-02v.sys.comcast.net with ESMTPA id 3rSGkhNr06xJa3rSHke8EV; Fri, 07 Aug 2020 01:46:04 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduiedrkedugdehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfgvrhhrhicuufhivghvvghrshcuoehgshhivghvvghrshduleestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnhepieejueetieefuedttddtieeiveeugeeiteeuhfeuiefhueelgfeiveduteffvdelnecukfhppeduvddrudekjedrudduiedrudefvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehjshhivghvvghrshdrtghomhgtrghsthdrnhgvthdpihhnvghtpeduvddrudekjedrudduiedrudefvddpmhgrihhlfhhrohhmpehgshhivghvvghrshduleestghomhgtrghsthdrnhgvthdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopeigohhfsehthhgvsghuihhlugdrtghomh X-Xfinity-VMeta: sc=-100.00;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id F2A3426005A; Thu, 6 Aug 2020 20:45:55 -0500 (CDT) From: Jerry Sievers To: Christophe Pettus Cc: "pgsql-generallists.postgresql.org" Subject: Re: Advancing the archiver position safely References: <520661CC-7D55-4E6C-9474-35FA7974F8D0@thebuild.com> Date: Thu, 06 Aug 2020 20:45:55 -0500 In-Reply-To: <520661CC-7D55-4E6C-9474-35FA7974F8D0@thebuild.com> (Christophe Pettus's message of "Thu, 6 Aug 2020 17:43:29 -0700") Message-ID: <87ft8zfcto.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 Christophe Pettus writes: > I've encountered a rather unusual situation (PostgreSQL 9.6). On a > particular server, for reasons I've not fully diagnosed, the archiver > thinks that the current WAL segment to be archived is > 0000000200003B6800000062. This is unfortunate, because the oldest WAL > segment that actually exists on disk is 0000000200003F1100000004, so > the archive script is failing repeatedly because of the missing > segment. > > The system is not actually missing important (for recovery) WAL segments, at least: > > Latest checkpoint's REDO WAL file: 000000020000417600000029 > > I'd like to "catch up" the archiver such that it is operating on files > that actually exist; besides setting archive_command to '/bin/true' > and letting it chew through the old ones, is there a way of safely > advancing the position of the archiver? Take a look at the contents of your pg_xlog/archive_status directory where you will likely find a .ready file corresponding to the missing segment and perhaps others. Deleting the .ready file should allow the archiver to get past the missing file. Make certain you're *not* mucking with the WAL files themselves. > -- > -- Christophe Pettus > xof@thebuild.com > > > > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net