Checking pgwin32_is_junction() errors - Mailing list pgsql-hackers

From Thomas Munro
Subject Checking pgwin32_is_junction() errors
Date
Msg-id CA+hUKGLfOOeyZpm5ByVcAt7x5Pn-=xGRNCvgiUPVVzjFLtnY0w@mail.gmail.com
Whole thread Raw
Responses Re: Checking pgwin32_is_junction() errors  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

The comment for pgwin32_is_junction() says "Assumes the file exists,
so will return false if it doesn't (since a nonexistent file is not a
junction)".  In fact that's the behaviour for any kind of error, and
although we set errno in that case, no caller ever checks it.

I think it'd be better to add missing_ok and elevel parameters,
following existing patterns.  Unfortunately, it can't use the generic
frontend logging to implement elevel in frontend code from its current
location, because pgport can't call pgcommon.  For now I came up with
a kludge to work around that problem, but I don't like it, and would
need to come up with something better...

Sketch code attached.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Failed transaction statistics to measure the logical replication progress
Next
From: "shiy.fnst@fujitsu.com"
Date:
Subject: RE: logical replication empty transactions