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 1lt9In-0001G4-5I for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 13:40:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lt9IF-0002ag-Ay for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 13:39:51 +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 1lt9IF-0002aY-2O for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 13:39:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lt9ID-00035Z-4c for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 13:39:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15FDdVG4354783; Tue, 15 Jun 2021 09:39:31 -0400 From: Tom Lane To: "Holtgrewe, Manuel" cc: "pgsql-general@lists.postgresql.org" Subject: Re: Losing data because of problematic configuration? In-reply-to: References: Comments: In-reply-to "Holtgrewe, Manuel" message dated "Tue, 15 Jun 2021 10:42:01 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <354781.1623764371.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Jun 2021 09:39:31 -0400 Message-ID: <354782.1623764371@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Holtgrewe, Manuel" writes: > So it looks as if the database jumps back "half an hour" to ensure consi= stent data. Everything in between is lost. Postgres does not lose committed data --- if it did, we'd consider that a fairly serious bug. (Well, there are caveats of course. But most of them have to do with operating-system crashes or power loss, neither of which are at stake here.) I am wondering about this though: > < 2021-06-15 12:33:04.537 CEST > DEBUG: resetting unlogged relations: c= leanup 1 init 0 Are you perhaps keeping your data in an UNLOGGED table? If so, resetting it to empty after a crash is exactly what's supposed to happen. The entire point of UNLOGGED is that the performance benefits come at the cost of losing the data on crash. regards, tom lane