Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZbxlU-0000vG-9T for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Sep 2015 21:27:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZbxlT-0005at-PI for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Sep 2015 21:27:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZbxlS-0005aA-Mq for pgsql-bugs@postgresql.org; Tue, 15 Sep 2015 21:27:46 +0000 Received: from ioo-i3.static.anw.at ([195.234.100.13] helo=zerberos.secure.at) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZbxlP-0003L5-H2 for pgsql-bugs@postgresql.org; Tue, 15 Sep 2015 21:27:45 +0000 Received: from [192.168.5.19] (agni [192.168.5.19]) by zerberos.secure.at (Postfix) with ESMTP id 16A3AAA64E7; Tue, 15 Sep 2015 23:27:41 +0200 (CEST) From: =?UTF-8?Q?J=c3=bcrgen_Strobel?= Subject: Re: BUG #13620: Streaming replication process titles should use zero padding for TX ids. To: Michael Paquier References: <20150915104236.2674.33056@wrigleys.postgresql.org> Cc: PostgreSQL mailing lists X-Enigmail-Draft-Status: N1110 Message-ID: <55F88D4D.7010102@strobel.info> Date: Tue, 15 Sep 2015 23:27:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 On 2015-09-15 22:18, Michael Paquier wrote: > On Tue, Sep 15, 2015 at 3:42 AM, wrote: >> >From the last 2 lines I would guess at first glance that those processes are >> streaming segment "78" at the moment, while they really are at segment "07". >> It should be trivial to zero-pad this id. > > If you can run ps as an OS user, surely you can query the master > instance for the same information, like that for example: > =# SELECT pg_current_xlog_location(), > pg_xlogfile_name(pg_current_xlog_location()); > pg_current_xlog_location | pg_xlogfile_name > --------------------------+-------------------------- > 0/3000888 | 000000010000000000000003 > (1 row) > =# SELECT write_location, pg_xlogfile_name(write_location) FROM > pg_stat_replication; > write_location | pg_xlogfile_name > ----------------+-------------------------- > 0/3000888 | 000000010000000000000003 > (1 row) > (ps displays the write location for WAL receiver processes) > > Note that this is not a bug, this question is more adapted to > pgsql-general for example. > Hello, I understand this is not a bug in the sense that it displays wrong information, nor that I cannot get the information in a different way. The problem is that the proctitle functionality, which is very convenient and much faster than typing the SELECT above, is diminished by easily misleading people when it displays this id in hex encoding without zero padding. To monitor progress I found people tend to only look at the first 2 digits without counting the length. Colleague were tripped up by this independently already, and I really think zero padding would be useful there. For the non-experts in the ops team using ps is much more easy and natural too. If you don't agree just drop the issue. -Jürgen -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs