Re: Crash with empty dictionary

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hamid Quddus Akhtar <hamid(dot)akhtar(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Crash with empty dictionary
Date: 2007-08-22 14:24:41
Message-ID: 200708221424.l7MEOfY03219@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Hamid Quddus Akhtar" <hamid(dot)akhtar(at)enterprisedb(dot)com> writes:
> >> Offhand I'd say that an empty file is a legitimate corner case,
> >> so we should just take it silently.
>
> > Shouldn't we be warning about an empty file rather than just swallowing
> > up the error?
>
> You are jumping to a conclusion, namely that it is an error. If it's
> a legitimate corner case, throwing a warning every time the file is
> read would be incredibly annoying.
>
> If it's not a legitimate case, then we should throw a real error.
> A warning just strikes me as the worst of both worlds.

A zero-length file seems fine to me in this case.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-22 14:33:06 Re: PG Seg Faults Performing a Query
Previous Message Tom Lane 2007-08-22 14:18:27 Re: Crash with empty dictionary