Re: pgstat: remove delayed destroy / pipe: socketerror fix - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: pgstat: remove delayed destroy / pipe: socketerror fix
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0F8E1@algol.sollentuna.se
Whole thread Raw
List pgsql-patches
> > BTW, what's with the change to all the error msgs?
> Ah, I'd assumed the %ui was a typo in the format string.  If
> the intent was to print e.g. 10022i, I'll change it back.

Eh. No, it certainly wasn't. Keep the change :)


> > And finally, the error handling looks a bit off? We specifically
> *don't*
> > want it to log an error for the WSAECONNRESET state - it's a normal
> > state. Or am I reading the patch wrong?
> If error is WSAECONNRESET, the return value is reset to zero.
>  That will prevent an error message from being displayed
> (unless I'm reading something wrong).

Ah. Right. Reading it again I see that you're correct there as well. My
bad.


> > Do you get anything at all in the logs when this happens? Are you
> sure
> > the reason is that it picks up an empty file, or could it be
> something
> > else?
> There is nothing in the logs.  It could definitely be something else.
> A rename race condition was just our best theory.

Ok. Well, I won't say it's impossible, but MoveFile() *should* be
atomic. It could well have something to do with sharing violations
though - our code should deal with that, but there's always a risk.

//Magnus

pgsql-patches by date:

Previous
From: "Peter Brant"
Date:
Subject: Re: pgstat: remove delayed destroy / pipe: socket
Next
From: Tom Lane
Date:
Subject: Re: pgstat: remove delayed destroy / pipe: socket error fix