Re: Remaining beta blockers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remaining beta blockers
Date: 2013-05-01 15:37:11
Message-ID: CA+TgmobJ5u_XtSChgFFs37ntG6QwJBWNDGvSi3iSgw2+KWa5Xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 30, 2013 at 9:23 PM, Greg Stark <stark(at)mit(dot)edu> wrote:
> Can I ask what is the design goal of unlogged relations? Are they just
> an optimization so you can load lots of data without generating piles
> of wal log? Or are they intended to generate zero wal traffic so they
> can be populated on a standby for example, or outside a transaction
> entirely?

Unlogged relations don't generate any WAL traffic on inserts, updates,
deletes, or tuple locks. So they're not just for bulk-loading;
indeed, for bulk-loading, you can often avoid WAL without an unlogged
relation, if you can arrange to create or truncate the table in the
same transaction that does the load. They cannot be populated on a
standby or outside a transaction because they still require XIDs. If
someone can solve the problem of allowing multiple XID spaces, though,
they might be usable on a standby, which would be pretty cool.

> Because if it's the former then I don't see any problem generating wal
> traffic to update the pg_class entry. If they can satisfy the latter
> that gets a bit trickier.

The problem is that you need to update the pg_class entry in response
to the crash. The startup process has no ability to go hunt down the
pg_class record in the relevant database and update it - it only
understands pages, not tuples.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-05-01 15:38:36 Re: materialized view scannability in other DBs
Previous Message Robert Haas 2013-05-01 15:33:11 Re: corrupt pages detected by enabling checksums