pg_stat_bgwriter broken? - Mailing list pgsql-hackers

From Greg Smith
Subject pg_stat_bgwriter broken?
Date
Msg-id 4CE04B54.3040207@2ndquadrant.com
Whole thread Raw
Responses Re: pg_stat_bgwriter broken?
List 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@2ndQuadrant.com   Baltimore, MD




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: max_wal_senders must die
Next
From: Josh Berkus
Date:
Subject: Re: Rethinking hint bits WAS: Protecting against unexpected zero-pages: proposal