aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Fix regression tests to match error message changeAndrew Dunstan2010-05-18
|
* Follow up a visit from the style police.Andrew Dunstan2010-05-17
|
* Ensure that pg_restore -l will output DATABASE entries whether or not -CTom Lane2010-05-15
| | | | | | | | | is specified. Per bug report from Russell Smith and ensuing discussion. Since this is a corner case behavioral change, I'm going to be conservative and not back-patch it. In passing, also rename the RestoreOptions field for the -C switch to something less generic than "create".
* Rename PM_RECOVERY_CONSISTENT and PMSIGNAL_RECOVERY_CONSISTENT.Robert Haas2010-05-15
| | | | | The new names PM_HOT_STANDBY and PMSIGNAL_BEGIN_HOT_STANDBY more accurately reflect their actual function.
* Spell __NetBSD__ the same way everywhere. Per Giles Lean.Tom Lane2010-05-15
|
* Use __bsdi__ consistently.Bruce Momjian2010-05-15
|
* Fix bug in processing of checkpoint time for max_standby_delay. LatestSimon Riggs2010-05-15
| | | | | log time was incorrectly set, typically leading to dates in the past, which would cause more cancellations in Hot Standby on a quiet server.
* We now accept read-only connections in state PM_RECOVERY_CONSISTENT.Robert Haas2010-05-14
|
* Remove CRs.Itagaki Takahiro2010-05-14
|
* Add many new Asserts in code and fix simple bug that slipped throughSimon Riggs2010-05-14
| | | | without them, related to previous commit. Report by Bruce Momjian.
* Fix up lame idea of not using autoconf to determine if platform has scandir().Tom Lane2010-05-13
| | | | Should fix buildfarm failures.
* Fix MSVC builds for recent plperl changes. Go back to version 8.2, which isAndrew Dunstan2010-05-13
| | | | | | where we started supporting MSVC builds. Security: CVE-2010-1169
* Prevent PL/Tcl from loading the "unknown" module from pltcl_modules unlessTom Lane2010-05-13
| | | | | | | | | | | | | | | | | | | that is a regular table or view owned by a superuser. This prevents a trojan horse attack whereby any unprivileged SQL user could create such a table and insert code into it that would then get executed in other users' sessions whenever they call pltcl functions. Worse yet, because the code was automatically loaded into both the "normal" and "safe" interpreters at first use, the attacker could execute unrestricted Tcl code in the "normal" interpreter without there being any pltclu functions anywhere, or indeed anyone else using pltcl at all: installing pltcl is sufficient to open the hole. Change the initialization logic so that the "unknown" code is only loaded into an interpreter when the interpreter is first really used. (That doesn't add any additional security in this particular context, but it seems a prudent change, and anyway the former behavior violated the principle of least astonishment.) Security: CVE-2010-1170
* Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it isAndrew Dunstan2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | fundamentally insecure. Instead apply an opmask to the whole interpreter that imposes restrictions on unsafe operations. These restrictions are much harder to subvert than is Safe.pm, since there is no container to be broken out of. Backported to release 7.4. In releases 7.4, 8.0 and 8.1 this also includes the necessary backporting of the two interpreters model for plperl and plperlu adopted in release 8.2. In versions 8.0 and up, the use of Perl's POSIX module to undo its locale mangling on Windows has become insecure with these changes, so it is replaced by our own routine, which is also faster. Nice side effects of the changes include that it is now possible to use perl's "strict" pragma in a natural way in plperl, and that perl's $a and $b variables now work as expected in sort routines, and that function compilation is significantly faster. Tim Bunce and Andrew Dunstan, with reviews from Alex Hunsaker and Alexey Klyukin. Security: CVE-2010-1169
* Translation updatePeter Eisentraut2010-05-13
|
* Properly support multi-line entires (such as OBJS=) when buildingMagnus Hagander2010-05-13
| | | | PROGRAM, not just MODULE, in contrib.
* Avoid error from mkdir if no languages are to be installedPeter Eisentraut2010-05-13
| | | | | | | mkinstalldirs used to handle no arguments, but mkdir doesn't. Also remove the .SILENT setting, that was previously removed from Makefile.global as well.
* Add missing library and include support for pg_upgrade to MSVC build system.Andrew Dunstan2010-05-13
|
* Fix vpath installation from distribution tarball (bug #5447)Peter Eisentraut2010-05-13
|
* Ensure that top level aborts call XLogSetAsyncCommit(). Not doingSimon Riggs2010-05-13
| | | | | | | | so simply leads to data waiting in wal_buffers which then causes later commits to potentially do emergency writes and for all forms of replication to be potentially delayed without need or benefit. Issue pointed out exactly by Fujii Masao, following bug report by Robert Haas on a separate though related topic.
* Cleanup initialization of Hot Standby. Clarify working with reanalysisSimon Riggs2010-05-13
| | | | | | | | | of requirements and documentation on LogStandbySnapshot(). Fixes two minor bugs reported by Tom Lane that would lead to an incorrect snapshot after transaction wraparound. Also fix two other problems discovered that would give incorrect snapshots in certain cases. ProcArrayApplyRecoveryInfo() substantially rewritten. Some minor refactoring of xact_redo_apply() and ExpireTreeKnownAssignedTransactionIds().
* Update comment about why postmaster doesn't get an icon.Bruce Momjian2010-05-12
|
* Remove Makefile PGFILEDESC tag that the postmaster is an executable.Bruce Momjian2010-05-12
|
* Give most recovery conflict errors a retryable error code. From recentSimon Riggs2010-05-12
| | | | requests and discussions with Yeb Havinga and Kevin Grittner.
* Add PGFILEDESC description to Makefiles for all /contrib executables.Bruce Momjian2010-05-12
| | | | Add PGAPPICON to all executable makefiles.
* Update time zone data files to tzdata release 2010j: DST law changes inTom Lane2010-05-11
| | | | | Argentina, Australian Antarctic, Bangladesh, Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia. Historical corrections for Taiwan.
* Add PKST to the default set of timezone abbreviations.Tom Lane2010-05-11
| | | | | Per discussion, if we have PKT in there then PKST should be too. Also, fix mistaken claim that these abbrevs are not known to zic.
* Change typedef for rb_appendator to avoid conflict with C++ reserved words.Robert Haas2010-05-11
| | | | | Fixes a complaint from src/tools/pginclude/cpluspluscheck reported by Peter Eisentraut.
* Cause the archiver process to adopt new postgresql.conf settings (particularlyTom Lane2010-05-11
| | | | | | | | | | archive_command) as soon as possible, namely just before issuing a new call of archive_command, even when there is a backlog of files to be archived. The original coding would only absorb new settings after clearing the backlog and returning to the outer loop. Per discussion. Back-patch to 8.3. The logic in prior versions is a bit different and it doesn't seem worth taking any risks of breaking it.
* Fix incorrect patch that removed permission checks on inheritance childTom Lane2010-05-11
| | | | | tables --- the parent table no longer got checked, either. Per bug #5458 from Takahiro Itagaki.
* Set per-function GUC settings during validating the function.Itagaki Takahiro2010-05-11
| | | | | | | Now validators work properly even when the settings contain parameters that affect behavior of the function, like search_path. Reported by Erwin Brandstetter.
* When adding a "target IS NOT NULL" indexqual to the plan for an index-optimizedTom Lane2010-05-10
| | | | | | | | | MIN or MAX, we must take care to insert the added qual in a legal place among the existing indexquals, if any. The btree index AM requires the quals to appear in index-column order. We didn't have to worry about this before because "target IS NOT NULL" was just treated as a plain scan filter condition; but as of 9.0 it can be an index qual and then it has to follow the rule. Per report from Ian Barwick.
* Suppress signed-vs-unsigned-char warning.Tom Lane2010-05-09
|
* Fix missing static declaration for XLogRead().Tom Lane2010-05-09
|
* Adjust comments about avoiding use of printf's %.*s.Tom Lane2010-05-09
| | | | | | | | | | | My initial impression that glibc was measuring the precision in characters (which is what the Linux man page says it does) was incorrect. It does take the precision to be in bytes, but it also tries to truncate the string at a character boundary. The bottom line remains the same: it will mess up if the string is not in the encoding it expects, so we need to avoid %.*s anytime there's a significant risk of that. Previous code changes are still good, but adjust the comments to reflect this knowledge. Per research by Hernan Gonzalez.
* Work around a subtle portability problem in use of printf %s format.Tom Lane2010-05-08
| | | | | | | | | | | | | Depending on which spec you read, field widths and precisions in %s may be counted either in bytes or characters. Our code was assuming bytes, which is wrong at least for glibc's implementation, and in any case libc might have a different idea of the prevailing encoding than we do. Hence, for portable results we must avoid using anything more complex than just "%s" unless the string to be printed is known to be all-ASCII. This patch fixes the cases I could find, including the psql formatting failure reported by Hernan Gonzalez. In HEAD only, I also added comments to some places where it appears safe to continue using "%.*s".
* ECPG connect routine only checked for NULL to find empty parameters, but ↵Michael Meskes2010-05-07
| | | | user and password can also be "".
* On Linux, use --enable-new-dtags when specifying -rpath to linker.Tom Lane2010-05-06
| | | | | This should allow LD_LIBRARY_PATH to work as desired. Per trouble report from Andy Colson.
* Code page for EUC-KR is surely 51949.Itagaki Takahiro2010-05-06
|
* Fix psql to not go into infinite recursion when expanding a variable thatTom Lane2010-05-05
| | | | | | | | | | refers to itself (directly or indirectly). Instead, print a message when recursion is detected, and don't expand the repeated reference. Per bug #5448 from Francis Markham. Back-patch to 8.0. Although the issue exists in 7.4 as well, it seems impractical to fix there because of the lack of any state stack that could be used to track active expansions.
* Need to hold ControlFileLock while updating control file. UpdateHeikki Linnakangas2010-05-03
| | | | | | minRecoveryPoint in control file when replaying a parameter change record, to ensure that we don't allow hot standby on WAL generated without wal_level='hot_standby' after a standby restart.
* Improve printing of XLOG_HEAP_NEWPAGE records to include the forknum.Tom Lane2010-05-02
|
* Fix replay of XLOG_HEAP_NEWPAGE WAL records to pay attention to the forknumTom Lane2010-05-02
| | | | | | | | | | | | | | | field of the WAL record. The previous coding always wrote to the main fork, resulting in data corruption if the page was meant to go into a non-default fork. At present, the only operation that can produce such WAL records is ALTER TABLE/INDEX SET TABLESPACE when executed with archive_mode = on. Data corruption would be observed on standby slaves, and could occur on the master as well if a database crash and recovery occurred after committing the ALTER and before the next checkpoint. Per report from Gordon Shannon. Back-patch to 8.4; the problem doesn't exist in earlier branches because we didn't have a concept of multiple relation forks then.
* Update standbycheck test output with new ERROR message changes. No changesSimon Riggs2010-05-02
| | | | to tests and no changes in accepted server behaviour.
* Clean up some awkward, inaccurate, and inefficient processing aroundTom Lane2010-05-02
| | | | | | | | | | | | MaxStandbyDelay. Use the GUC units mechanism for the value, and choose more appropriate timestamp functions for performing tests with it. Make the ps_activity manipulation in ResolveRecoveryConflictWithVirtualXIDs have behavior similar to ps_activity code elsewhere, notably not updating the display when update_process_title is off and not truncating the display contents at an arbitrarily-chosen length. Improve the docs to be explicit about what MaxStandbyDelay actually measures, viz the difference between primary and standby servers' clocks, and the possible hazards if their clocks aren't in sync.
* Add code to InternalIpcMemoryCreate() to handle the case where shmget()Tom Lane2010-05-01
| | | | | | | | | | | | | | | | returns EINVAL for an existing shared memory segment. Although it's not terribly sensible, that behavior does meet the POSIX spec because EINVAL is the appropriate error code when the existing segment is smaller than the requested size, and the spec explicitly disclaims any particular ordering of error checks. Moreover, it does in fact happen on OS X and probably other BSD-derived kernels. (We were able to talk NetBSD into changing their code, but purging that behavior from the wild completely seems unlikely to happen.) We need to distinguish collision with a pre-existing segment from invalid size request in order to behave sensibly, so it's worth some extra code here to get it right. Per report from Gavin Kistner and subsequent investigation. Back-patch to all supported versions, since any of them could get used with a kernel having the debatable behavior.
* Fix leakage of proc-related storage in plpython's inline handler.Tom Lane2010-05-01
| | | | Per report from Andres Freund.
* Fix multiple memory leaks in PLy_spi_execute_fetch_result: it would leakTom Lane2010-04-30
| | | | | | | | | | memory if the result had zero rows, and also if there was any sort of error while converting the result tuples into Python data. Reported and partially fixed by Andres Freund. Back-patch to all supported versions. Note: I haven't tested the 7.4 fix. 7.4's configure check for python is so obsolete it doesn't work on my current machines :-(. The logic change is pretty straightforward though.
* Fix a couple of places where the result of fgets() wasn't checked.Tom Lane2010-04-30
| | | | | | | This is mostly to suppress compiler warnings, although in principle the cases could result in undesirable behavior. Martin Pitt
* Fix handling of b-tree reuse WAL records when hot standby is disabled,Heikki Linnakangas2010-04-30
| | | | | and add missing code in btree_desc for them. This fixes the bug with "tree_redo: unknown op code 208" error reported by Jaime Casanova.