Re: pg_lzcompress patch for 8.3, 8.2 branch

Lists: pgsql-patches
From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: pg_lzcompress patch for 8.3, 8.2 branch
Date: 2008-05-28 13:07:09
Message-ID: 483D58FD.9090404@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

I attached backported pg_lzcompress patch which is already in head for version
8.2 and 8.3.

Version 8.1 and prior contains more changes in decompress code and they does not
contain any check. Shell I backported it as well or it will be better to keep it
untouched?

Zdenek

Attachment Content-Type Size
pg_lzcompress.patch.82 text/plain 4.1 KB
pg_lzcompress.patch.83 text/plain 4.1 KB

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: pg_lzcompress patch for 8.3, 8.2 branch
Date: 2008-05-28 21:11:50
Message-ID: 5878.1212009110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> I attached backported pg_lzcompress patch which is already in head for version
> 8.2 and 8.3.

> Version 8.1 and prior contains more changes in decompress code and they does not
> contain any check. Shell I backported it as well or it will be better to keep it
> untouched?

AFAICS the only nontrivial patch in pg_lzcompress.c between 7.4 and 8.2
is my cleanup patch here:
http://archives.postgresql.org/pgsql-committers/2006-10/msg00076.php
That's been in the tree long enough that I wouldn't have any hesitation
about back-porting it, so that all the supported versions would have
the same lzcompress code. About the only reason I can see not to do it
is that conceivably some third-party code somewhere might be calling
pglz_compress directly; in which case an API change in a minor release
would be a problem for them.

On the other hand, I remain unconvinced that this problem is severe
enough to justify much backporting work. AFAIK we've only seen one
occurence of a problem to date.

Thoughts?

regards, tom lane


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_lzcompress patch for 8.3, 8.2 branch
Date: 2008-05-29 13:01:58
Message-ID: 483EA946.80008@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane napsal(a):
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> I attached backported pg_lzcompress patch which is already in head for version
>> 8.2 and 8.3.
>
>> Version 8.1 and prior contains more changes in decompress code and they does not
>> contain any check. Shell I backported it as well or it will be better to keep it
>> untouched?
>
> AFAICS the only nontrivial patch in pg_lzcompress.c between 7.4 and 8.2
> is my cleanup patch here:
> http://archives.postgresql.org/pgsql-committers/2006-10/msg00076.php
> That's been in the tree long enough that I wouldn't have any hesitation
> about back-porting it, so that all the supported versions would have
> the same lzcompress code.

OK I will backport your and my patch together back to the 7.4.

> About the only reason I can see not to do it
> is that conceivably some third-party code somewhere might be calling
> pglz_compress directly; in which case an API change in a minor release
> would be a problem for them.

Hmm, It brings me idea that we should have some stable API definition for C
function. For example API for datatype helps to upgrade user datatypes
without any changes (no recompilation). The same model uses e.g. Solaris for
driver. Binary drivers are compatible and drivers from S8 should work on S10.

> On the other hand, I remain unconvinced that this problem is severe
> enough to justify much backporting work. AFAIK we've only seen one
> occurence of a problem to date.

I know about two occurrence. One was reported on -bug
(http://archives.postgresql.org/pgsql-bugs/2008-04/msg00206.php)
and second was reported from our customer.

The main problem is that you are not able to fix corrupted data. When database
raise error on damaged data you are able to catch this error and remove affected
row. If database crashes than only gdb guru is able to mine ctid of affected row
or any other row specification from core dump.

Zdenek


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: pg_lzcompress patch for 8.3, 8.2 branch
Date: 2008-05-29 13:51:18
Message-ID: 26052.1212069078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> Tom Lane napsal(a):
>> On the other hand, I remain unconvinced that this problem is severe
>> enough to justify much backporting work. AFAIK we've only seen one
>> occurence of a problem to date.

> I know about two occurrence. One was reported on -bug
> (http://archives.postgresql.org/pgsql-bugs/2008-04/msg00206.php)
> and second was reported from our customer.

I'm still not impressed. Bear in mind that the patch you are so eager
to backport has received *zero* field testing, which means there's a
non-negligible risk that there's something wrong with it. Add on the
non-negligible risk of messing up something associated with back-porting
the earlier patch, and consider that back-branch minor releases go out
with no field testing to speak of (there's the build farm but that's
about it). You have to seriously question whether the risk is worth
what is surely an extremely marginal stability improvement.

On the whole I think we've done enough here.

regards, tom lane


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_lzcompress patch for 8.3, 8.2 branch
Date: 2008-05-29 14:46:18
Message-ID: 483EC1BA.2090203@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane napsal(a):
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> Tom Lane napsal(a):
>>> On the other hand, I remain unconvinced that this problem is severe
>>> enough to justify much backporting work. AFAIK we've only seen one
>>> occurence of a problem to date.
>
>> I know about two occurrence. One was reported on -bug
>> (http://archives.postgresql.org/pgsql-bugs/2008-04/msg00206.php)
>> and second was reported from our customer.
>
> I'm still not impressed. Bear in mind that the patch you are so eager
> to backport has received *zero* field testing, which means there's a
> non-negligible risk that there's something wrong with it.

Our customers uses the patch (version 8.2) on 2TB heavy loaded table which
contains text field with average size ~10kB. He have used it for two months
without any problem. I think it is good field testing. It helped him to fix
corrupted data problems without any random crash or downtime.

> Add on the
> non-negligible risk of messing up something associated with back-porting
> the earlier patch, and consider that back-branch minor releases go out
> with no field testing to speak of (there's the build farm but that's
> about it). You have to seriously question whether the risk is worth
> what is surely an extremely marginal stability improvement.

I don't need it to backport to 8.1 and older. Yeah, It was my eager activity.
I'm happy with 8.3 and 8.2 backport.

thanks Zdenek