Re: Why is a newly created index contains the invalid LSN?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Why is a newly created index contains the invalid LSN?
Дата
Msg-id CAA4eK1J5hgayxL-pquthsXGubx3EmRFTSyMwhxOieZhfPzpC=w@mail.gmail.com
обсуждение исходный текст
Ответ на Why is a newly created index contains the invalidLSN?  (Yury Zhuravlev <u.zhuravlev@postgrespro.ru>)
Ответы Re: Why is a newly created index contains the invalidLSN?  (Yury Zhuravlev <u.zhuravlev@postgrespro.ru>)
Список pgsql-hackers
On Thu, Aug 25, 2016 at 7:55 PM, Yury Zhuravlev
<u.zhuravlev@postgrespro.ru> wrote:
> Hello hackers.
>
> I have a small question. While working on an incremental backup I noticed a
> strange thing.
> Newly created index is contains the invalid LSN (0/0).
> Exmaple:
> postgres=# select lsn from page_header(get_raw_page('test_a_idx2',0));
> lsn -----
> 0/0
> (1 row)
>
> Can you explain me why?
>

For some of the indexes like btree which are built outside shared
buffers, we don't write WAL unless wal_level >= REPLICA.  I think
Robert has explained it very well how we handle the crash recovery
situation for such indexes.  However, for some other indexes which
don't bypass shared buffers like BRIN, GIN we do write WAL for such
cases as well, so you must see LSN for those type of indexes.  I am
less sure, if there will be any problem, if don't write WAL for those
indexes as well when wal_level < REPLICA.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Renaming of pg_xlog and pg_clog
Следующее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: Re: [bug fix] Cascading standby cannot catch up and get stuck emitting the same message repeatedly