Re: Testing the return value of fclose() in the backend

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Testing the return value of fclose() in the backend
Date: 2003-05-31 02:54:35
Message-ID: 200305310254.h4V2sZP18444@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Sherry wrote:
> Hi all,
>
> There are various places in the backend, such as FreeFile(), where the
> return value of fclose() is not tested. Whilst we would often notice any
> problems with writing to data files due to testing on fsync(), it could
> affect things like COPY ... TO, CreateOptsFile() and more.
>
> Are we catching these somewhere else I'm not seeing?

We are not checking fclose, probably because fclose failures are quite
rare. Should we be concerned?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2003-05-31 03:06:15 Re: Testing the return value of fclose() in the backend
Previous Message Christopher Browne 2003-05-31 02:52:55 Compressing Fields?