postgresql/src/include/access
Heikki Linnakangas 04e298b826 Avoid palloc in critical section in GiST WAL-logging.
Memory allocation can fail if you run out of memory, and inside a critical
section that will lead to a PANIC. Use conservatively-sized arrays in stack
instead.

There was previously no explicit limit on the number of pages a GiST split
can produce, it was only limited by the number of LWLocks that can be held
simultaneously (100 at the moment). This patch adds an explicit limit of 75
pages. That should be plenty, a typical split shouldn't produce more than
2-3 page halves.

The bug has been there forever, but only backpatch down to 9.1. The code
was changed significantly in 9.1, and it doesn't seem worth the risk or
trouble to adapt this for 9.0 and 8.4.
2014-04-03 15:43:50 +03:00
..
attnum.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
clog.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
genam.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
gin.h Rename GinLogicValue to GinTernaryValue. 2014-03-31 10:26:38 +03:00
gin_private.h Rewrite the way GIN posting lists are packed on a page, to reduce WAL volume. 2014-03-31 15:23:50 +03:00
gist.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
gist_private.h Avoid palloc in critical section in GiST WAL-logging. 2014-04-03 15:43:50 +03:00
gistscan.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
hash.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
heapam.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
heapam_xlog.h Move SizeOfHeapNewCid next to xl_heap_new_cid struct. 2014-04-01 16:23:16 +03:00
hio.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
htup.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
htup_details.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
itup.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
multixact.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
nbtree.h Make the handling of interrupted B-tree page splits more robust. 2014-03-18 20:50:44 +02:00
printtup.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
reloptions.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
relscan.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rewriteheap.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
rmgr.h Remove rm_safe_restartpoint machinery. 2014-03-18 22:10:35 +02:00
rmgrlist.h Remove rm_safe_restartpoint machinery. 2014-03-18 22:10:35 +02:00
sdir.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
skey.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
slru.h Relax the requirement that all lwlocks be stored in a single array. 2014-01-27 11:07:44 -05:00
spgist.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
spgist_private.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
subtrans.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
sysattr.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
timeline.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
transam.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
tupconvert.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
tupdesc.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
tupmacs.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
tuptoaster.h Introduce logical decoding. 2014-03-03 16:32:18 -05:00
twophase.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
twophase_rmgr.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
valid.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
visibilitymap.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
xact.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
xlog.h Replace the XLogInsert slots with regular LWLocks. 2014-03-21 15:10:48 +01:00
xlog_fn.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
xlog_internal.h Remove rm_safe_restartpoint machinery. 2014-03-18 22:10:35 +02:00
xlogdefs.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
xlogreader.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
xlogutils.h Update copyright for 2014 2014-01-07 16:05:30 -05:00