postgresql/src/include
Alvaro Herrera a19c262f3a 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 Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catalog Always require SELECT permission for ON CONFLICT DO UPDATE. 2017-11-06 09:17:44 +00:00
commands Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
common Increase SCRAM salt length 2017-08-24 14:08:23 -04:00
datatype Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
executor Fix crash when logical decoding is invoked from a PL function. 2017-10-06 19:18:58 -04:00
fe_utils Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
foreign Separate reinitialization of shared parallel-scan state from ExecReScan. 2017-08-30 13:18:16 -04:00
lib Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
libpq Always use 2048 bit DH parameters for OpenSSL ephemeral DH ciphers. 2017-07-31 22:36:09 +03:00
mb Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
nodes Move new structure member to the end. 2017-10-27 17:29:52 +02:00
optimizer Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE. 2017-11-27 17:54:09 -05:00
parser Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
port Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
portability Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postmaster Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
regex Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04: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:09 -05:00
snowball Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
statistics Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
storage Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
tcop Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
tsearch Fix serious performance problems in json(b) to_tsvector(). 2017-07-18 12:45:51 -04:00
utils Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -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 Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
funcapi.h Add a utility function to extract variadic function arguments 2017-10-25 07:14:21 -04:00
getaddrinfo.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
getopt_long.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
Makefile Add statistics subdirectory to Makefile. 2017-06-08 11:29:50 -04:00
miscadmin.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -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 Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_getopt.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pg_trace.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pgstat.h Fix replication origin-related race conditions 2017-08-08 16:07:46 -04:00
pgtar.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
pgtime.h Mark assorted variables PGDLLIMPORT. 2017-12-05 09:24:05 -05:00
port.h Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postgres.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rusagestub.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
windowapi.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00