Re: Shutting down a warm standby database in

From: Stephen Harris <lists(at)spuddy(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shutting down a warm standby database in
Date: 2006-11-30 21:31:51
Message-ID: 20061130213151.GA608@pugwash.spuddy.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Nov 30, 2006 at 03:59:15PM -0500, Tom Lane wrote:
> Stephen Harris <lists(at)spuddy(dot)org> writes:
> > Starting up the standby database still goes back to earlier log files,
> > but I guess that's the 100 checkpoint thing you mentioned earlier.
>
> Actually I was misremembering that: the frequency of recovery
> checkpoints is time-based, and for a slave that's in sync with its
> master, they should occur about as often as checkpoints on the master.
> So the amount of log to be replayed should be comparable to what the
> master would have to replay if it crashed.

Hmm. For testing purposes I have

archive_timeout=5

so an archive log is created every 5 seconds if there's activity.
In idle periods it's created every 5 minutes as the internal checkpoint
occurs on the server. However if I replay all those "empty" logs then
shutdown then startup it will ask for some of them again.

As a test, I started a recover, recovered 11 archive logs
(000000010000000000000035 to 00000001000000000000003F), some may have had
activity; I not sure. I then waited 10 minutes after the last log file
had been replayed. Then I did a fast shutdown. Starting the standby
database again required it going back to 000000010000000000000035 again.

--

rgds
Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Munro 2006-11-30 21:32:52 Re: [pgsql-general] Separation of clients' data within a database
Previous Message Merlin Moncure 2006-11-30 21:22:30 Re: Development of cross-platform GUI for Open Source DBs

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-11-30 21:36:54 Re: Shutting down a warm standby database in
Previous Message Martijn van Oosterhout 2006-11-30 21:07:38 Re: Short writes