| From: | "Holtgrewe, Manuel" <manuel(dot)holtgrewe(at)bih-charite(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [ext] Re: Losing data because of problematic configuration? |
| Date: | 2021-06-15 15:53:54 |
| Message-ID: | fabac0b6aff24e0d82e3871892f5b2cd@bih-charite.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
>> < 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(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Tuesday, June 15, 2021 3:39:31 PM
To: Holtgrewe, Manuel
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: [ext] Re: Losing data because of problematic configuration?
"Holtgrewe, Manuel" <manuel(dot)holtgrewe(at)bih-charite(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | AI Rumman | 2021-06-15 18:55:52 | CONCAT function adding extra characters |
| Previous Message | Jehan-Guillaume de Rorthais | 2021-06-15 14:46:54 | Re: query issue |