Re: Survey on backing up unlogged tables: help us with PostgreSQL development! - Mailing list pgsql-general

From Josh Berkus
Subject Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Date
Msg-id 4CE41593.8030900@agliodbs.com
Whole thread Raw
In response to Re: Survey on backing up unlogged tables: help us with PostgreSQL development!  (Glen Parker <glenebob@nwlink.com>)
Responses Re: Survey on backing up unlogged tables: help us with PostgreSQL development!  (Scott Mead <scott@scottrmead.com>)
List pgsql-general
> As was already mentioned, application logs. Unlogged tables would be
> perfect for that, provided they don't go *poof* every now and then for
> no good reason. Nobody's going to be too heart broken if a handful of
> log records go missing, or get garbled, after a server crash or power
> outage. Delete 'em all after every restart though, and that's a problem.

That's a nice thought, but it's not how data corruption works in the
event of a crash.  If a table is corrupted, *we don't know* how it's
corrupted, and it's not just "the last few records" which are corrupted.
  So for unlogged tables, there is never going to be any other option
for crashes than to truncate them.

Robert Haas did discuss the ability to synch unlogged tables on a
planned shutdown, though.   However, that's liable to wait until 9.2,
given the multiple steps required to make it work.

Note that you would have the option of periodically synching an unlogged
table to pgdump or to a logged table, via script, if you cared about
retaining the data.  That would probably give you the behavior you want,
above.

--
                                   -- Josh Berkus
                                      PostgreSQL Experts Inc.
                                      http://www.pgexperts.com

pgsql-general by date:

Previous
From: Allan Kamau
Date:
Subject: Trying to obtain the intersect of two tsvector values
Next
From: Andreas Kretschmer
Date:
Subject: Re: Alter table to "on update cascade"