postgresql/src/include/replication
Alvaro Herrera cdb14154bb Set ReorderBufferTXN->final_lsn more eagerly
... specifically, set it incrementally as each individual change is
spilled down to disk.  This way, it is set correctly when the
transaction disappears without trace, ie. without leaving an XACT_ABORT
wal record.  (This happens when the server crashes midway through a
transaction.)

Failing to have final_lsn prevents ReorderBufferRestoreCleanup() from
working, since it needs the final_lsn in order to know the endpoint of
its iteration through spilled files.

Commit df9f682c7b already tried to fix the problem, but it didn't set
the final_lsn in all cases.  Revert that, since it's no longer needed.

Author: Vignesh C
Reviewed-by: Amit Kapila, Dilip Kumar
Discussion: https://postgr.es/m/CALDaNm2CLk+K9JDwjYST0sPbGg5AQdvhUt0jbKyX_HdAE0jk3A@mail.gmail.com
2020-01-17 18:00:39 -03:00
..
basebackup.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
decode.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
logical.h Preserve required !catalog tuples while computing initial decoding snapshot. 2017-04-27 13:13:36 -07:00
logicalfuncs.h Generic Messages for Logical Decoding 2016-04-06 10:05:41 +01:00
message.h pgindent run for 9.6 2016-06-09 18:02:36 -04:00
origin.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
output_plugin.h Formatting and docs corrections for logical decoding output plugins. 2017-02-15 18:15:47 -05:00
reorderbuffer.h Set ReorderBufferTXN->final_lsn more eagerly 2020-01-17 18:00:39 -03:00
slot.h Mark ReplicationSlotCtl as PGDLLIMPORT. 2019-06-13 10:53:17 -04:00
snapbuild.h Fix race condition leading to hanging logical slot creation. 2017-05-13 14:21:00 -07:00
syncrep.h Clean up parsing of synchronous_standby_names GUC variable. 2016-04-27 17:55:25 -04:00
walreceiver.h Add conninfo to pg_stat_wal_receiver 2016-06-29 16:57:17 -04:00
walsender.h Prevent possibility of panics during shutdown checkpoint. 2017-06-05 19:18:16 -07:00
walsender_private.h Prevent possibility of panics during shutdown checkpoint. 2017-06-05 19:18:16 -07:00