Skip site navigation (1) Skip section navigation (2)

pgsql: Change ps_status.c to explicitly track the current logical length

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change ps_status.c to explicitly track the current logical length
Date: 2010-05-27 19:19:44
Message-ID: 20100527191944.B44EB7541D2@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Change ps_status.c to explicitly track the current logical length of ps_buffer.
This saves cycles in get_ps_display() on many popular platforms, and more
importantly ensures that get_ps_display() will correctly return an empty
string if init_ps_display() hasn't been called yet.  Per trouble report
from Ray Stell, in which log_line_prefix %i produced junk early in backend
startup.

Back-patch to 8.0.  7.4 doesn't have %i and its version of get_ps_display()
makes no pretense of avoiding pad junk anyhow.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/misc:
        ps_status.c (r1.39 -> r1.39.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/ps_status.c?r1=1.39&r2=1.39.2.1)

pgsql-committers by date

Next:From: Tom LaneDate: 2010-05-27 19:19:50
Subject: pgsql: Change ps_status.c to explicitly track the current logical length
Previous:From: Tom LaneDate: 2010-05-27 19:19:38
Subject: pgsql: Change ps_status.c to explicitly track the current logical length

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group