Andres Freund <andres@anarazel.de> writes:
> On 2022-01-23 18:11:41 -0500, Tom Lane wrote:
>> Anyway, trying to figure out whether we're on a Debian package with this
>> mistake doesn't seem any cleaner than what I proposed. (In particular,
>> blindly changing to a different scheme without a check to see what's really
>> in the filesystem seems doomed to failure.)
> If we make it depend on _get_default_scheme() == 'posix_local' that shouldn't
> be a risk, because that's the debian addition...
Yeah, but we don't know whether there are any versions of the Debian
packaging in which they fixed the file layout, so that 'posix_local'
actually does describe the layout. I do not think that we are wise
to suppose we know which scheme to use without a check on what's
actually there.
I could go for "if we don't see Python.h where it's claimed to be,
try again with scheme = posix_prefix". But I'm still not convinced
that that's noticeably cleaner than the hack I suggested.
regards, tom lane