postgresql/contrib/pg_upgrade
Tom Lane 09ac603c36 Work around unportable behavior of malloc(0) and realloc(NULL, 0).
On some platforms these functions return NULL, rather than the more common
practice of returning a pointer to a zero-sized block of memory.  Hack our
various wrapper functions to hide the difference by substituting a size
request of 1.  This is probably not so important for the callers, who
should never touch the block anyway if they asked for size 0 --- but it's
important for the wrapper functions themselves, which mistakenly treated
the NULL result as an out-of-memory failure.  This broke at least pg_dump
for the case of no user-defined aggregates, as per report from
Matthew Carrington.

Back-patch to 9.2 to fix the pg_dump issue.  Given the lack of previous
complaints, it seems likely that there is no live bug in previous releases,
even though some of these functions were in place before that.
2012-10-02 17:32:42 -04:00
..
.gitignore pg_upgrade: Add new generated file to .gitignore 2012-03-20 20:40:31 +02:00
check.c In pg_upgrade, try to convert the locale names to canonical form before 2012-10-02 11:42:34 -04:00
controldata.c pg_upgrade: fix off-by-one mistake in snprintf 2012-06-28 23:37:27 -04:00
dump.c Fix line end mishandling in pg_upgrade on Windows. 2012-09-05 17:41:43 -04:00
exec.c pg_upgrade: Remove check for pg_config 2012-09-18 22:04:28 -04:00
file.c Fix thinko in comment 2012-08-27 14:29:14 -04:00
function.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
IMPLEMENTATION Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
info.c In pg_upgrade, improve error reporting when the number of relation 2012-10-02 11:53:45 -04:00
Makefile Remove analyze_new_cluster.sh on make clean, too 2012-08-27 14:29:14 -04:00
option.c In pg_upgrade, pull the port number from postmaster.pid, like we do for 2012-09-03 22:15:09 -04:00
page.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_upgrade.c In pg_upgrade, pull the port number from postmaster.pid, like we do for 2012-09-03 22:15:09 -04:00
pg_upgrade.h In pg_upgrade, document why we can't issue \n\n in the command logfile 2012-09-05 00:01:13 -04:00
relfilenode.c In pg_upgrade, use pg_log() instead of prep_status() for 2012-08-03 12:43:37 -04:00
server.c Fix pg_upgrade to cope with non-default unix_socket_directory scenarios. 2012-09-03 13:52:40 -04:00
tablespace.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
test.sh pg_upgrade test: Disable fsync in initdb and postgres calls 2012-09-26 22:41:57 -04:00
TESTING Remove whitespace from end of lines 2012-05-15 22:19:41 +03:00
util.c Work around unportable behavior of malloc(0) and realloc(NULL, 0). 2012-10-02 17:32:42 -04:00
version_old_8_3.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
version.c In pg_upgrade, add various logging improvements: 2012-03-12 19:48:03 -04:00