Re: WAL logging problem in 9.4.3?
От | Tom Lane |
---|---|
Тема | Re: WAL logging problem in 9.4.3? |
Дата | |
Msg-id | 15205.1435953917@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: WAL logging problem in 9.4.3? (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes: > With inserts the WAL records look as follows (relfilenodes changed): > ... > And amazingly, the database cluster successfuly recovers and there's no > error now. So the problem is *only* because there is no data in the > table at commit time. Which indicates that it's the 'newroot" record > that saves the day normally. And it's apparently generated by the > first insert. Yeah, because the correct "empty" state of a btree index is to have a metapage but no root page, so the first insert forces creation of a root page. And, by chance, btree_xlog_newroot restores the metapage from scratch, so this works even if the metapage had been missing or corrupt. However, things would still break if the first access to the index was a read attempt rather than an insert. regards, tom lane
В списке pgsql-hackers по дате отправления: