Re: ClosePipeStream failure ignored in pg_import_system_collations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ClosePipeStream failure ignored in pg_import_system_collations
Date
Msg-id 777.1558650225@sss.pgh.pa.us
Whole thread Raw
In response to ClosePipeStream failure ignored in pg_import_system_collations  (Mark Dilger <hornschnorter@gmail.com>)
Responses Re: ClosePipeStream failure ignored in pg_import_system_collations  (Mark Dilger <hornschnorter@gmail.com>)
List pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> I only see three invocations of ClosePipeStream in the sources.
> In two of them, the return value is checked and an error is raised
> if it failed.  In the third, the error (if any) is squashed.

> I don't know if a pipe stream over "locale -a" could ever fail to
> close, but it seems sensible to log an error if it does.

The concrete case where that's an issue, I think, is that "locale -a"
fails, possibly after outputting a few locale names.  The only report
we get about that is a failure indication from ClosePipeStream.
As things stand we just silently push on, creating no or a few collations.
With a check, we'd error out ... causing initdb to fail altogether.

Maybe that's an overreaction; I'm not sure.  Perhaps the right
thing is just to issue a warning?  But ignoring it completely
seems bad.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Remove useless associativity/precedence from parsers
Next
From: Andres Freund
Date:
Subject: Re: pg_dump throwing "column number -1 is out of range 0..36" on HEAD