postgresql/src/include
Alvaro Herrera 9a28c3752c Have multixact be truncated by checkpoint, not vacuum
Instead of truncating pg_multixact at vacuum time, do it only at
checkpoint time.  The reason for doing it this way is twofold: first, we
want it to delete only segments that we're certain will not be required
if there's a crash immediately after the removal; and second, we want to
do it relatively often so that older files are not left behind if
there's an untimely crash.

Per my proposal in
http://www.postgresql.org/message-id/20140626044519.GJ7340@eldon.alvh.no-ip.org
we now execute the truncation in the checkpointer process rather than as
part of vacuum.  Vacuum is in only charge of maintaining in shared
memory the value to which it's possible to truncate the files; that
value is stored as part of checkpoints also, and so upon recovery we can
reuse the same value to re-execute truncate and reset the
oldest-value-still-safe-to-use to one known to remain after truncation.

Per bug reported by Jeff Janes in the course of his tests involving
bug #8673.

While at it, update some comments that hadn't been updated since
multixacts were changed.

Backpatch to 9.3, where persistency of pg_multixact files was
introduced by commit 0ac5ad5134.
2014-06-27 14:43:52 -04:00
..
access Have multixact be truncated by checkpoint, not vacuum 2014-06-27 14:43:52 -04:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
commands Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
common Don't #include utils/palloc.h in common/fe_memutils.h. 2014-04-26 14:14:30 -04:00
datatype Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
executor Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:13:47 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
libpq Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
mb Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
nodes Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:13:47 -04:00
optimizer Compute correct em_nullable_relids in get_eclass_for_sort_expr(). 2013-11-15 16:46:21 -05:00
parser Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
port Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
portability Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postmaster Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
regex Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
replication Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
rewrite Avoid getting more than AccessShareLock when deparsing a query. 2014-03-06 19:31:09 -05:00
snowball Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
storage Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
tcop Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
tsearch Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:32 -05:00
utils Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04: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 Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
fmgr.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
funcapi.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:27 -04:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Install headers from the new src/include/common subdirectory. 2013-02-26 15:27:30 -05:00
miscadmin.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_config.h.in Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04:00
pg_config.h.win32 Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04: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 Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Fix some odd behaviors when using a SQL-style simple GMT offset timezone. 2013-11-01 12:13:23 -04:00
port.h Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04:00
postgres.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postgres_ext.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00