Re: [PG19] Wrong results from Memoize with a nondeterministic collation - Mailing list pgsql-hackers

From Manu
Subject Re: [PG19] Wrong results from Memoize with a nondeterministic collation
Date
Msg-id 179156747020.330936.13366793239698644432@gmail.com
Whole thread
In response to Re: [PG19] Wrong results from Memoize with a nondeterministic collation  (shihao zhong <zhong950419@gmail.com>)
List pgsql-hackers
Hi Shihao,

> Yes, please post the hand-placed hunks for 14 to 16.

Attached, one per branch.  In 14-16 paraminfo_get_equal_hashops has no
list_member() dedup, so the block goes right after the clause's outer
expr is chosen and before it is appended to *param_exprs, so the
canonicalized expr is what becomes the cache key.

I re-verified each on the current tip of its branch (14.24, 15.19,
16.15): make check passes, and the stress oracle (enable_memoize on vs
off over a matrix of nondeterministic-collation shapes) goes from 39/52
wrong cases to 0/52, with identical row counts.  For contrast I also
built the mechanical fuzz-placed hunk: it compiles and make check still
passes, but it puts the block after the append and leaves all 39 cases
wrong, which is why these are placed by hand.

The LEFT JOIN case is the one reachable on 14-16; the anti-join path is
19+ only.

Regards,
Manu

Attachment

pgsql-hackers by date:

Previous
From: Rui Zhao
Date:
Subject: Re: fix more casting away of qualifiers
Next
From: Bharath Rupireddy
Date:
Subject: Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers