Re: Survey on backing up unlogged tables: help us with PostgreSQL development!

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Date: 2010-11-17 17:49:07
Message-ID: 4CE41593.8030900@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2010-11-17 17:49:32 Re: Alter table to "on update cascade"
Previous Message Allan Kamau 2010-11-17 17:44:16 Trying to obtain the intersect of two tsvector values