aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2024-01-23 14:20:14 -0600
committerNathan Bossart <nathan@postgresql.org>2024-01-23 14:20:14 -0600
commitbcd5b4bcbefc8b99be3678cf9c6c990a0c28f68e (patch)
treed52f3e76e8a8740086b7f9c146c8297ba3184731 /src/backend/utils/adt/jsonfuncs.c
parent79b03dbb3304539c6599593397c6a6b63b6a6ad9 (diff)
downloadpostgresql-bcd5b4bcbefc8b99be3678cf9c6c990a0c28f68e.tar.gz
postgresql-bcd5b4bcbefc8b99be3678cf9c6c990a0c28f68e.zip
Fix crash in autoprewarm.
Commit abb0b4fc03 moved the shared state for autoprewarm to a dynamic shared memory (DSM) segment, but it left apw_detach_shmem() in the on_shmem_exit callback list for the autoprewarm leader process. This is a problem because shmem_exit() detaches all the DSM segments prior to calling the on_shmem_exit callbacks, thus producing segfaults in the exit path for the autoprewarm leader process. To fix, move apw_detach_shmem() to the before_shmem_exit callback list. This commit also adds a check to pg_prewarm's test that the server shut down normally. It might be worth making this a common check for all shutdowns in TAP tests, but that is left as a future exercise. Reported-by: Andres Freund Reviewed-by: Andres Freund, Álvaro Herrera Discussion: https://postgr.es/m/20240122204117.swton324xcoodnyi%40awork3.anarazel.de
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions