From: Tom Lane <tgl@sss.pgh.pa.us>
To: nad2000@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12746: Backward compatibility is broken 9.2: pg_stat_activity.procpid renamed to pid
Date: Sun, 08 Feb 2015 18:01:27 -0500
Message-ID: <9032.1423436487@sss.pgh.pa.us> (raw)
In-Reply-To: <20150208224347.15322.21011@wrigleys.postgresql.org>
References: <20150208224347.15322.21011@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
nad2000@gmail.com writes:
> I run an app that should support both 9.0 and 9.4. I found that at 9.2 the
> pg_stat_activity column porcpid was renamed to pid. It broke the app. To
> solve it I had to introduce conditional querying for different versions.
> I don't think it's right time to do any aesthetically motivated changes at
> this stage.
The commit log entry about that provides a bit of context:
commit 4f42b546fd87a80be30c53a0f2c897acb826ad52
Author: Magnus Hagander <magnus@hagander.net>
Date: Thu Jan 19 14:19:20 2012 +0100
Separate state from query string in pg_stat_activity
This separates the state (running/idle/idleintransaction etc) into
it's own field ("state"), and leaves the query field containing just
query text.
The query text will now mean "current query" when a query is running
and "last query" in other states. Accordingly,the field has been
renamed from current_query to query.
Since backwards compatibility was broken anyway to make that, the procpid
field has also been renamed to pid - along with the same field in
pg_stat_replication for consistency.
Scott Mead and Magnus Hagander, review work from Greg Smith
Basically the point being that you're going to need some version
conditionality *anyway* in pretty much any app using this view.
In any case, as Marko noted, you're about three years too late to complain
about this. We're certainly not changing back now.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, nad2000@gmail.com
Subject: Re: BUG #12746: Backward compatibility is broken 9.2: pg_stat_activity.procpid renamed to pid
In-Reply-To: <9032.1423436487@sss.pgh.pa.us>
References: <20150208224347.15322.21011@wrigleys.postgresql.org> <9032.1423436487@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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