Re: Remaining beta blockers

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Remaining beta blockers
Дата
Msg-id CA+TgmobJ5u_XtSChgFFs37ntG6QwJBWNDGvSi3iSgw2+KWa5Xw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remaining beta blockers  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On Tue, Apr 30, 2013 at 9:23 PM, Greg Stark <stark@mit.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: corrupt pages detected by enabling checksums
Следующее
От: Robert Haas
Дата:
Сообщение: Re: materialized view scannability in other DBs