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 1ltBO6-0005NK-UC for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 15:54:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltBO4-0002Zx-G1 for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 15:54:00 +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 1ltBO4-0002Zo-4O for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 15:54:00 +0000 Received: from mail-cbf-ext.charite.de ([193.175.73.208]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltBO1-0004Gi-P1 for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 15:53:59 +0000 Received: from exchange.charite.de (s-mx14-ht02.charite.de [10.32.37.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail-cbf.charite.de (Postfix) with ESMTPS id 4G4CXz348Zz20lGB; Tue, 15 Jun 2021 17:53:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bih-charite.de; s=jan2021; t=1623772435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HWBoKDsh/XUfhXNWq11OAruKNFGyMsxvuSEf1paW4F0=; b=MacT07y49BHj+UDwm8fcFOyHNDDt9DI8LHFlLkspmwwdfzkS1YKjwRzMGun+5Lq8+Yt3ls rhZglCcij0oP9YNFhoFD5Eycsza1K7Ns8lqhyXAc2uAUy2RyBPLC5CyPLBKMULCmdYp/JK xLgNMq5YOIjMw0aLR4ooDEBHBjLWv+iR6gtt85yC325nEJghoHmyr1ohI+gbqjK0d7zPTu kJKFYEYLaF01Un2qSEXjMbbyRwfge6lZVP/X0TTeFa+LvcgWg5YoaYTfm9ux7yFCGLp8Di y+G/JfmDJyOLS6qpPqIBZql43k92+Bd4z1B/fVwc6iwjJiyXnd1TaoyOjt70Yw== Received: from s-mx16-bih01.charite.de (10.32.83.23) by s-mx14-ht02.charite.de (10.32.37.106) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 15 Jun 2021 17:53:55 +0200 Received: from s-mx16-bih01.charite.de (10.32.83.23) by s-mx16-bih01.charite.de (10.32.83.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 15 Jun 2021 17:53:54 +0200 Received: from s-mx16-bih01.charite.de ([fe80::a4ac:ef94:4cc6:8783]) by s-mx16-bih01.charite.de ([fe80::a4ac:ef94:4cc6:8783%9]) with mapi id 15.01.2242.008; Tue, 15 Jun 2021 17:53:54 +0200 From: "Holtgrewe, Manuel" To: Tom Lane CC: "pgsql-general@lists.postgresql.org" Subject: Re: [ext] Re: Losing data because of problematic configuration? Thread-Topic: [ext] Re: Losing data because of problematic configuration? Thread-Index: AQHXYdLD/rK5fCc4M0OgzI3xWiaLdasU8pCAgABGbv4= Date: Tue, 15 Jun 2021 15:53:54 +0000 Message-ID: References: ,<354782.1623764371@sss.pgh.pa.us> In-Reply-To: <354782.1623764371@sss.pgh.pa.us> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.32.83.241] Content-Type: multipart/alternative; boundary="_000_fabac0b6aff24e0d82e3871892f5b2cdbihcharitede_" MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=bih-charite.de; s=jan2021; t=1623772435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HWBoKDsh/XUfhXNWq11OAruKNFGyMsxvuSEf1paW4F0=; b=b5OtMuatjEXJumjf8Kq5HIhTEOxAEvTR5q2cbagxD8tGyItOkHnO/DoB+xD0txQi/Jix/9 leyCV7w5eI2susFknpHFC8TXDRwY3ggEeHKANnf3lYHgKCieEU110X8ptf5ePzE3/imFq9 IcHQzSiO72kqHOtPXdon+Y4VtyDW/XxMetlQbWunIfdd/BXPkY/+vUNf1pSE8GP87r2IlX DnIe7r0tk/8o6Yf4QCwOIx+mytlFr725q36065/Mn4smZsAIrjUtbi9jg5b0A3t44GW5ew 4upx3zFr1t5lKxS/VsV+7zEVoVT1B8cb4zSVy8oPqyHlQ0/2opQWspZ1IjzvlQ== ARC-Authentication-Results: i=1; mail-cbf.charite.de; none ARC-Seal: i=1; s=jan2021; d=bih-charite.de; t=1623772435; a=rsa-sha256; cv=none; b=rqkgsVHiohs+QMbqq7kciGhKDGeCxLOWkm/BuQBg0XfEdi1U2QQhxheFPNv939qtlnupxM 6SyiHOIqjB0volFybsHcRJzi7GRWmJPW6jFhExR0jEoqQh5wdq7wDnhq1yD8z6P6zKCWZn Pg1SoDY/ZA01PwH/hmCrLqZTaQEuqg9W/t6i2kHIU89yFMwkJ2yZS0RlV3+a1sL67C192s n7ZVmvEV/jLnQU7qAy6Isdb4D//fl1ditvOg+8AsDuDJPIZw44IRXoqJICSvbYxHphSWcI dRTJmS6jA6FsNyp8LW5KF2R+pqPiFd8NsNc2A69PzVIFpT926hjx5f2uEOVY+g== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_fabac0b6aff24e0d82e3871892f5b2cdbihcharitede_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >> < 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. D'oh! Yes, that is the case. I once used this but I was convinced that I took thi= s back in some version. It is not in my main deployment, though. Now I have= to find out (a) why I have diverging deployment and (b) how that bug came = about to be. Thanks a lot! ________________________________ From: Tom Lane Sent: Tuesday, June 15, 2021 3:39:31 PM To: Holtgrewe, Manuel Cc: pgsql-general@lists.postgresql.org Subject: [ext] Re: Losing data because of problematic configuration? "Holtgrewe, Manuel" writes: > So it looks as if the database jumps back "half an hour" to ensure consis= tent 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: cl= eanup 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 --_000_fabac0b6aff24e0d82e3871892f5b2cdbihcharitede_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

>> < 2021-06-15= 12:33:04.537 CEST > DEBUG:  resetting unlogged relations: cleanup = 1 init 0
>
> Are you = perhaps keeping your data in an UNLOGGED table?  If so, resetting
> it to em= pty after a crash is exactly what's supposed to happen.  The
> entire p= oint of UNLOGGED is that the performance benefits come at the
> cost of = losing the data on crash.


D'oh!


Yes, that is the case. I once used this but I was convinced that I took = this back in some version. It is not in my main deployment, though. Now I h= ave to find out (a) why I have diverging deployment and (b) how that bug ca= me about to be.


Thanks a lot!



From: Tom Lane <tgl@ss= s.pgh.pa.us>
Sent: Tuesday, June 15, 2021 3:39:31 PM
To: Holtgrewe, Manuel
Cc: pgsql-general@lists.postgresql.org
Subject: [ext] Re: Losing data because of problematic configuration?=
 
"Holtgrewe, Manuel" <manuel.holtgrewe= @bih-charite.de> writes:
> So it looks as if the database jumps back "half an hour" to = ensure consistent 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 mos= t 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: cleanup 1 init 0

Are you perhaps keeping your data in an UNLOGGED table?  If so, resett= ing
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.

            &nb= sp;           regards, to= m lane


--_000_fabac0b6aff24e0d82e3871892f5b2cdbihcharitede_--