More DSM slot exhaustion bugs

Started by Thomas Munroalmost 7 years ago1 messageshackers
Jump to latest
#1Thomas Munro
thomas.munro@gmail.com

Hello,

Here are two more bugs I found by running the regression tests
repeatedly with dsm_create() hacked to fail at random.

1. If find_or_make_matching_shared_tupledesc() fails, we leave behind
a null pointer in RecordCacheHash, so that a later lookup segfaults.

2. If we do a rescan, then ExecHashJoinReInitializeDSM() needs to
return early if there is no DSM segment, otherwise a TOC lookup raises
a bogus error.

Here are some draft patches.

Attachments:

t41880_1
0001-Fix-shared-typmod-bug-on-DSM-slot-exhaustion.patchapplication/octet-stream; name=0001-Fix-shared-typmod-bug-on-DSM-slot-exhaustion.patchDownload+6-4
0002-Fix-parallel-hash-join-rescan-on-DSM-exhaustion.patchapplication/octet-stream; name=0002-Fix-parallel-hash-join-rescan-on-DSM-exhaustion.patchDownload+7-3
0003-Inject-random-faults-into-dsm_create.patchapplication/octet-stream; name=0003-Inject-random-faults-into-dsm_create.patchDownload+7-1