Re: making an unlogged table logged

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: making an unlogged table logged
Дата
Msg-id 1294256182.19612.14450.camel@ebony
обсуждение исходный текст
Ответ на making an unlogged table logged  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: making an unlogged table logged  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, 2011-01-04 at 21:41 -0500, Robert Haas wrote:

> 6. If wal_level != minimal, XLOG every page of every fork except the
> init fork, for both the table and the associated indexes. (Note that
> this step also requires an AccessExclusiveLock rather than some weaker
> lock, because of the arbitrary rule that only AccessExclusiveLocks are
> sent to standbys.  If we held only ShareRowExclusiveLock on the
> master, for example, a Hot Standby backend might read the table while
> it's only been half-copied.) 

That rule is not arbitrary, there is simply no need to send other lock
types since they would not conflict with queries. It's an optimisation.

The lock strength selected on the master doesn't need to be the same as
the lock strength on the standby. You could quite easily generate AEL
lock records to send to standby, without actually taking that lock level
on the master.

Question: what does an unlogged table look like on the standby? Are they
visible at all, does it throw an error, or do they just look empty. We
probably need some docs in the HS section to explain that. I hope the
answer isn't "look empty" since that is effectively data loss for people
spreading queries across multiple nodes.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: We need to log aborted autovacuums
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Upgrading Extension, version numbers