postgresql/src/include
Alvaro Herrera f741300c90 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:53 -04:00
..
access Have multixact be truncated by checkpoint, not vacuum 2014-06-27 14:43:53 -04:00
bootstrap Update copyright for 2014 2014-01-07 16:05:30 -05:00
catalog Get rid of bogus separate pg_proc entries for json_extract_path operators. 2014-06-26 16:22:15 -07:00
commands Change the signature of rm_desc so that it's passed a XLogRecord. 2014-06-14 10:46:48 +03:00
common pgindent run for 9.4 2014-05-06 12:12:18 -04:00
datatype pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:14:26 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Rename lo_create(oid, bytea) to lo_from_bytea(). 2014-06-12 15:39:09 -04:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:14:26 -04:00
optimizer Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ... 2014-06-18 13:22:34 -04:00
parser Implement UPDATE tab SET (col1,col2,...) = (SELECT ...), ... 2014-06-18 13:22:34 -04:00
port pgindent run for 9.4 2014-05-06 12:12:18 -04:00
portability pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster When a background worker exists with code 0, unregister it. 2014-05-07 17:44:42 -04:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Consistency improvements for slot and decoding code. 2014-06-12 13:33:27 +02:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball pgindent run for 9.4 2014-05-06 12:12:18 -04:00
storage Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET. 2014-06-19 08:40:37 -05:00
tcop pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tsearch Allow opclasses to provide tri-valued GIN consistent functions. 2014-03-12 17:51:30 +02:00
utils Don't allow data_directory to be set in postgresql.auto.conf by ALTER SYSTEM. 2014-06-19 20:31:20 +09: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 Don't allow to disable backend assertions via the debug_assertions GUC. 2014-06-20 11:09:17 +02:00
fmgr.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
funcapi.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
getopt_long.h Centralize getopt-related declarations in a new header file pg_getopt.h. 2014-02-15 14:31:30 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h pgindent run for 9.4 2014-05-06 12:12:18 -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 Revert accidental change of WAL_DEBUG default. 2014-06-17 08:52:41 +03:00
pg_config.h.in Add mkdtemp() to libpgport. 2014-06-14 09:41:13 -04:00
pg_config.h.win32 Add mkdtemp() to libpgport. 2014-06-14 09:41:13 -04:00
pg_getopt.h Fix comment. 2014-05-08 12:42:56 -04:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown. 2014-06-04 12:09:45 +09:00
pgtar.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgtime.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
port.h Add mkdtemp() to libpgport. 2014-06-14 09:41:13 -04:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
postgres.h Don't allow to disable backend assertions via the debug_assertions GUC. 2014-06-20 11:09:17 +02:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00