From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Peter Smith <smithpb2250(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Improve the connection failure error messages |
Date: | 2024-07-11 17:30:23 |
Message-ID: | 2189315.1720719023@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> writes:
> Attached the patch v6 with suggested improvements.
> - Removed unnecessary translator comments.
> - Added appropriate identifier names where missing.
I think this is generally OK, although one could argue that it's
violating our message style guideline that primary error messages
should be short [1]. The text itself isn't that bad, but once you
tack on a libpq connection failure message it's hard to claim that
the result "fits on one line".
Another way we could address this that'd reduce that problem is to
leave the primary messages as-is and add an errdetail or errcontext
message to show what's throwing the error. However, I'm not convinced
that's better. The main argument against it is that detail/context
lines can get lost, eg if you're running the server in terse logging
mode.
On balance I think it's OK, so I pushed it. I did take out a couple
of uses of "logical replication" that seemed unnecessary and were
making the length problem worse.
regards, tom lane
[1] https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-WHAT-GOES-WHERE
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-07-11 18:00:09 | Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal |
Previous Message | Alexander Lakhin | 2024-07-11 17:00:00 | Re: speed up a logical replica setup |