From: J Chapman Flack <jflack@math.purdue.edu>
To: Dilip Kumar <dilipbalaut@gmail.com>
To: Artus de benque <artusdebenque@gmail.com>
Cc: pgsql-bugs@postgresql.org, pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger
Date: Mon, 19 Jun 2017 14:18:50 -0400
Message-ID: <3b45ea7f-3434-8d97-9177-f1174131fc9a@math.purdue.edu> (raw)
In-Reply-To: <CAFiTN-tQat3h8qDVH1Z+KpYOL_PwCG0zYDzfbt-YnRxByfhSvw@mail.gmail.com>
References: <CAHhcnVQESG2XkF+JATAQF20TXUHDcvzw4k4JAsLhF7bJzhfriQ@mail.gmail.com>
<CAFiTN-tQat3h8qDVH1Z+KpYOL_PwCG0zYDzfbt-YnRxByfhSvw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 06/19/2017 11:40 AM, Dilip Kumar wrote:
> ... Artus de benque ... wrote:
>> ...=# UPDATE test_table SET field = rpad('', 2001, 'a') WHERE id = 1;
>
> Seems like in "suppress_redundant_updates_trigger" we are comparing
> toasted tuple with the new tuple and that is the cause of the bug.
Something still puzzles me about this, though, maybe only because
I don't know enough about TOAST.
The size of 'field' ends up 2001, or just over the threshold where
TOASTing will be attempted at all. The report doesn't mention changing
the strategy from the default EXTENDED, so won't the first thing
attempted be compression? Won't that succeed spectacularly, since the
test string is a single character 2001 times, probably producing
a compressed string a handful of bytes long, well under the threshold,
obviating any need to go further with TOAST pointers?
Is the compression algorithm nondeterministic? Is there some way
that compressing the same 2001*'a' on two occasions would produce
compressed strings that don't match?
What exactly is s_r_u_t() comparing, in the case where the TOASTed
value has been compressed, but not out-of-lined?
-Chap
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jflack@math.purdue.edu, dilipbalaut@gmail.com, artusdebenque@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger
In-Reply-To: <3b45ea7f-3434-8d97-9177-f1174131fc9a@math.purdue.edu>
References: <CAHhcnVQESG2XkF+JATAQF20TXUHDcvzw4k4JAsLhF7bJzhfriQ@mail.gmail.com> <CAFiTN-tQat3h8qDVH1Z+KpYOL_PwCG0zYDzfbt-YnRxByfhSvw@mail.gmail.com> <3b45ea7f-3434-8d97-9177-f1174131fc9a@math.purdue.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox