Skip site navigation (1) Skip section navigation (2)

Hot Standby startup with overflowed snapshots

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Chris Redekop <chris(at)replicon(dot)com>
Subject: Hot Standby startup with overflowed snapshots
Date: 2011-10-27 13:26:00
Message-ID: CA+U5nMJ3-kAFtRZo5g7gRjp0iA4BwdavbbH9_UQsekeqT-2m1A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Chris Redekop's recent report of slow startup for Hot Standby has made
me revisit the code there.

Although there isn't a bug, there is a missed opportunity for starting
up faster which could be the source of Chris' annoyance.

The following patch allows a faster startup in some circumstances.

The patch also alters the log levels for messages and gives a single
simple message for this situation. The log will now say

  LOG:  recovery snapshot waiting for non-overflowed snapshot or until
oldest active xid on standby is at least %u (now %u)
  ...multiple times until snapshot non-overflowed or xid reached...

whereas before the first LOG message shown was

  LOG:  consistent state delayed because recovery snapshot incomplete
  and only later, at DEBUG2 do you see
  LOG:  recovery snapshot waiting for %u oldest active xid on standby is %u
  ...multiple times until xid reached...

Comments please.

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment: faster_hot_standby_startup_withsubxacts.v1.patch
Description: application/octet-stream (3.3 KB)

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2011-10-27 13:36:54
Subject: Re: Hot Backup with rsync fails at pg_clog if under load
Previous:From: Erik RijkersDate: 2011-10-27 12:45:24
Subject: Re: (PATCH) Adding CORRESPONDING (NULL error)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group