aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regcomp.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2021-08-19 04:59:06 -0700
committerAndres Freund <andres@anarazel.de>2021-08-19 05:15:28 -0700
commit18914f24ec6e704e81a5528cf09f3d54b23ef12b (patch)
treeb0bb5a6d7e73c6f88befad42456acce36382ed23 /src/backend/regex/regcomp.c
parente1915646658def5dd87331ac77fb9d8d0abd763b (diff)
downloadpostgresql-18914f24ec6e704e81a5528cf09f3d54b23ef12b.tar.gz
postgresql-18914f24ec6e704e81a5528cf09f3d54b23ef12b.zip
Unset MyBEEntry, making elog.c's call to pgstat_get_my_query_id() safe.
Previously log messages late during shutdown could end up using either another backend's PgBackendStatus (multi user) or segfault (single user) because pgstat_get_my_query_id()'s check for !MyBEEntry didn't filter out use after pgstat_beshutdown_hook(). This became a bug in 4f0b0966c86, but was a bit fishy before. But given there's no known problematic cases before 14, it doesn't seem worth backpatching further. Also fixes a wrong filename in a comment, introduced in e1025044. Reported-By: Andres Freund <andres@anarazel.de> Reviewed-By: Julien Rouhaud <rjuju123@gmail.com> Discussion: https://postgr.es/m/Julien Rouhaud <rjuju123@gmail.com> Backpatch: 14-
Diffstat (limited to 'src/backend/regex/regcomp.c')
0 files changed, 0 insertions, 0 deletions