pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holtgrewe, Manuel <manuel.holtgrewe@bih-charite.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: [ext] Re: Losing data because of problematic configuration?
Date: Tue, 15 Jun 2021 15:53:54 +0000
Message-ID: <fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de> (raw)
In-Reply-To: <354782.1623764371@sss.pgh.pa.us>
References: <dd6486da33414ed48a9a314441716f3c@bih-charite.de>
	<354782.1623764371@sss.pgh.pa.us>

>> < 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 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 this 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 <tgl@sss.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 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: cleanup 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

view thread (7+ messages)  latest in thread

Message-ID: <fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de>
Permalink:  ../fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de/
Also on:    postgresql.org/message-id/fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: manuel.holtgrewe@bih-charite.de, tgl@sss.pgh.pa.us
  Subject: Re: [ext] Re: Losing data because of problematic configuration?
  In-Reply-To: <fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de>
  References: <dd6486da33414ed48a9a314441716f3c@bih-charite.de> <354782.1623764371@sss.pgh.pa.us> <fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox