- Oct 02, 2012
-
-
Tom Lane authored
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.
-
Tom Lane authored
We had a number of variants on the theme of "malloc or die", with the majority named like "pg_malloc", but by no means all. Standardize on the names pg_malloc, pg_malloc0, pg_realloc, pg_strdup. Get rid of pg_calloc entirely in favor of using pg_malloc0. This is an essentially cosmetic change, so no back-patch. (I did find a couple of places where psql and pg_dump were using plain malloc or strdup instead of the pg_ versions, but they don't look significant enough to bother back-patching.)
-
Bruce Momjian authored
objects does not match between the old and new clusters. Backpatch to 9.2.
-
Bruce Momjian authored
entries are not dumped. This fixes an error caused by droping/recreating the information_schema, but other failures were also possible. Backpatch to 9.2.
-
Bruce Momjian authored
comparison; also report the old/new values if they don't match. Backpatch to 9.2.
-
- Oct 01, 2012
-
-
Tom Lane authored
On reflection (especially after noticing how many buildfarm critters have __builtin_types_compatible_p but not _Static_assert), it seems like we ought to try a bit harder to make these macros do something everywhere. The initial cut at it would have been no help to code that is compiled only on platforms without _Static_assert, for instance; and in any case not all our contributors do their initial coding on the latest gcc version. Some googling about static assertions turns up quite a bit of prior art for making it work in compilers that lack _Static_assert. The method that seems closest to our needs involves defining a struct with a bit-field that has negative width if the assertion condition fails. There seems no reliable way to get the error message string to be output, but throwing a compile error with a confusing message is better than missing the problem altogether. In the same spirit, if we don't have __builtin_types_compatible_p we can at least insist that the variable have the same width as the type. This won't catch errors such as "wrong pointer type", but it's far better than nothing. In addition to changing the macro definitions, adjust a compile-time-constant Assert in contrib/hstore to use StaticAssertStmt, so we can get some buildfarm coverage on whether that macro behaves sanely or not. There's surely more places that could be converted, but this is the first one I came across.
-
- Sep 27, 2012
-
-
Peter Eisentraut authored
This mirrors the behavior of pg_regress and makes the test run much faster.
-
- Sep 19, 2012
-
-
Peter Eisentraut authored
It is no longer used, but was still being checked for. bug #7548 from Reinhard Max
-
- Sep 06, 2012
-
-
Andrew Dunstan authored
If we call pg_ctl stop, the server might continue and thus hold a log file for a short time after it has deleted its pid file, (which is when pg_ctl will exit), and so a subsequent attempt to open the log file might fail. We therefore try to open it a few times, sleeping one second between tries, to give the server time to exit. This corrects an error that was observed on the buildfarm. Backpatched to 9.2,
-
Peter Eisentraut authored
Show target number of tuples and percentage in addition to current number.
-
Andrew Dunstan authored
Call pg_dumpall using -f switch instead of redirection, to avoid writing the output in text mode and generating spurious carriage returns. Remove to carriage return ignoring hack introduced by commit e442b0f0. Backpatch to 9.2.
-
- Sep 05, 2012
-
-
Andrew Dunstan authored
pg_upgrade opened the output from pg_dumpall in text mode and wrote the split files in text mode. This caused unwanted eating of intended carriage returns on input and production of spurious carriage returns on output. To avoid this, open all these files in binary mode. On non-Windows platforms, this change has no effect. Backpatch to 9.0. On 9.0 and 9.1, we also switch from redirecting pg_dumpall's output to using pg_dumpall's -f switch, for the same reason.
-
Tom Lane authored
This is just neatnik-ism, but since we do it for comparable code in elog.c, we may as well do it here.
-
Robert Haas authored
This is needed to match recent changes elsewhere. Along the way, some renaming for clarity. KaiGai Kohei
-
Bruce Momjian authored
on Windows. Slightly cleanup log output on Windows given this restriction. Backpatch to 9.2.
-
- Sep 04, 2012
-
-
Andrew Dunstan authored
-
Andrew Dunstan authored
-
Andrew Dunstan authored
-
Andrew Dunstan authored
Backpatch to 9.2.
-
Bruce Momjian authored
socket location. Also, prevent putting the socket in the current directory for pre-9.1 servers in live check and non-live check mode, because pre-9.1 pg_ctl -w can't handle it. Backpatch to 9.2.
-
Andrew Dunstan authored
pg_upgrade produces a platform-specific script to remove the old directory, but on Windows it has not been making sure that the paths it writes as arguments for rmdir and del use the backslash path separator, which will cause these scripts to fail. The fix is backpatched to Release 9.0.
-
- Sep 03, 2012
-
-
Andrew Dunstan authored
Backpatch to 9.2 - code before that is quite different and should not have these defects.
-
Tom Lane authored
When starting either an old or new postmaster, force it to place its Unix socket in the current directory. This makes it even harder for accidental connections to occur during pg_upgrade, and also works around some scenarios where the default socket location isn't usable. (For example, if the default location is something other than "/tmp", it might not exist during "make check".) When checking an already-running old postmaster, find out its actual socket directory location from postmaster.pid, if possible. This dodges problems with an old postmaster having a configured location different from the default built into pg_upgrade's libpq. We can't find that out if the old postmaster is pre-9.1, so also document how to cope with such scenarios manually. In support of this, centralize handling of the connection-related command line options passed to pg_upgrade's subsidiary programs, such as pg_dump. This should make future changes easier. Bruce Momjian and Tom Lane
-
- Aug 30, 2012
-
-
Alvaro Herrera authored
This reduces unnecessary exposure of other headers through htup.h, which is very widely included by many files. I have chosen to move the function prototypes to the new file as well, because that means htup.h no longer needs to include tupdesc.h. In itself this doesn't have much effect in indirect inclusion of tupdesc.h throughout the tree, because it's also required by execnodes.h; but it's something to explore in the future, and it seemed best to do the htup.h change now while I'm busy with it.
-
- Aug 29, 2012
-
-
Alvaro Herrera authored
Evidently I failed to test a compile after my earlier header shuffling.
-
- Aug 28, 2012
-
-
Tom Lane authored
Per Peter Geoghegan.
-
Tom Lane authored
Since we're not installing this file anymore, it has no reason to exist, other than as historical reference; but we have an SCM for that.
-
Bruce Momjian authored
percentage column before count column. Docs updated.
-
- Aug 27, 2012
-
-
Alvaro Herrera authored
The previous signature made it very easy to pass something other than the printf-format specifier in the corresponding position, without any warning from the compiler. While at it, move some of the escaping, redirecting and quoting responsibilities from the callers into exec_prog() itself. This makes the callsites cleaner.
-
Alvaro Herrera authored
It was confusing symlinks with hard links.
-
Alvaro Herrera authored
-
- Aug 23, 2012
-
-
Peter Eisentraut authored
Just to check that they actually work.
-
- Aug 20, 2012
-
-
Tom Lane authored
Extraction of trigrams did not process LIKE escape sequences properly, leading to possible misidentification of trigrams near escapes, resulting in incorrect index search results. Fujii Masao
-
- Aug 15, 2012
-
-
Tom Lane authored
libxslt offers the ability to read and write both files and URLs through stylesheet commands, thus allowing unprivileged database users to both read and write data with the privileges of the database server. Disable that through proper use of libxslt's security options. Also, remove xslt_process()'s ability to fetch documents and stylesheets from external files/URLs. While this was a documented "feature", it was long regarded as a terrible idea. The fix for CVE-2012-3489 broke that capability, and rather than expend effort on trying to fix it, we're just going to summarily remove it. While the ability to write as well as read makes this security hole considerably worse than CVE-2012-3489, the problem is mitigated by the fact that xslt_process() is not available unless contrib/xml2 is installed, and the longstanding warnings about security risks from that should have discouraged prudent DBAs from installing it in security-exposed databases. Reported and fixed by Peter Eisentraut. Security: CVE-2012-3488
-
- Aug 10, 2012
-
-
Bruce Momjian authored
directory. Backpatch to 9.2.
-
- Aug 07, 2012
-
-
Bruce Momjian authored
4741e9af. This was done by adding an optional second log file parameter to exec_prog(), and closing and reopening the log file between system() calls. Backpatch to 9.2.
-
- Aug 03, 2012
-
-
Bruce Momjian authored
newline-terminated messages, per suggestion from Tom. Backpatch to 9.2.
-
- Aug 02, 2012
-
-
Tom Lane authored
After taking awhile to digest the row-processor feature that was added to libpq in commit 92785dac, we've concluded it is over-complicated and too hard to use. Leave the core infrastructure changes in place (that is, there's still a row processor function inside libpq), but remove the exposed API pieces, and instead provide a "single row" mode switch that causes PQgetResult to return one row at a time in separate PGresult objects. This approach incurs more overhead than proper use of a row processor callback would, since construction of a PGresult per row adds extra cycles. However, it is far easier to use and harder to break. The single-row mode still affords applications the primary benefit that the row processor API was meant to provide, namely not having to accumulate large result sets in memory before processing them. Preliminary testing suggests that we can probably buy back most of the extra cycles by micro-optimizing construction of the extra results, but that task will be left for another day. Marko Kreen
-
- Jul 26, 2012
-
-
Bruce Momjian authored
Backpatch to 9.2.
-
- Jul 23, 2012
-
-
Robert Haas authored
This is apparently faster than doing things the other way around when the scale factor is large. Along the way, adjust -n to suppress vacuuming during initialization as well as during test runs. Jeff Janes, with some small changes by me.
-