aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-11 12:15:41 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-11 12:15:41 -0500
commit6170386c7fc1c1cfd7c2a655b8107872d18a0193 (patch)
tree07d4d01f3c99346b4ede3c603318b63c5fc4db3b /src/backend/executor/execParallel.c
parent59947bac7384ac56b5c95c69dee7655e2ed810df (diff)
downloadpostgresql-6170386c7fc1c1cfd7c2a655b8107872d18a0193.tar.gz
postgresql-6170386c7fc1c1cfd7c2a655b8107872d18a0193.zip
Fix misbehavior in contrib/pg_trgm with an unsatisfiable regex.
If the regex compiler can see that a regex is unsatisfiable (for example, '$foo') then it may emit an NFA having no arcs. pg_trgm's packGraph function did the wrong thing in this case; it would access off the end of a work array, and with bad luck could produce a corrupted output data structure causing more problems later. This could end with wrong answers or crashes in queries using a pg_trgm GIN or GiST index with such a regex. Fix by not trying to de-duplicate if there aren't at least 2 arcs. Per bug #17830 from Alexander Lakhin. Back-patch to all supported branches. Discussion: https://postgr.es/m/17830-57ff5f89bdb02b09@postgresql.org
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions