Re: Remove FATAL from pg_lzdecompress

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Remove FATAL from pg_lzdecompress
Date: 2008-03-08 01:13:11
Message-ID: 12595.1204938791@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> I attach patch which adds boundaries check and memory overwriting
> protection when compressed data are corrupted.

Applied with revisions --- it appeared to me that it got the corner case
wrong where we find a tag just at the end of the input but there's no
room for the output. We'd fall out of the loop and then the error
test would think all is well.

> I did not add any extra information into the message. Reasonable
> solution seems to be use errcontext how was recommended by Alvaro. But I
> 'm not sure if printtup is good place for it, because pg_detoast is
> called from many places. However, is can be solved in separate patch.

I'm still unconvinced that that's worth any added complexity or
slowdown.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-03-08 09:35:26 Re: CopyReadLineText optimization
Previous Message Andrew Dunstan 2008-03-08 00:16:11 Re: CopyReadAttributesCSV optimization