aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Add header comments to receivelog.h and streamutil.h.Fujii Masao2014-08-27
| | | | | | This commit also adds the include guards to those header files. Michael Paquier
* Fix Var handling for security barrier viewsStephen Frost2014-08-26
| | | | | | | | | | | | | | | In some cases, not all Vars were being correctly marked as having been modified for updatable security barrier views, which resulted in invalid plans (eg: when security barrier views were created over top of inheiritance structures). In passing, be sure to update both varattno and varonattno, as _equalVar won't consider the Vars identical otherwise. This isn't known to cause any issues with updatable security barrier views, but was noticed as missing while working on RLS and makes sense to get fixed. Back-patch to 9.4 where updatable security barrier views were introduced.
* doc: Document valid checkpoint_timeout rangePeter Eisentraut2014-08-26
| | | | Author: Fabien COELHO <coelho@cri.ensmp.fr>
* Fix whitespacePeter Eisentraut2014-08-26
|
* Fix typo in b34e37bfefbed1bf9396dde18f308d8b96fd176c.Robert Haas2014-08-26
| | | | Spotted by Peter Geoghegan.
* Fix superuser concurrent refresh of matview owned by another.Kevin Grittner2014-08-26
| | | | | | | | | | | Use SECURITY_LOCAL_USERID_CHANGE while building temporary tables; only escalate to SECURITY_RESTRICTED_OPERATION while potentially running user-supplied code. The more secure mode was preventing temp table creation. Add regression tests to cover this problem. This fixes Bug #11208 reported by Bruno Emanuel de Andrade Silva. Backpatch to 9.4, where the bug was introduced.
* Mark IsBinaryUpgrade as PGDLLIMPORT to fix windows builds after a7ae1dc.Andres Freund2014-08-26
| | | | Author: David Rowley
* Implement IF NOT EXISTS for CREATE SEQUENCE.Heikki Linnakangas2014-08-26
| | | | Fabrízio de Royes Mello
* Specify the port in dblink and postgres_fdw tests.Andres Freund2014-08-26
| | | | | | | | | | That allows to run those tests against a postmaster listening on a nonstandard port without requiring to export PGPORT in postmaster's environment. This still doesn't support connecting to a nondefault host without configuring it in postmaster's environment. That's harder and less frequently used though. So this is a useful step.
* Don't hardcode contrib_regression dbname in postgres_fdw and dblink tests.Andres Freund2014-08-26
| | | | | | | | | | | That allows parallel installcheck to succeed inside contrib/. The output is not particularly pretty unless make's -O option to synchronize the output is used. There's other tests, outside contrib, that use a hardcoded, non-unique, database name. Those prohibit paralell installcheck to be used across more directories; but that's something for a separate patch.
* Show schema names in pg_dump verbose output.Heikki Linnakangas2014-08-26
| | | | Fabrízio de Royes Mello, reviewed by Michael Paquier
* pg_upgrade: prevent automatic oid assignmentBruce Momjian2014-08-25
| | | | | | | | | | Prevent automatic oid assignment when in binary upgrade mode. Also throw an error when contrib/pg_upgrade_support functions are called when not in binary upgrade mode. This prevent automatically-assigned oids from conflicting with later pre-assigned oids coming from the old cluster. It also makes sure oids are preserved in call important cases.
* rename macro isTempOrToastNamespace to isTempOrTempToastNamespaceBruce Momjian2014-08-25
| | | | Done for clarity
* pg_upgrade: use CTE query rather than temp tableBruce Momjian2014-08-25
| | | | | Now that 8.3 is not supported, we can use a CTE and not temp tables. This allows for auto-oid assignment protection in a future patch.
* pg_upgrade docs: update docs for 8.3 support removalBruce Momjian2014-08-25
|
* revert "Throw error for ALTER TABLE RESET of an invalid option"Bruce Momjian2014-08-25
| | | | | | Reverts commits 73d78e11a0f7183c80b93eefbbb6026fe9664015 and b0488e5c4fbfdce8acc989bdc17d9f0ec09ac281. Also reverts pg_upgrade changes.
* pg_upgrade: remove support for 8.3 old clustersBruce Momjian2014-08-25
| | | | | This trims down the code, and is in preparation for hardening pg_upgrade against auto-oid assignment.
* pg_upgrade: add SET log_min_error_statement = warningBruce Momjian2014-08-25
| | | | Add to commit 73d78e11a0f7183c80b93eefbbb6026fe9664015
* Throw error for ALTER TABLE RESET of an invalid optionBruce Momjian2014-08-25
| | | | | | | Also adjust pg_upgrade to not use this method for optional TOAST table creation. Patch by Fabrízio de Royes Mello
* pg_ctl, pg_upgrade: allow multiple -o/-O options, append themBruce Momjian2014-08-25
| | | | Report by Pavel Raiskup
* upgrade docs: highlight pg_upgrade, warn about globals preservationBruce Momjian2014-08-25
| | | | | | Also, remove OID preservation mention, mention non-text dump formats Backpatch through 9.4
* Revert XactLockTableWait context setup in conditional multixact waitAlvaro Herrera2014-08-25
| | | | | | | | | There's no point in setting up a context error callback when doing conditional lock acquisition, because we never actually wait and so the user wouldn't be able to see the context message anywhere. In fact, this is more in line with what ConditionalXactLockTableWait is doing. Backpatch to 9.4, where this was added.
* Use newly added InvalidCommandId instead of 0Alvaro Herrera2014-08-25
| | | | | | | | | The symbol was added by 71901ab6d; the original code was introduced by 6868ed749. Development of both overlapped which is why we apparently failed to notice. This is a (very slight) behavior change, so I'm not backpatching this to 9.4 for now, even though the symbol does exist there.
* DefineType: return base type OID, not its arrayAlvaro Herrera2014-08-25
| | | | | | Event triggers want to know the OID of the interesting object created, which is the main type. The array created as part of the operation is just a subsidiary object which is not of much interest.
* Have CREATE TABLE AS and REFRESH return an OIDAlvaro Herrera2014-08-25
| | | | | | Other DDL commands are already returning the OID, which is required for future additional event trigger work. This is merely making these commands in line with the rest of utility command support.
* More psprintf goodnessAlvaro Herrera2014-08-25
|
* Oops, forgot to "git add" one last changeAlvaro Herrera2014-08-25
|
* Editorial review of SET UNLOGGEDAlvaro Herrera2014-08-25
| | | | | | | | Add a succint comment explaining why it's correct to change the persistence in this way. Also s/loggedness/persistence/ because native speakers didn't like the latter term. Fabrízio and Álvaro
* Add regression tests for SELECT FOR UPDATE/SHARE NOWAIT.Heikki Linnakangas2014-08-25
| | | | Thomas Munro
* Fix typos in some error messages thrown by extension scripts when fed to psql.Andres Freund2014-08-25
| | | | | | | | | | Some of the many error messages introduced in 458857cc missed 'FROM unpackaged'. Also e016b724 and 45ffeb7e forgot to quote extension version numbers. Backpatch to 9.1, just like 458857cc which introduced the messages. Do so because the error messages thrown when the wrong command is copy & pasted aren't easy to understand.
* Don't track DEALLOCATE in pg_stat_statements.Heikki Linnakangas2014-08-25
| | | | | | | | | | We also don't track PREPARE, nor do we track planning time in general, so let's ignore DEALLOCATE as well for consistency. Backpatch to 9.4, but not further than that. Although it seems unlikely that anyone is relying on the current behavior, this is a behavioral change. Fabien Coelho
* Fix another ancient memory-leak bug in relcache.c.Tom Lane2014-08-24
| | | | | | | | | | | | | | | | | | | | | | | | CheckConstraintFetch() leaked a cstring in the caller's context for each CHECK constraint expression it copied into the relcache. Ordinarily that isn't problematic, but it can be during CLOBBER_CACHE testing because so many reloads can happen during a single query; so complicate the code slightly to allow freeing the cstring after use. Per testing on buildfarm member barnacle. This is exactly like the leak fixed in AttrDefaultFetch() by commit 078b2ed291c758e7125d72c3a235f128d40a232b. (Yes, this time I did look for other instances of the same coding pattern :-(.) Like that patch, no back-patch, since it seems unlikely that there's any problem except under very artificial test conditions. BTW, it strikes me that both of these places would require further work comparable to commit ab8c84db2f7af008151b848cf1d6a4672a39eecd, if we ever supported defaults or check constraints on system catalogs: they both assume they are copying into an empty relcache data structure, and that conceivably wouldn't be the case during recursive reloading of a system catalog. This does not seem worth worrying about for the moment, since there is no near-term prospect of supporting any such thing. So I'll just note the possibility for the archives' sake.
* doc: Improve pg_restore help outputPeter Eisentraut2014-08-23
| | | | | | Add a note that some options can be specified multiple times to select multiple objects to restore. This replaces the somewhat confusing use of plurals in the option descriptions themselves.
* Implement ALTER TABLE .. SET LOGGED / UNLOGGEDAlvaro Herrera2014-08-22
| | | | | | | | | | | | This enables changing permanent (logged) tables to unlogged and vice-versa. (Docs for ALTER TABLE / SET TABLESPACE got shuffled in an order that hopefully makes more sense than the original.) Author: Fabrízio de Royes Mello Reviewed by: Christoph Berg, Andres Freund, Thom Brown Some tweaking by Álvaro Herrera
* Fix outdated commentAlvaro Herrera2014-08-22
|
* Fix corner-case behaviors in JSON/JSONB field extraction operators.Tom Lane2014-08-22
| | | | | | | | | | | | | | | | | | | | | Cause the path extraction operators to return their lefthand input, not NULL, if the path array has no elements. This seems more consistent since the case ought to correspond to applying the simple extraction operator (->) zero times. Cause other corner cases in field/element/path extraction to return NULL rather than failing. This behavior is arguably more useful than throwing an error, since it allows an expression index using these operators to be built even when not all values in the column are suitable for the extraction being indexed. Moreover, we already had multiple inconsistencies between the path extraction operators and the simple extraction operators, as well as inconsistencies between the JSON and JSONB code paths. Adopt a uniform rule of returning NULL rather than throwing an error when the JSON input does not have a structure that permits the request to be satisfied. Back-patch to 9.4. Update the release notes to list this as a behavior change since 9.3.
* Fix newly introduced misspelling of existence in pg_buffercache.Andres Freund2014-08-22
| | | | Peter Geoghegan
* Fix comment in pg_basebackup.Heikki Linnakangas2014-08-22
| | | | | | The option is called --tablespace-mapping, not --tablespace. Amit Kapila
* Change the way pg_basebackup's tablespace mapping is implemented.Heikki Linnakangas2014-08-22
| | | | | | | | | | | | | | | | Previously, we would first create the symlinks the way they are in the original system, and at the end replace them with the mapped symlinks. That never really made much sense, so now we create the symlink pointing to the correct location to begin with, so that there's no need to fix them at the end. The old coding didn't work correctly on Windows, because Windows junction points look more like directories than files, and ought to be removed with rmdir rather than unlink. Also, it incorrectly used "%d" rather than "%u" to print an Oid, but that's gone now. Report and patch by Amit Kapila, with minor changes by me. Reviewed by MauMau. Backpatch to 9.4, where the --tablespace feature was added.
* Fix whitespacePeter Eisentraut2014-08-21
|
* Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'Stephen Frost2014-08-21
| | | | | | | | | | | | As 'ALTER TABLESPACE .. MOVE ALL' really didn't change the tablespace but instead changed objects inside tablespaces, it made sense to rework the syntax and supporting functions to operate under the 'ALTER (TABLE|INDEX|MATERIALIZED VIEW)' syntax and to be in tablecmds.c. Pointed out by Alvaro, who also suggested the new syntax. Back-patch to 9.4.
* Add pinning_backends column to the pg_buffercache extension.Andres Freund2014-08-22
| | | | | | | | | | | The new column shows how many backends have a buffer pinned. That can be useful during development or to diagnose production issues e.g. caused by vacuum waiting for cleanup locks. To handle upgrades transparently - the extension might be used in views - deal with callers expecting the old number of columns. Reviewed by Fujii Masao and Rajeev rastogi.
* Add #define INT64_MODIFIER for the printf length modifier for 64-bit ints.Heikki Linnakangas2014-08-21
| | | | | | | We have had INT64_FORMAT and UINT64_FORMAT for a long time, but that's not good enough if you want something more exotic, like "%20lld". Abhijit Menon-Sen, per Andres Freund's suggestion.
* More regression test cases for json/jsonb extraction operators.Tom Lane2014-08-20
| | | | | | | Cover some cases I omitted before, such as null and empty-string elements in the path array. This exposes another inconsistency: json_extract_path complains about empty path elements but jsonb_extract_path does not.
* Fix core dump in jsonb #> operator, and add regression test cases.Tom Lane2014-08-20
| | | | | | | | | | | | | | | | | jsonb's #> operator segfaulted (dereferencing a null pointer) if the RHS was a zero-length array, as reported in bug #11207 from Justin Van Winkle. json's #> operator returns NULL in such cases, so for the moment let's make jsonb act likewise. Also add a bunch of regression test queries memorializing the -> and #> operators' behavior for this and other corner cases. There is a good argument for changing some of these behaviors, as they are not very consistent with each other, and throwing an error isn't necessarily a desirable behavior for operators that are likely to be used in indexes. However, everybody can agree that a core dump is the Wrong Thing, and we need test cases even if we decide to change their expected output later.
* pg_upgrade: adjust logging to use QUERY_ALLOC lengthsBruce Momjian2014-08-20
| | | | | Allows the logging to print the entire text of failed queries, rather than a truncated version.
* Use comma+space as the separator in the default search_path.Heikki Linnakangas2014-08-20
| | | | | | | | While the space is optional, it seems nicer to be consistent with what you get if you do "SET search_path=...". SET always normalizes the separator to be comma+space. Christoph Martin
* Revert "Fix bug in checking of IDENTIFY_SYSTEM result."Fujii Masao2014-08-19
| | | | | | | | | | | | | | This reverts commit 083d29c65b7897f90c70e6dc0a4240a5fa75c8f2. The commit changed the code so that it causes an errors when IDENTIFY_SYSTEM returns three columns. But which prevents us from using the replication-related utilities against the server with older version. This is not what we want. For that compatibility, we allow the utilities to receive three columns as the result of IDENTIFY_SYSTEM eventhough it actually returns four columns in 9.4 or later. Pointed out by Andres Freund.
* Fix bug in checking of IDENTIFY_SYSTEM result.Fujii Masao2014-08-19
| | | | | | | | | | | | | 5a991ef8692ed0d170b44958a81a6bd70e90585 added new column into the result of IDENTIFY_SYSTEM command. But it was not reflected into several codes checking that result. Specifically though the number of columns in the result was increased to 4, it was still compared with 3 in some replication codes. Back-patch to 9.4 where the number of columns in IDENTIFY_SYSTEM result was increased. Report from Michael Paquier
* Install libpq DLL with $(INSTALL_SHLIB).Noah Misch2014-08-18
| | | | | | | Programs need execute permission on a DLL file to load it. MSYS "install" ignores the mode argument, and our Cygwin build statically links libpq into programs. That explains the lack of buildfarm trouble. Back-patch to 9.0 (all supported versions).