diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-05-15 19:59:29 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-05-15 20:00:52 -0400 |
commit | 1d3743023ef8fa665902e791b0d52e9a1ab419cb (patch) | |
tree | 7cf3a1fb6c6c2cf21a342beaf33cc662af4d01ec /src/backend/utils/adt/lockfuncs.c | |
parent | 14a91010912632cae322b06fce0425faedcf7353 (diff) | |
download | postgresql-1d3743023ef8fa665902e791b0d52e9a1ab419cb.tar.gz postgresql-1d3743023ef8fa665902e791b0d52e9a1ab419cb.zip |
Fix walsender error cleanup code
In commit 850196b610d2 I (Álvaro) failed to handle the case of walsender
shutting down on an error before setting up its 'xlogreader' pointer;
the error handling code dereferences the pointer, causing a crash.
Fix by testing the pointer before trying to dereference it.
Kyotaro authored the code fix; I adopted Nathan's test case to be used
by the TAP tests and added the necessary PostgresNode change.
Reported-by: Nathan Bossart <bossartn@amazon.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/C04FC24E-903D-4423-B312-6910E4D846E5@amazon.com
Diffstat (limited to 'src/backend/utils/adt/lockfuncs.c')
0 files changed, 0 insertions, 0 deletions