postgresql/src/backend
Robert Haas 2720e96a9b Fix handling of sortKeys field in Tuplesortstate.
Commit 5cefbf5a6c introduced an
assumption that this field would always be non-NULL when doing a merge
pass, but that's not true.  Without this fix, you can crash the server
by building a hash index that is sufficiently large relative to
maintenance_work_mem, or by triggering a large datum sort.

Commit 5ea86e6e65 changed the comments
for that field to say that it would be set in all cases except for the
hash index case, but that wasn't (and still isn't) true.

The datum-sort failure was spotted by Tomas Vondra; initial analysis
of that failure was by Peter Geoghegan.  The remaining issues were
spotted by me during review of the surrounding code, and the patch is
all my fault.
2015-03-09 10:35:41 -04:00
..
access Move WAL-related definitions from dbcommands.h to separate header file. 2015-03-09 15:50:49 +02:00
bootstrap Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
catalog Remove rolcatupdate 2015-03-06 23:42:38 -05:00
commands Move WAL-related definitions from dbcommands.h to separate header file. 2015-03-09 15:50:49 +02:00
executor Use the typcache to cache constraints for domain types. 2015-03-01 14:06:55 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix a bug in pairing heap removal code. 2015-02-17 22:55:53 +02:00
libpq Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
main Don't require users of src/port/gettimeofday.c to initialize it. 2015-02-21 12:17:04 -05:00
nodes Add hasRowSecurity to copyfuncs/outfuncs 2015-02-25 23:35:04 -05:00
optimizer Fix long-obsolete code for separating filter conditions in cost_index(). 2015-03-03 21:19:42 -05:00
parser Remove residual NULL-pstate handling in addRangeTableEntry. 2015-03-03 16:31:26 -05:00
po Translation updates 2015-02-01 23:23:40 -05:00
port Remove the option to service interrupts during PGSemaphoreLock(). 2015-02-03 23:25:00 +01:00
postmaster Replace checkpoint_segments with min_wal_size and max_wal_size. 2015-02-23 18:53:02 +02:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Fix an obsolete reference to SnapshotNow in comment. 2015-03-04 12:25:48 +09:00
rewrite Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Guard against spurious signals in LockBufferForCleanup. 2015-02-23 16:14:14 +01:00
tcop Code cleanup for REINDEX DATABASE/SCHEMA/SYSTEM. 2015-03-08 12:18:43 -04:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Fix handling of sortKeys field in Tuplesortstate. 2015-03-09 10:35:41 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00