Avoid overwiriting cache entry (src/backend/utils/cache/relcache.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Avoid overwiriting cache entry (src/backend/utils/cache/relcache.c)
Date
Msg-id CAEudQAr=i3_Z4GvmediX900+sSySTeMkvuytYShhQqEwoGyvhA@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi.

In function *CheckNNConstraintFetch* the array index is
incremented only when "null combin" is not found.

IMO the last cache entry can be overwriting if the next tuple is null,
because, the fill array fields is not syncronized with array index increment.

Fix by moving the array fill.

patch attached.

best regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Damien Clochard
Date:
Subject: Re: [PATCH] Generate random dates/times in a specified range
Next
From: Ashutosh Bapat
Date:
Subject: Marking shared buffer lookup table as HASH_FIXED_SIZE