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

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: double writes using "double-write buffer" approach [WIP]
Date: 2012-02-07 17:04:52
Message-ID: 4F3159B4.6020309@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/07/2012 12:09 AM, Dan Scales wrote:
> So, yes, good point -- double writes cannot replace the functionality of full_page_writes for base backup. If double writes were in use, they might be automatically switched over to full page writes for the duration of the base backup. And the double write file should not be part of the base backup.

There is already a check for this sort of problem during the base
backup. It forces full_pages_writes on for the backup, even if the
running configuration has it off. So long as double writes can be
smoothly turned off and back on again, that same section of code can
easily be made to handle that, too.

As far as not making the double write file part of the base backup, I
was assuming that would go into a subdirectory under pg_xlog by
default. I would think that people who relocate pg_xlog using one of
the methods for doing that would want the double write buffer to move as
well. And if it's inside pg_xlog, existing base backup scripts won't
need to be changed--the correct ones already exclude pg_xlog files.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2012-02-07 17:29:16 Re: xlog location arithmetic
Previous Message Tom Lane 2012-02-07 16:39:14 Re: patch for parallel pg_dump