git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 4cd7a18) | patch
Unset MyBEEntry, making elog.c's call to pgstat_get_my_query_id() safe.
2021年8月19日 11:59:06 +0000 (04:59 -0700)
2021年8月19日 12:07:53 +0000 (05:07 -0700)
commit bed5eac2d50eb86a254861dcdea7b064d10c72cf
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-
src/backend/utils/activity/backend_status.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /