postgresql/src/backend/access
Heikki Linnakangas 7cbee7c0a1 At promotion, don't leave behind a partial segment on the old timeline.
With commit de768844, a copy of the partial segment was archived with the
.partial suffix, but the original file was still left in pg_xlog, so it
didn't actually solve the problems with archiving the partial segment that
it was supposed to solve. With this patch, the partial segment is renamed
rather than copied, so we only archive it with the .partial suffix.

Also be more robust in detecting if the last segment is already being
archived. Previously I used XLogArchiveIsBusy() for that, but that's not
quite right. With archive_mode='always', there might be a .ready file for
it, and we don't want to rename it to .partial in that case.

The old segment is needed until we're fully committed to the new timeline,
i.e. until we've written the end-of-recovery WAL record and updated the
min recovery point and timeline in the control file. So move the renaming
later in the startup sequence, after all that's been done.
2015-05-22 11:04:33 +03:00
..
brin Fix more typos in comments. 2015-05-20 19:45:43 +03:00
common Support "expanded" objects, particularly arrays, for better performance. 2015-05-14 12:08:49 -04:00
gin Collection of typo fixes. 2015-05-20 16:56:22 +03:00
gist Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
hash Remove unnecessary variables in _hash_splitbucket(). 2015-04-03 16:49:44 -04:00
heap Fix more typos in comments. 2015-05-20 19:45:43 +03:00
index
nbtree Collection of typo fixes. 2015-05-20 16:56:22 +03:00
rmgrdesc Collection of typo fixes. 2015-05-20 16:56:22 +03:00
spgist Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
tablesample TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00
transam At promotion, don't leave behind a partial segment on the old timeline. 2015-05-22 11:04:33 +03:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00