aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spginsert.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-23 10:17:52 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-09-23 10:40:25 +0300
commit62ff6556ab588a05259b33bd1a9d663fad96648b (patch)
tree4f6950bffc2dd63c0718f5b54220e7ebc13f9255 /src/backend/access/spgist/spginsert.c
parent3451faaec81c8d19acdb243bfc22598c33ab074d (diff)
downloadpostgresql-62ff6556ab588a05259b33bd1a9d663fad96648b.tar.gz
postgresql-62ff6556ab588a05259b33bd1a9d663fad96648b.zip
Fix two timeline handling bugs in pg_receivexlog.
When a timeline history file is fetched from server, it is initially created with a temporary file name, and renamed to place. However, the temporary file name was constructed using an uninitialized buffer. Usually that meant that the file was created in current directory instead of the target, which usually goes unnoticed, but if the target is on a different filesystem than the current dir, the rename() would fail. Fix that. The second issue is that pg_receivexlog would not take .partial files into account when determining when scanning the target directory for existing WAL files. If the timeline has switched in the server several times in the last WAL segment, and pg_receivexlog is restarted, it would choose a too old starting point. That's not a problem as long as the old WAL segment exists in the server and can be streamed over, but will cause a failure if it's not. Backpatch to 9.3, where this timeline handling code was written. Analysed by Andrew Gierth, bug #8453, based on a bug report on IRC.
Diffstat (limited to 'src/backend/access/spgist/spginsert.c')
0 files changed, 0 insertions, 0 deletions