postgresql/src/include
Alvaro Herrera 9a5e4a6e08 Fix failure to delete spill files of aborted transactions
Logical decoding's reorderbuffer.c may spill transaction files to disk
when transactions are large.  These are supposed to be removed when they
become "too old" by xid; but file removal requires the boundary LSNs of
the transaction to be known.  The final_lsn is only set when we see the
commit or abort record for the transaction, but nothing sets the value
for transactions that crash, so the removal code misbehaves -- in
assertion-enabled builds, it crashes by a failed assertion.

To fix, modify the final_lsn of transactions that don't have a value
set, to the LSN of the very latest change in the transaction.  This
causes the spilled files to be removed appropriately.

Author: Atsushi Torikoshi
Reviewed-by: Kyotaro HORIGUCHI, Craig Ringer, Masahiko Sawada
Discussion: https://postgr.es/m/54e4e488-186b-a056-6628-50628e4e4ebc@lab.ntt.co.jp
2018-01-05 12:17:10 -03:00
..
access Perform a lot more sanity checks when freezing tuples. 2017-12-14 18:20:48 -08:00
bootstrap Update copyright for 2016 2016-01-02 13:33:40 -05:00
catalog Always require SELECT permission for ON CONFLICT DO UPDATE. 2017-11-06 09:16:24 +00:00
commands Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
common Fix integer-overflow problems in interval comparison. 2017-04-05 23:51:28 -04:00
datatype Be more careful about out-of-range dates and timestamps. 2016-03-16 19:09:28 -04:00
executor Fix crash when logical decoding is invoked from a PL function. 2017-10-06 19:18:58 -04:00
fe_utils Fix assorted places in psql to print version numbers >= 10 in new style. 2016-08-16 15:58:46 -04:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Revert "Permit dump/reload of not-too-large >1GB tuples" 2016-12-06 12:46:03 -03:00
libpq Give nicer error message when connecting to a v10 server requiring SCRAM. 2017-05-05 11:24:02 +03:00
mb Update copyright for 2016 2016-01-02 13:33:40 -05:00
nodes Fix mistaken failure to allow parallelism in corner case. 2017-10-27 16:12:16 +02:00
optimizer Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE. 2017-11-27 17:54:10 -05:00
parser Fix type-safety problem with parallel aggregate serial/deserialization. 2016-06-22 16:52:41 -04:00
port Fix unportable definition of BSWAP64() macro. 2017-02-24 15:21:39 -05:00
portability Update copyright for 2016 2016-01-02 13:33:40 -05:00
postmaster Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:12:16 -05:00
replication Fix failure to delete spill files of aborted transactions 2018-01-05 12:17:10 -03:00
rewrite Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE. 2017-11-27 17:54:10 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
tcop Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
tsearch Fix typos in comments. 2017-02-06 11:34:15 +02:00
utils Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Prevent int128 from requiring more than MAXALIGN alignment. 2017-11-14 17:49:49 -05:00
fmgr.h Revert addition of PGDLLEXPORT in PG_FUNCTION_INFO_V1 macro. 2016-10-12 18:01:52 -04:00
funcapi.h Add a utility function to extract variadic function arguments 2017-10-25 07:19:59 -04:00
getaddrinfo.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
getopt_long.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
miscadmin.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
pg_config.h.in Prevent int128 from requiring more than MAXALIGN alignment. 2017-11-14 17:49:49 -05:00
pg_config.h.win32 Prevent int128 from requiring more than MAXALIGN alignment. 2017-11-14 17:49:49 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Bring some clarity to the defaults for the xxx_flush_after parameters. 2016-11-25 18:36:10 -05:00
pg_getopt.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_trace.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgstat.h Fix typos in comments. 2016-10-26 11:13:17 +03:00
pgtar.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgtime.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:27:20 -05:00
port.h Run the postmaster's signal handlers without SA_RESTART. 2017-04-24 13:00:23 -04:00
postgres.h Adjust DatumGetBool macro, this time for sure. 2016-04-28 11:50:58 -04:00
postgres_ext.h Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:24 -04:00
postgres_fe.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
rusagestub.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
windowapi.h Update copyright for 2016 2016-01-02 13:33:40 -05:00