pg_stat_bgwriter broken?

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_stat_bgwriter broken?
Date: 2010-11-14 20:49:24
Message-ID: 4CE04B54.3040207@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm behind on my list mail so maybe this has been mentioned already, but
when I just tried pg_stat_bgwriter from a build against today's HEAD I
got this:

pgbench=# select count(*) FROM pg_stat_bgwriter;
ERROR: did not find '}' at end of input node

Can someone confirm if this broke recently, or is it just me? Last time
I would have tested this myself was a few weeks ago.

Regardless, I was thinking of adding some basic sanity checking on this
view, that runs from the regression tests to catch this class of problem
in the future. It's kind of sloppy that this and the bgwriter counter
reset aren't tested as part of "make check". I think these two would
always produce stable results:

postgres=# SELECT count(*) FROM pg_stat_bgwriter;
count
-------
1
postgres=# SELECT pg_stat_reset_shared('bgwriter');
pg_stat_reset_shared
----------------------

(1 row)

And the first one of those is similarly broken on my install. Thoughts
on whether adding those to the regression tests would be a worthwhile
patch? I'll do the work, just thinking out loud about the concept.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-11-14 20:52:39 Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal
Previous Message Heikki Linnakangas 2010-11-14 20:45:00 Re: max_wal_senders must die