Re: Are all unlogged tables in any case truncated after a server-crash?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: sch8el(at)posteo(dot)de, pgsql-general(at)postgresql(dot)org
Subject: Re: Are all unlogged tables in any case truncated after a server-crash?
Date: 2021-11-12 07:41:48
Message-ID: 371166df102667898df3be4be0e4e07c992f0093.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2021-11-11 at 18:39 +0000, sch8el(at)posteo(dot)de wrote:
> every few weeks I use Postgres ability, to import huge data sets very
> fast by means of "unlogged tables". The bulk load (consisting of plenty
> "copy"- & DML-Stmts) and the spatial index creation afterwards, takes
> about 5 hours on a proper server  (pg12.7 & PostGIS-Extension). After
> that all unlogged tables remain completely unchanged (no
> DML-/DDL-Statements). Hence all of my huge unlogged, "static" tables get
> never "unclean" and should not be truncated after a server crash.

There is no way to achieve that.

But you could keep the "huge data sets" around and load them again if
your server happens to crash (which doesn't happen often, I hope).

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sch8el 2021-11-12 10:53:28 Re: Are all unlogged tables in any case truncated after a server-crash?
Previous Message 孤傲小二~阿沐 2021-11-12 06:37:18 sqrt_bigint_v2