Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Date
Msg-id 10432.1297963394@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I know that in Java you can get a positive number less than the full
> size as an indication that part of the block was written, and you
> must loop to write until you get all of it written (or get an error
> return).  At this page, it appears that the same is true of the
> write function in C:

This is appropriate when writing to sockets etc, where the kernel is
willing to reflect details like packet boundaries back to userspace.
I have never seen nor heard of it being true for writes to disk files,
except for the case of out-of-disk-space, in which it is quite unlikely
that looping is a good thing to do.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Next
From: Stephen Frost
Date:
Subject: Re: Debian readline/libedit breakage