- 23 Oct, 2014 1 commit
-
-
Peter Eisentraut authored
-
- 22 Oct, 2014 5 commits
-
-
Tom Lane authored
The EOF-detection logic in pqReadData was a bit confused about who should set up the error message in case the kernel gives us read-ready-but-no-data rather than ECONNRESET or some other explicit error condition. Since the whole point of this situation is that the lower-level functions don't know there's anything wrong, pqReadData itself must set up the message. But keep the assumption that if an errno was reported, a message was set up at lower levels. Per bug #11712 from Marko Tiikkaja. It's been like this for a very long time, so back-patch to all supported branches.
-
Michael Meskes authored
Declare static variable as static and external as extern.
-
Heikki Linnakangas authored
The _bt_tuplecompare() function mentioned in comment hasn't existed for a long time. Peter Geoghegan
-
Noah Misch authored
When commit 846e91e0 switched the linker driver from dlltool/dllwrap to gcc, it became possible for linking to choose shared libgcc. Backends having loaded a module dynamically linked to libgcc can exit abnormally, which the postmaster treats like a crash. Resume use of static libgcc exclusively, like 9.3 and earlier. Back-patch to 9.4.
-
Noah Misch authored
This improves consistency with the MSVC build. On buildfarm member narwhal, since commit 846e91e0, shfolder.dll:SHGetFolderPath() crashes when dblink calls it by way of pqGetHomeDirectory(). Back-patch to 9.4, where that commit first appeared. How it caused this regression remains a mystery. This is a partial revert of commit 889f0381, which adopted shfolder.dll for Windows NT 4.0 compatibility. PostgreSQL 8.2 dropped support for that operating system.
-
- 21 Oct, 2014 5 commits
-
-
Tom Lane authored
The last three updates to the sequence regression test have all forgotten to touch the alternate expected-output file. Sigh. Michael Paquier
-
Peter Eisentraut authored
Author: Herwin Weststrate <herwin@quarantainenet.nl> Reviewed-by: Ali Akbar <the.apaan@gmail.com>
-
Peter Eisentraut authored
Building the documentation with XSLT does not check the DTD, like a DSSSL build would. One can often get away with having invalid XML, but the stylesheets might then create incorrect output, as they are not designed to handle that. Therefore, check the validity of the XML against the DTD, using xmllint, during the build. Add xmllint detection to configure, and add some documentation. xmllint comes with libxml2, which is already in use, but it might be in a separate package, such as libxml2-utils on Debian. Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
-
Peter Eisentraut authored
The old text was written in ancient times when RPM packages could be shared more or less freely across a plethora of RPM-based Linux distributions. This isn't really the case anymore, so just make this information more concrete for the Red Hat family.
-
Peter Eisentraut authored
based on patch from Dag-Erling Smørgrav <des@des.no>
-
- 20 Oct, 2014 9 commits
-
-
Andres Freund authored
The duplication originated in cdd46c76, where restartpoints were introduced. In LogCheckpointStart's case the duplication actually lead to the compiler's format string checking not to be effective because the format string wasn't constant. Arguably these messages shouldn't be elog(), but ereport() style messages. That'd even allow to translate the messages... But as there's more mistakes of that kind in surrounding code, it seems better to change that separately.
-
Andres Freund authored
Commit 7dbb6069 added a new CHECKPOINT_FLUSH_ALL flag. As that commit needed to be backpatched I didn't change the numeric values of the existing flags as that could lead to nastly problems if any external code issued checkpoints. That's not a concern on master, so renumber them there. Also add a comment about CHECKPOINT_FLUSH_ALL above CreateCheckPoint().
-
Andres Freund authored
CREATE DATABASE and ALTER DATABASE .. SET TABLESPACE copy the source database directory on the filesystem level. To ensure the on disk state is consistent they block out users of the affected database and force a checkpoint to flush out all data to disk. Unfortunately, up to now, that checkpoint didn't flush out dirty buffers from unlogged relations. That bug means there could be leftover dirty buffers in either the template database, or the database in its old location. Leading to problems when accessing relations in an inconsistent state; and to possible problems during shutdown in the SET TABLESPACE case because buffers belonging files that don't exist anymore are flushed. This was reported in bug #10675 by Maxim Boguk. Fix by Pavan Deolasee, modified somewhat by me. Reviewed by MauMau and Fujii Masao. Backpatch to 9.1 where unlogged tables were introduced.
-
Peter Eisentraut authored
Apparently, computers are now a bit faster than when this was first added, so we need to make room for a digit or two in the ops/sec format. While we're at it, adjust some of the other output for a more consistent line length.
-
Andrew Dunstan authored
json_agg and json_object_agg and their associated transition functions should have been marked as stable rather than immutable, as they call IO functions indirectly. Changing this probably isn't going to make much difference, as you can't use an aggregate function in an index expression, but we should be correct nevertheless. json_object, on the other hand, should be marked immutable rather than stable, as it does not call IO functions. As discussed on -hackers, this change is being made without bumping the catalog version, as we don't want to do that at this stage of the cycle, and the changes are very unlikely to affect anyone.
-
Tom Lane authored
If an inline-able SQL function taking a composite argument is used in a LATERAL subselect, and the composite argument is a lateral reference, the planner could fail with "variable not found in subplan target list", as seen in bug #11703 from Karl Bartel. (The outer function call used in the bug report and in the committed regression test is not really necessary to provoke the bug --- you can get it if you manually expand the outer function into "LATERAL (SELECT inner_function(outer_relation))", too.) The cause of this is that we generate the reltargetlist for the referenced relation before doing eval_const_expressions() on the lateral sub-select's expressions (cf find_lateral_references()), so what's scheduled to be emitted by the referenced relation is a whole-row Var, not the simplified single-column Var produced by optimizing the function's FieldSelect on the whole-row Var. Then setrefs.c fails to match up that lateral reference to what's available from the outer scan. Preserving the FieldSelect optimization in such cases would require either major planner restructuring (to recursively do expression simplification on sub-selects much earlier) or some amazingly ugly kluge to change the reltargetlist of a possibly-already-planned relation. It seems better just to skip the optimization when the Var is from an upper query level; the case is not so common that it's likely anyone will notice a few wasted cycles. AFAICT this problem only occurs for uplevel LATERAL references, so back-patch to 9.3 where LATERAL was added.
-
Robert Haas authored
David Rowley
-
Robert Haas authored
Etsuro Fujita
-
- 19 Oct, 2014 3 commits
-
-
Peter Eisentraut authored
-
Peter Eisentraut authored
Revert the output of the individual backslash commands that change print settings back to the 9.3 way (not showing the command name in parentheses). Implement \pset without arguments separately, showing all settings with values in a table form.
-
Peter Eisentraut authored
This matches the behavior of other parameters that are unsupported on some systems (e.g., ssl). Also document the default value.
-
- 18 Oct, 2014 6 commits
-
-
Bruce Momjian authored
Also document that PITR is also affected.
-
Bruce Momjian authored
interval precision can only be specified after the "interval" keyword if no units are specified. Previously we incorrectly checked the units to see if the precision was legal, causing confusion. Report by Alvaro Herrera
-
Bruce Momjian authored
Mention tablespace must be empty and no one connected to the database. Report by Josh Berkus
-
Peter Eisentraut authored
This needed a general cleanup of wording, typos, outdated terminology, formatting, and hard-to-understand and borderline incorrect information. Also tweak the pg_receivexlog page a bit to make the two more consistent.
-
Tom Lane authored
Follow our usual style of providing an "extern" for a standard library function only when we're also providing the implementation. This avoids issues when the system headers declare the function slightly differently than we do, as noted by Caleb Welton. We might have to go to the extent of probing to see if the system headers declare the function, but let's not do that until it's demonstrated to be necessary. Oversight in commit 9e6b1bf2. Back-patch to all supported branches, as that was.
-
Tom Lane authored
Nearly all Paths have parents, but a ResultPath representing an empty FROM clause does not. Avoid a core dump in such cases. I believe this is only a hazard for debugging usage, not for production, else we'd have heard about it before. Nonetheless, back-patch to 9.1 where the troublesome code was introduced. Noted while poking at bug #11703.
-
- 17 Oct, 2014 4 commits
-
-
Fujii Masao authored
Previously pg_receivexlog created new connection for WAL streaming even though another connection which had been established to create or delete the replication slot was being left. This caused the unused connection to be left uselessly until pg_receivexlog exited. This bug was introduced by the commit d9f38c7a. This patch changes pg_receivexlog so that the connection for the replication slot is reused for WAL streaming. Andres Freund, slightly modified by me, reviewed by Michael Paquier
-
Tom Lane authored
This reverts nearly all of commit 28f6cab6 in favor of just using the typrelid we already have in pg_dump's TypeInfo struct for the composite type. As coded, it'd crash if the composite type had no attributes, since then the query would return no rows. Back-patch to all supported versions. It seems to not really be a problem in 9.0 because that version rejects the syntax "create type t as ()", but we might as well keep the logic similar in all affected branches. Report and fix by Rushabh Lathia.
-
Tom Lane authored
Seems to have gotten rather messy lately, as a consequence of a couple of large recent commits.
-
Stephen Frost authored
pg_dump had the wrong character for update and so was failing when attempts were made to pg_dump databases with UPDATE policies. Pointed out by Fujii Masao (thanks!)
-
- 16 Oct, 2014 1 commit
-
-
Tom Lane authored
Up to now, PG has assumed that any given timezone abbreviation (such as "EDT") represents a constant GMT offset in the usage of any particular region; we had a way to configure what that offset was, but not for it to be changeable over time. But, as with most things horological, this view of the world is too simplistic: there are numerous regions that have at one time or another switched to a different GMT offset but kept using the same timezone abbreviation. Almost the entire Russian Federation did that a few years ago, and later this month they're going to do it again. And there are similar examples all over the world. To cope with this, invent the notion of a "dynamic timezone abbreviation", which is one that is referenced to a particular underlying timezone (as defined in the IANA timezone database) and means whatever it currently means in that zone. For zones that use or have used daylight-savings time, the standard and DST abbreviations continue to have the property that you can specify standard or DST time and get that time offset whether or not DST was theoretically in effect at the time. However, the abbreviations mean what they meant at the time in question (or most recently before that time) rather than being absolutely fixed. The standard abbreviation-list files have been changed to use this behavior for abbreviations that have actually varied in meaning since 1970. The old simple-numeric definitions are kept for abbreviations that have not changed, since they are a bit faster to resolve. While this is clearly a new feature, it seems necessary to back-patch it into all active branches, because otherwise use of Russian zone abbreviations is going to become even more problematic than it already was. This change supersedes the changes in commit 513d06de et al to modify the fixed meanings of the Russian abbreviations; since we've not shipped that yet, this will avoid an undesirably incompatible (not to mention incorrect) change in behavior for timestamps between 2011 and 2014. This patch makes some cosmetic changes in ecpglib to keep its usage of datetime lookup tables as similar as possible to the backend code, but doesn't do anything about the increasingly obsolete set of timezone abbreviation definitions that are hard-wired into ecpglib. Whatever we do about that will likely not be appropriate material for back-patching. Also, a potential free() of a garbage pointer after an out-of-memory failure in ecpglib has been fixed. This patch also fixes pre-existing bugs in DetermineTimeZoneOffset() that caused it to produce unexpected results near a timezone transition, if both the "before" and "after" states are marked as standard time. We'd only ever thought about or tested transitions between standard and DST time, but that's not what's happening when a zone simply redefines their base GMT offset. In passing, update the SGML documentation to refer to the Olson/zoneinfo/ zic timezone database as the "IANA" database, since it's now being maintained under the auspices of IANA.
-
- 15 Oct, 2014 1 commit
-
-
Tom Lane authored
We've gotten enough push-back on that change to make it clear that it wasn't an especially good idea to do it like that. Revert plain EXPLAIN to its previous behavior, but keep the extra output in EXPLAIN ANALYZE. Per discussion. Internally, I set this up as a separate flag ExplainState.summary that controls printing of planning time and execution time. For now it's just copied from the ANALYZE option, but we could consider exposing it to users.
-
- 14 Oct, 2014 5 commits
-
-
Alvaro Herrera authored
Per buildfarm failures
-
Alvaro Herrera authored
Most pg_dump.c global variables, which were passed down individually to dumping routines, are now grouped as members of the new DumpOptions struct, which is used as a local variable and passed down into routines that need it. This helps future development efforts; in particular it is said to enable a mode in which a parallel pg_dump run can output multiple streams, and have them restored in parallel. Also take the opportunity to clean up the pg_dump header files somewhat, to avoid circularity. Author: Joachim Wieland, revised by Álvaro Herrera Reviewed by Peter Eisentraut
-
Heikki Linnakangas authored
LWLockRelease should release all backends waiting with LWLockWaitForVar, even when another backend has already been woken up to acquire the lock, i.e. when releaseOK is false. LWLockWaitForVar can return as soon as the protected value changes, even if the other backend will acquire the lock. Fix that by resetting releaseOK to true in LWLockWaitForVar, whenever adding itself to the wait queue. This should fix the bug reported by MauMau, where the system occasionally hangs when there is a lot of concurrent WAL activity and a checkpoint. Backpatch to 9.4, where this code was added.
-
Heikki Linnakangas authored
Shigeru Hanada
-
Peter Eisentraut authored
The way the ALTER VIEW / SET options were listed in the synopsis was very confusing. Move the list to the main description, similar to how the ALTER TABLE reference page does it.
-