Re: Using XLogFileNameP in critical section - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Using XLogFileNameP in critical section
Date
Msg-id 20191203123500.GA2020@alvherre.pgsql
Whole thread Raw
In response to Re: Using XLogFileNameP in critical section  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Using XLogFileNameP in critical section  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Using XLogFileNameP in critical section  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2019-Dec-03, Michael Paquier wrote:

> Per the low probability of the failures, I did not backpatch that
> stuff.  I quickly looked at applying that further down, and attached
> is a version for v12 FWIW, and I suspect much more conflicts the more
> you go down (wal segment size added in 11, different code paths for
> replication, etc.).

You didn't attach anything, but I concur about the low probability
aspect: the assertion failure does not occur in production builds
(obviously); and only an out-of-memory situation is a real problem when
an fsync fails.  Anyway this should be a very localized fix, right?

I'm not sure that the internationalization stuff in issue_xlog_fsync is
correct.  I think the _() should be gettext_noop(), or alternatively the
errmsg() should be errmsg_internal(); otherwise the translation is
invoked twice.  (I didn't verify this.)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: fe-utils - share query cancellation code
Next
From: Rafia Sabih
Date:
Subject: Minor comment fixes for instrumentation.h