pgsql: Don't add bailout adjustment for non-strict deserialize calls.

From: Andrew Gierth <rhodiumtoad(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't add bailout adjustment for non-strict deserialize calls.
Date: 2021-01-28 11:35:53
Message-ID: E1l55ab-0004o3-Mc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't add bailout adjustment for non-strict deserialize calls.

When building aggregate expression steps, strict checks need a bailout
jump for when a null value is encountered, so there is a list of steps
that require later adjustment. Adding entries to that list for steps
that aren't actually strict would be harmless, except that there is an
Assert which catches them. This leads to spurious errors on asserts
builds, for data sets that trigger parallel aggregation of an
aggregate with a non-strict deserialization function (no such
aggregates exist in the core system).

Repair by not adding the adjustment entry when it's not needed.

Backpatch back to 11 where the code was introduced.

Per a report from Darafei (Komzpa) of the PostGIS project; analysis
and patch by me.

Discussion: https://postgr.es/m/87mty7peb3.fsf@news-spur.riddles.org.uk

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f7f2a28d4350daeeb60f72e97e463528da0f47a7

Modified Files
--------------
src/backend/executor/execExpr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2021-01-28 12:41:09 pgsql: Add mbverifystr() functions specific to each encoding.
Previous Message Michael Paquier 2021-01-28 07:25:25 pgsql: Fix crash of pg_stat_statements_info() without library loaded