postgresql/src
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
..
backend Avoid palloc in critical section in GiST WAL-logging. 2014-04-03 15:43:50 +03:00
bin psql: display "Replica Identity" only for FULL and NOTHING 2014-03-29 19:00:11 -04:00
common Un-break peer authentication. 2014-03-28 10:30:37 -04:00
include Avoid palloc in critical section in GiST WAL-logging. 2014-04-03 15:43:50 +03:00
interfaces libpq: pass a memory allocation failure error up to PQconndefaults() 2014-03-20 11:48:31 -04:00
makefiles Flush a stray definition of $(DLLTOOL). 2014-02-11 12:59:48 -05:00
pl Fix refcounting bug in PLy_modify_tuple(). 2014-03-26 16:41:32 -04:00
port Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
template Revert to using --enable-auto-import in Cygwin builds. 2014-02-16 15:14:04 -05:00
test psql: display "Replica Identity" only for FULL and NOTHING 2014-03-29 19:00:11 -04:00
timezone Update time zone data files to tzdata release 2014a. 2014-03-15 13:36:07 -04:00
tools Allow logical decoding via the walsender interface. 2014-03-10 13:50:28 -04:00
tutorial Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Introduce logical decoding. 2014-03-03 16:32:18 -05:00
Makefile.shlib Tweak position of $(DLL_DEFFILE) in shared-library link commands. 2014-02-12 11:22:23 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00