Re: Order of pg_stat_activity timestamp columns - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Order of pg_stat_activity timestamp columns
Date
Msg-id 26354.1268861407@sss.pgh.pa.us
Whole thread Raw
In response to Re: Order of pg_stat_activity timestamp columns  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Order of pg_stat_activity timestamp columns
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> It would scan better, to my mind, if we moved backend_start ahead of
> xact_start.

The current column ordering can be rationalized to some extent as
1. identity info (user id, db id, application name)2. current query info3. session info (backend start time, client
addr/port)

Putting backend_start first doesn't fit at all with that view of the
grouping.  xact_start is sort of a borderline case, although one
could imagine that it might someday grow some friends and become a
full-fledged "current transaction info" grouping.  So I'd prefer to
see it in between the columns that are clearly #2 and those that are
clearly #3.

If you believe that argument, there is a case for moving procpid into
group #3.  I'm more hesitant to mess with the columns that have "always
been there" than those that got added in more recent releases, though.
It's possible also that some people might consider procpid as an identity
(key) column, in which case it's okay where it is.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Order of pg_stat_activity timestamp columns
Next
From: Simon Riggs
Date:
Subject: Re: Getting to beta1