Re: Losing data because of problematic configuration? - Mailing list pgsql-general

From Tom Lane
Subject Re: Losing data because of problematic configuration?
Date
Msg-id 354782.1623764371@sss.pgh.pa.us
Whole thread Raw
In response to Losing data because of problematic configuration?  ("Holtgrewe, Manuel" <manuel.holtgrewe@bih-charite.de>)
Responses Re: [ext] Re: Losing data because of problematic configuration?  ("Holtgrewe, Manuel" <manuel.holtgrewe@bih-charite.de>)
List pgsql-general
"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



pgsql-general by date:

Previous
From: Vijaykumar Jain
Date:
Subject: Re: immutable function querying table for partitioning
Next
From: Tom Lane
Date:
Subject: Re: Memory alloc exception