Error logging messages

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Error logging messages
Date: 2022-04-13 11:51:16
Message-ID: 9BCE7646-BCEE-424D-AB2C-DACEA6B9E8F6@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When reviewing the patch in "Frontend error logging style" [0] I noticed that
some messages could do with a little bit of touching up. The original review
was posted and responded to in that thread, but to keep goalposts in place it
was put off until that patch had landed. To avoid this getting buried in that
thread I decided to start a new one with the findings from there. To make
reviewing easier I split the patch around the sorts of changes proposed.

0001: Makes sure that database and file names are printed quoted. This patch
has hunks in contrib and backend as well.

0002: Capitalizes pg_log_error_detail and conversely starts pg_log_error with a
lowercase letter without punctuation.

0003: Extend a few messages with more information to be more consistent with
other messages (and more helpful).

0004: Add pg_log_error() calls on all calls to close in pg_basebackup. Nearly
all had already, and while errors here are likely to be rare, when they do
happen something is really wrong and every bit of information can help
debugging.

0005: Put keywords as parameters in a few pg_dump error messages, to make their
translations reuseable.

--
Daniel Gustafsson https://vmware.com/

[0] https://postgr.es/m/1363732.1636496441@sss.pgh.pa.us

Attachment Content-Type Size
0005-Parameterize-values-to-lessen-translation-burden.patch application/octet-stream 2.7 KB
0004-Add-errorhandling-on-file-close.patch application/octet-stream 1.8 KB
0003-Add-additional-information-to-be-more-helpful.patch application/octet-stream 1.3 KB
0002-pg_log_error-and-pg_log_error_detail-capitalization-.patch application/octet-stream 11.4 KB
0001-Ensure-file-and-database-names-are-quoted.patch application/octet-stream 3.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Borisov 2022-04-13 11:51:30 Re: Unit tests for SLRU
Previous Message John Naylor 2022-04-13 11:19:19 Re: A qsort template