pgsql: Change ps_status.c to explicitly track the current logical length - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Change ps_status.c to explicitly track the current logical length
Date
Msg-id 20100527192016.E07E57541D3@cvs.postgresql.org
Whole thread Raw
List 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_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/misc:
        ps_status.c (r1.23.4.1 -> r1.23.4.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/ps_status.c?r1=1.23.4.1&r2=1.23.4.2)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Change ps_status.c to explicitly track the current logical length
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Rejigger mergejoin logic so that a tuple with a null in the first