Thread: [Fwd: [PATCHES] archiver ps display]

[Fwd: [PATCHES] archiver ps display]

From
Simon Riggs
Date:
Now that we have set archiver messages to DEBUG levels, there's no easy
way of seeing what file we are currently working on.

The behaviour of the startup process and archiver should be symmetrical,
allowing it to be used for replication monitoring.

Before archive_command
postgres: archiver process   archiving 00000001000000000000000B

After archive_command
postgres: archiver process   archived 00000001000000000000000B

patch posted to -patches, intended for 8.3

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



Re: [Fwd: [PATCHES] archiver ps display]

From
Alvaro Herrera
Date:
Simon Riggs wrote:
> 
> Now that we have set archiver messages to DEBUG levels, there's no easy
> way of seeing what file we are currently working on.
> 
> The behaviour of the startup process and archiver should be symmetrical,
> allowing it to be used for replication monitoring.
> 
> Before archive_command
> postgres: archiver process   archiving 00000001000000000000000B
> 
> After archive_command
> postgres: archiver process   archived 00000001000000000000000B

I agree that replication should be able to be monitored.  However,
isn't ps_display supposed to show what the process is _currently_ doing?
So if the archiver finishes processing a file, its display should go
back to "idle" or some such.  (Perhaps "idle, last archived XXXYYYZZZ")

-- 
Alvaro Herrera                  http://www.amazon.com/gp/registry/5ZYLFMCVHXC
"After a quick R of TFM, all I can say is HOLY CR** THAT IS COOL! PostgreSQL was
amazing when I first started using it at 7.2, and I'm continually astounded by
learning new features and techniques made available by the continuing work of
the development team."
Berend Tober, http://archives.postgresql.org/pgsql-hackers/2007-08/msg01009.php


Re: [Fwd: [PATCHES] archiver ps display]

From
Simon Riggs
Date:
On Thu, 2007-12-13 at 10:55 -0300, Alvaro Herrera wrote:
> Simon Riggs wrote:
> > 
> > Now that we have set archiver messages to DEBUG levels, there's no easy
> > way of seeing what file we are currently working on.
> > 
> > The behaviour of the startup process and archiver should be symmetrical,
> > allowing it to be used for replication monitoring.
> > 
> > Before archive_command
> > postgres: archiver process   archiving 00000001000000000000000B
> > 
> > After archive_command
> > postgres: archiver process   archived 00000001000000000000000B
> 
> I agree that replication should be able to be monitored.  However,
> isn't ps_display supposed to show what the process is _currently_ doing?
> So if the archiver finishes processing a file, its display should go
> back to "idle" or some such.  (Perhaps "idle, last archived XXXYYYZZZ")

That was my first thought, but that ends up with the archiver ps display
being mostly blank, and so isn't really very useful.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



Re: [Fwd: [PATCHES] archiver ps display]

From
Alvaro Herrera
Date:
Simon Riggs wrote:
> On Thu, 2007-12-13 at 10:55 -0300, Alvaro Herrera wrote:

> > I agree that replication should be able to be monitored.  However,
> > isn't ps_display supposed to show what the process is _currently_ doing?
> > So if the archiver finishes processing a file, its display should go
> > back to "idle" or some such.  (Perhaps "idle, last archived XXXYYYZZZ")
> 
> That was my first thought, but that ends up with the archiver ps display
> being mostly blank, and so isn't really very useful.

What about the second suggestion?

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"We are who we choose to be", sang the goldfinch
when the sun is high (Sandman)


Re: [Fwd: [PATCHES] archiver ps display]

From
Simon Riggs
Date:
On Thu, 2007-12-13 at 11:16 -0300, Alvaro Herrera wrote:
> Simon Riggs wrote:
> > On Thu, 2007-12-13 at 10:55 -0300, Alvaro Herrera wrote:
> 
> > > I agree that replication should be able to be monitored.  However,
> > > isn't ps_display supposed to show what the process is _currently_ doing?
> > > So if the archiver finishes processing a file, its display should go
> > > back to "idle" or some such.  (Perhaps "idle, last archived XXXYYYZZZ")
> > 
> > That was my first thought, but that ends up with the archiver ps display
> > being mostly blank, and so isn't really very useful.
> 
> What about the second suggestion?

Sorry. My preference is terse, but that looks fine to me.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



Re: [Fwd: [PATCHES] archiver ps display]

From
Peter Eisentraut
Date:
Am Donnerstag, 13. Dezember 2007 schrieb Simon Riggs:
> Now that we have set archiver messages to DEBUG levels, there's no easy
> way of seeing what file we are currently working on.

> After archive_command
> postgres: archiver process   archived 00000001000000000000000B

ps isn't a very robust and portable way to monitor something so important.  
Anything that is interesting should also be visible in some other, more 
well-defined way, such as an SQL function or table.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: [Fwd: [PATCHES] archiver ps display]

From
Simon Riggs
Date:
On Thu, 2007-12-13 at 15:58 +0100, Peter Eisentraut wrote:
> Am Donnerstag, 13. Dezember 2007 schrieb Simon Riggs:
> > Now that we have set archiver messages to DEBUG levels, there's no easy
> > way of seeing what file we are currently working on.
> 
> > After archive_command
> > postgres: archiver process   archived 00000001000000000000000B
> 
> ps isn't a very robust and portable way to monitor something so important.  
> Anything that is interesting should also be visible in some other, more 
> well-defined way, such as an SQL function or table.

Yeh, agreed, there are external ways of checking what's going on. 

I really meant for people to eyeball it. Since we do it for recovery, it
seems sensible to do the same thing for archiving.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com