pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_stat: last vacuum and analyze times are not being updated - v8.3.5
3+ messages / 2 participants
[nested] [flat]

* pg_stat: last vacuum and analyze times are not being updated - v8.3.5
@ 2010-03-23 11:03  Steve Jones <Steve.Jones@codeweavers.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Steve Jones @ 2010-03-23 11:03 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Steve Jones <Steve.Jones@codeweavers.net>

PostgreSQL Version:       8.3.5

OS Version:                        FreeBSD 7.0 i386

 

Issue:                                    the last_vacuum column is not
being updated following a manual vacuum against a table or database.
This was highlighted recently when I configured the check_postgresql.pl
script to be used from NAGIOS.  

 

Background:

Drilling down through the pg_stat_all_tables view, the underlying
functions 

 

*         pg_stat_get_last_vacuum_time(), 

*         pg_stat_get_last_autovacuum_time(), 

*         pg_stat_get_last_analyze_time() and

*         pg_stat_get_last_autoanalyze_time()

 

are not returning anything even though I have run manual and auto
vacuums against these tables recently, along with ANALYZE.

 

Whether it makes a difference, I can confirm that track_counts and
track_activities are both on in postgresql.conf.   The stats collection
service is also running on the server - I've verified this by looking at
the processes on the server.

 

This is causing issues with both our monitoring and also our confidence
that the autovacuum service is running as it should.  We have a standby
server with identical configuration (as far as I can see) and this is
correctly keeping the stats up to date.  The only difference is postgres
has been running well over a year on the server with the issue.

 

Many thanks in advance,

 

Steve Jones

 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_stat: last vacuum and analyze times are not being updated - v8.3.5
@ 2010-03-23 15:43  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Steve Jones <Steve.Jones@codeweavers.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2010-03-23 15:43 UTC (permalink / raw)
  To: Steve Jones <Steve.Jones@codeweavers.net>; +Cc: pgsql-admin

"Steve Jones" <Steve.Jones@codeweavers.net> writes:
> Issue:                                    the last_vacuum column is not
> being updated following a manual vacuum against a table or database.

It works for me in 8.3 ... as long as there already is a stats entry for
the table in question.  You may be running into the pre-9.0 behavior
that the vacuum time update gets thrown away if there is no pre-existing
stats entry.  If you vacuum twice, does the time of the second vacuum
show up?

http://archives.postgresql.org/pgsql-committers/2009-09/msg00062.php

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_stat: last vacuum and analyze times are not being updated - v8.3.5
@ 2010-03-25 16:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2010-03-25 16:01 UTC (permalink / raw)
  To: Steve Jones <Steve.Jones@codeweavers.net>; +Cc: pgsql-admin

[ re-including the mailing list ]

"Steve Jones" <Steve.Jones@codeweavers.net> writes:
> For your information, this is what I did last night.

> Restarted the stats collector process, by issuing a kill -9 against it.
> As you said, postgres started up a new collector process immediately.  I
> tried a few vacuums and the stats still weren't being updated.

> I then restarted postgres in the hope this would help.  It didn't.

> I finally had to reboot the whole server which fixed the problem.  As
> you said, I have to run two manual vacuums before the stats are showing
> up.  This possible points a finger towards FreeBSD now?  Would
> appreciate your thoughts.

If restarting Postgres didn't fix it then the problem has to have been
at the operating system level.  I can hardly think what the problem
would have been exactly.  It's not hard to imagine something going
wrong in the kernel state for the UDP socket we use to send messages to
the stats collector process; but restarting Postgres should have torn
down that socket and created a new one.  Perhaps something wrong in
global state for all local UDP transfers?  I dunno.  But it seems like
time to call in some FreeBSD hackers.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-03-25 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 11:03 pg_stat: last vacuum and analyze times are not being updated - v8.3.5 Steve Jones <Steve.Jones@codeweavers.net>
2010-03-23 15:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-03-25 16:01   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox