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

From Karsten Hilbert
Subject Re: Survey on backing up unlogged tables: help us with PostgreSQL development!
Date
Msg-id 20101116232419.323170@gmx.net
Whole thread Raw
In response to Survey on backing up unlogged tables: help us with PostgreSQL development!  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Survey on backing up unlogged tables: help us with PostgreSQL development!  (Glen Parker <glenebob@nwlink.com>)
List pgsql-general
> PostgreSQL 9.1 is likely to have, as a feature, the ability to create
> tables which are "unlogged", meaning that they are not added to the
> transaction log, and will be truncated (emptied) on database restart.
> Such tables are intended for highly volatile, but not very valuable,
> data, such as session statues, application logs, etc.
>
> The question is, how would you, as a DBA, expect pg_dump backups to
> treat unlogged tables? Backing them up by default has the potential to
> both cause performance drag on the unlogged table and make your backups
> take longer unless you remember to omit them. Not backing them up by
> default has the drawback that if you forget --include-unlogged switch,
> and shut the database down, any unlogged data is gone. How would you
> *expect* unlogged tables to behave?

ALTER DATABASE ... SET PG_DUMP_INCLUDE_UNLOGGED TO ON/OFF

with default OFF.

That way I can think about it once per database *before* I am in
the situation when I regret forgetting.

(pg_dump would still support --include-unlogged, defaulting to the
database default)

Karsten
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

pgsql-general by date:

Previous
From: Jorge Arévalo
Date:
Subject: Re: Programming error: Out of Memory
Next
From: zhong ming wu
Date:
Subject: port warded (iptables) postgres