Re: what does this mean: "running xacts with xcnt == 0"

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: what does this mean: "running xacts with xcnt == 0"
Date: 2014-11-12 18:04:12
Message-ID: CA+TgmoYaaqEfdPjiCLO055Svm58+Fb8PEaEZgV0wnaFxZV5xAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 12, 2014 at 12:47 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> >> > So maybe 'Encountered xl_running_xacts record with xcnt = 0.'?
>> >>
>> >> That's not very user-facing, is it -- I mean, why bother the user with
>> >> the names of structs and members thereof? It seems better to describe
>> >> what the condition is; something like "found point in time with no
>> >> running transaction". Maybe "point in time" should be "WAL record"
>> >> instead.
>> >
>> > Is that really a win in clarity? When analyzing a problem I'd much
>> > rather have a concrete hint than something fuzzy.
>>
>> You can't phrase error messages in terms of internal concepts that 99%
>> of users won't understand or care about. Like Peter says, user-facing
>> error messages need to be written in English, not C.
>
> That's not the actual message, but an errdetail() - and lots of those
> refer to internals? And it's not an error, but a log message? E.g. we
> add error contexts for wal replay errors that print the internals
> literaly? And it's *really* helpful?

Like what? That's the only errdetail() currently in the tree that
contains ==, for example.

I see there are three different detail messages associated with this
error message. You don't really need these messages to be phrased in
any; it's enough to have the messages be different from each other.

1. found initial snapshot in snapbuild file
2. Transaction ID %u finished; no more running transactions.
3. running xacts with xcnt == 0

The second one follows style guidelines, but the other two do not.

I suggest:

1. Logical decoding will begin using saved snapshot.
2. Transaction ID %u finished; no more running transactions.
3. There are no running transactions.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-11-12 18:06:26 Re: recovery_target_time and standby_mode
Previous Message Fujii Masao 2014-11-12 18:01:36 Re: alter user set local_preload_libraries.