Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YKarC-000275-7q for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Feb 2015 23:01:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YKarB-0002YP-OG for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Feb 2015 23:01:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YKarB-0002YJ-2t for pgsql-bugs@postgresql.org; Sun, 08 Feb 2015 23:01:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YKar3-0004Sh-FG for pgsql-bugs@postgresql.org; Sun, 08 Feb 2015 23:01:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t18N1Rj8009033; Sun, 8 Feb 2015 18:01:27 -0500 From: Tom Lane 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 In-reply-to: <20150208224347.15322.21011@wrigleys.postgresql.org> References: <20150208224347.15322.21011@wrigleys.postgresql.org> Comments: In-reply-to nad2000@gmail.com message dated "Sun, 08 Feb 2015 22:43:47 +0000" Date: Sun, 08 Feb 2015 18:01:27 -0500 Message-ID: <9032.1423436487@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 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