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

Re: Streaming replication status

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Bruce Momjian <bruce(at)momjian(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming replication status
Date: 2010-01-15 04:20:41
Message-ID: 1263529241.26654.28801.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, 2010-01-14 at 23:07 -0500, Greg Smith wrote:

> pg_last_archived_xlogfile() text:  Get the name of the last file the
> archive_command [tried to|successfully] archived since the server was
> started.  If archiving is disabled or no xlog files have become ready
> to archive since startup, a blank line will be returned.  

OK

> It is possible for this function to return a result that does not
> reflect an actual xlogfile if files are manually added to the server's
> archive_status directory.

> I'd find this extremely handy as a hook for monitoring scripts that
> want to watch the server but don't have access to the filesystem
> directly, even given those limitations.  I'd prefer to have the "tried
> to" version, because it will populate with the name of the troublesome
> file it's stuck on even if archiving never gets its first segment
> delivered.
> 
> I'd happily write a patch to handle all that if I thought it would be
> accepted.  I fear that the whole approach will be considered a bit too
> hackish and get rejected on that basis though.  Not really sure of a
> "right" way to handle this though.  Anything better is going to be
> more complicated because it requires passing more information into the
> archiver, with little gain for that work beyond improving the quality
> of this diagnostic routine.  And I think most people would find what I
> described above useful enough.

Yes, please write it. It's separate from SR, so will not interfere.

-- 
 Simon Riggs           www.2ndQuadrant.com


In response to

pgsql-hackers by date

Next:From: Jaime CasanovaDate: 2010-01-15 04:43:58
Subject: Re: lock_timeout GUC patch
Previous:From: Greg SmithDate: 2010-01-15 04:07:52
Subject: Re: Streaming replication status

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