Re: pg_upgrade and rsync

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Re: pg_upgrade and rsync
Date: 2015-01-22 20:34:48
Message-ID: 54C15EE8.4090106@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/22/15 2:19 PM, Heikki Linnakangas wrote:
> On 01/22/2015 09:20 PM, Bruce Momjian wrote:
>> One question I have is whether hint bits are set by read-only
>> transactions on standby servers.
>
> No. See comments in MarkBufferDirtyHint:
>
>> /*
>> * If we need to protect hint bit updates from torn writes, WAL-log a
>> * full page image of the page. This full page image is only necessary
>> * if the hint bit update is the first change to the page since the
>> * last checkpoint.
>> *
>> * We don't check full_page_writes here because that logic is included
>> * when we call XLogInsert() since the value changes dynamically.
>> */
>> if (XLogHintBitIsNeeded() && (bufHdr->flags & BM_PERMANENT))
>> {
>> /*
>> * If we're in recovery we cannot dirty a page because of a hint.
>> * We can set the hint, just not dirty the page as a result so the
>> * hint is lost when we evict the page or shutdown.
>> *
>> * See src/backend/storage/page/README for longer discussion.
>> */
>> if (RecoveryInProgress())
>> return;

What if XLogHintBitIsNeeded is false? That would be the case if we're not wall logging hints *on the standby*.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-01-22 20:42:18 Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?
Previous Message Robert Haas 2015-01-22 20:34:27 Re: Windows buildfarm animals are still not happy with abbreviated keys patch