postgresql/src/include/access
Heikki Linnakangas 9a20a9b21b Improve scalability of WAL insertions.
This patch replaces WALInsertLock with a number of WAL insertion slots,
allowing multiple backends to insert WAL records to the WAL buffers
concurrently. This is particularly useful for parallel loading large amounts
of data on a system with many CPUs.

This has one user-visible change: switching to a new WAL segment with
pg_switch_xlog() now fills the remaining unused portion of the segment with
zeros. This potentially adds some overhead, but it has been a very common
practice by DBA's to clear the "tail" of the segment with an external
pg_clearxlogtail utility anyway, to make the WAL files compress better.
With this patch, it's no longer necessary to do that.

This patch adds a new GUC, xloginsert_slots, to tune the number of WAL
insertion slots. Performance testing suggests that the default, 8, works
pretty well for all kinds of worklods, but I left the GUC in place to allow
others with different hardware to test that easily. We might want to remove
that before release.

Reviewed by Andres Freund.
2013-07-08 11:23:56 +03:00
..
attnum.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
clog.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
genam.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
gin.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
gin_private.h Inline ginCompareItemPointers function for speed. 2013-06-29 12:55:34 +03:00
gist.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
gist_private.h Support unlogged GiST index. 2013-02-11 23:07:09 +02:00
gistscan.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
hash.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
heapam.h Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
heapam_xlog.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
hio.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
htup.h Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
htup_details.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
itup.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
multixact.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
nbtree.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
printtup.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
reloptions.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
relscan.h Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
rewriteheap.h Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
rmgr.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rmgrlist.h Split out list of XLog resource managers 2013-02-06 08:47:28 -03:00
sdir.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
skey.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
slru.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
spgist.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
spgist_private.h Avoid deadlocks during insertion into SP-GiST indexes. 2013-06-14 14:26:43 -04:00
subtrans.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
sysattr.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
timeline.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
transam.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tupconvert.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tupdesc.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tupmacs.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tuptoaster.h Get rid of pg_class.reltoastidxid. 2013-07-04 03:24:09 +09:00
twophase.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
twophase_rmgr.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
valid.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
visibilitymap.h Allow I/O reliability checks using 16-bit checksums 2013-03-22 13:54:07 +00:00
xact.h Fix SQL function execution to be safe with long-lived FmgrInfos. 2013-03-03 17:39:58 -05:00
xlog.h Improve scalability of WAL insertions. 2013-07-08 11:23:56 +03:00
xlog_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
xlog_internal.h Add new GUC, max_worker_processes, limiting number of bgworkers. 2013-07-04 11:24:24 -04:00
xlogdefs.h Improve scalability of WAL insertions. 2013-07-08 11:23:56 +03:00
xlogreader.h Use the right timeline when beginning to stream from master. 2013-01-18 11:46:49 +02:00
xlogutils.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00