"txn" in pg_stat_activity

Started by Tom Laneover 18 years ago3 messages
#1Tom Lane
tgl@sss.pgh.pa.us

I have just noticed that a column "txn_start" has appeared in
pg_stat_activity since 8.2. It's a good idea, but who chose the name?
We do not use that abbreviation for "transaction" anywhere else in
Postgres, certainly not in any user-exposed places.

I'm inclined to rename it to "xact_start", which is an abbreviation
that we *do* use in the code, and in some user-visible places, eg,
pg_stat_database has "xact_commit" and "xact_rollback" columns.

Other suggestions? If we don't change it before 8.3 beta starts,
we'll be stuck with it ...

regards, tom lane

#2Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#1)
Re: "txn" in pg_stat_activity

On Mon, 2007-09-10 at 21:04 -0400, Tom Lane wrote:

I have just noticed that a column "txn_start" has appeared in
pg_stat_activity since 8.2. It's a good idea, but who chose the name?

Me.

I'm inclined to rename it to "xact_start", which is an abbreviation
that we *do* use in the code, and in some user-visible places, eg,
pg_stat_database has "xact_commit" and "xact_rollback" columns.

I personally find "xact" to be a less intuitive abbreviation of
"transaction" than "txn", but for the sake of consistency, I agree it is
probably better to use "xact_start".

-Neil

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#2)
Re: "txn" in pg_stat_activity

Neil Conway <neilc@samurai.com> writes:

I personally find "xact" to be a less intuitive abbreviation of
"transaction" than "txn", but for the sake of consistency, I agree it is
probably better to use "xact_start".

Barring other objections, I'll go make this happen.

regards, tom lane