Ynt: column "waiting" does not exist

From: Neslisah Demirci <neslisah(dot)demirci(at)markafoni(dot)com>
To: Johann Spies <johann(dot)spies(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Ynt: column "waiting" does not exist
Date: 2017-03-02 08:54:32
Message-ID: AM5PR0501MB2433CB1FCF74FF35B7775DBA9B280@AM5PR0501MB2433.eurprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi ,

Your monitoring program is trying to use pg_stat_activity's old version. In 9.6 pg_stat_activity has new columns named wait_event , wait_event_type .

Which monitoring programme?

Neslişah Demirci | Veritabanı Yöneticisi

Ayazağa cad. No:4 Uniq İstanbul Plaza
B2 /Kat:3 34396 Ayazağa-SARIYER-İstanbul
T. (+90) 212 453 16 00 – 5516
F. (+90) 212 453 16 16
www.markafoni.com<http://www.markafoni.com/>
www.facebook.com/markafoni<http://www.facebook.com/markafoni>
blog.markafoni.com

________________________________
Gönderen: Johann Spies <johann(dot)spies(at)gmail(dot)com> adına pgsql-general-owner(at)postgresql(dot)org <pgsql-general-owner(at)postgresql(dot)org>
Gönderildi: 2 Mart 2017 Perşembe 11:27
Kime: pgsql-general(at)postgresql(dot)org
Konu: [GENERAL] column "waiting" does not exist

I have no idea what is causing this message in the logs (PostgreSQL 9.6+177.pgdg80+1 on Debian):

2017-03-02 10:20:25 SAST [5196-1] [unknown] postgres postgres(at)template1 ERROR: column "waiting" does not exist at character 217
2017-03-02 10:20:25 SAST [5196-2] [unknown] postgres postgres(at)template1 STATEMENT: SELECT tmp.mstate AS state,COALESCE(count,0) FROM
(VALUES ('active'),('waiting'),('idle'),('idletransaction'),('unknown')) AS tmp(mstate)
LEFT JOIN
(SELECT CASE WHEN waiting THEN 'waiting' WHEN state='idle' THEN 'idle' WHEN state LIKE 'idle in transaction%' THEN 'idle$
count(*) AS count
FROM pg_stat_activity WHERE pid != pg_backend_pid() AND datname='data_portal'
GROUP BY CASE WHEN waiting THEN 'waiting' WHEN state='idle' THEN 'idle' WHEN state LIKE 'idle in transaction%' THEN 'idl$
) AS tmp2
ON tmp.mstate=tmp2.mstate
ORDER BY 1;

I do not know whether it is related but we recently get warnings about bloat in our system tables from the monitoring program.

How do I fix the cause of this error message?

Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emre Hasegeli 2017-03-02 10:12:52 Re: appropriate column for storing ipv4 address
Previous Message Charles Clavadetscher 2017-03-02 08:43:46 Re: column "waiting" does not exist