Re: double writes using "double-write buffer" approach [WIP]

Поиск
Список
Период
Сортировка
От Dan Scales
Тема Re: double writes using "double-write buffer" approach [WIP]
Дата
Msg-id 2122571625.1249760.1328591393653.JavaMail.root@zimbra-prod-mbox-4.vmware.com
обсуждение исходный текст
Ответ на Re: double writes using "double-write buffer" approach [WIP]  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: double writes using "double-write buffer" approach [WIP]  (Greg Smith <greg@2ndQuadrant.com>)
Список pgsql-hackers
I don't know a lot about base backup, but it sounds like full_page_writes must be turned on for base backup, in order
todeal with the inconsistent reads of pages (which you might call torn pages) that can happen when you backup the data
fileswhile the database is running.  The relevant parts of the WAL log are then copied separately (and consistently)
oncethe backup of the data files is done, and used to "recover" the database into a consistent state later. 

So, yes, good point -- double writes cannot replace the functionality of full_page_writes for base backup.  If double
writeswere in use, they might be automatically switched over to full page writes for the duration of the base backup.
Andthe double write file should not be part of the base backup. 

Dan

----- Original Message -----
From: "Fujii Masao" <masao.fujii@gmail.com>
To: "Dan Scales" <scales@vmware.com>
Cc: "PG Hackers" <pgsql-hackers@postgresql.org>
Sent: Monday, February 6, 2012 3:08:15 AM
Subject: Re: [HACKERS] double writes using "double-write buffer" approach [WIP]

On Sat, Jan 28, 2012 at 7:31 AM, Dan Scales <scales@vmware.com> wrote:
> Let me know if you have any thoughts/comments, etc.  The patch is
> enclosed, and the README.doublewrites is updated a fair bit.

ISTM that the double-write can prevent torn-pages in neither double-write file
nor data file in *base backup*. Because both double-write file and data file can
be backed up while being written. Is this right? To avoid the torn-page problem,
we should write FPI to WAL during online backup even if the double-write has
been committed?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: When do we lose column names?
Следующее
От: Fujii Masao
Дата:
Сообщение: incorrect handling of the timeout in pg_receivexlog