Re: unlogged tables - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: unlogged tables
Date
Msg-id AANLkTinhMkhOCCxJpjgSZ5d9Fe1vgFnAgZ=SnyxF1csQ@mail.gmail.com
Whole thread Raw
In response to Re: unlogged tables  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Nov 15, 2010 at 11:22 AM, Robert Haas <robertmhaas@gmail.com> wrote:

> Yeah, this infrastructure doesn't really allow that.  The truncate
> happens way too early on in startup to execute any user-provided code.

But you could use the very feature of unlogged tables to know if
you've "initialized" some unlogged table by using an unlogged table to
note the initilization.

If the value you expect isn't in your "noted" table, you know that
it's been truncated...

Sure, it's "app side", but the hole point of unlogged tables it to
allow optimzations when the "appside" knows the data's dispensable and
rebuild-able.

a.

--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: unlogged tables
Next
From: Robert Haas
Date:
Subject: Re: Count backend self-sync calls