summaryrefslogtreecommitdiff
path: root/doc/src
AgeCommit message (Collapse)Author
2013-01-29Allow pgbench to use a scale larger than 21474.Heikki Linnakangas
Beyond 21474, the number of accounts exceed the range for int4. Change the initialization code to use bigint for account id columns when scale is large enough, and switch to using int64s for the variables in pgbench code. The threshold where we switch to bigints is set at 20000, because that's easier to remember and document than 21474, and ensures that there is some headroom when int4s are used. Greg Smith, with various changes by Euler Taveira de Oliveira, Gurjeet Singh and Satoshi Nagayasu.
2013-01-28REASSIGN OWNED: handle shared objects, tooAlvaro Herrera
Give away ownership of shared objects (databases, tablespaces) along with local objects, per original code intention. Try to make the documentation clearer, too. Per discussion about DROP OWNED's brokenness, in bug #7748. This is not backpatched because it'd require some refactoring of the ALTER/SET OWNER code for databases and tablespaces.
2013-01-28DROP OWNED: don't try to drop tablespaces/databasesAlvaro Herrera
My "fix" for bugs #7578 and #6116 on DROP OWNED at fe3b5eb08a1 not only misstated that it applied to REASSIGN OWNED (which it did not affect), but it also failed to fix the problems fully, because I didn't test the case of owned shared objects. Thus I created a new bug, reported by Thomas Kellerer as #7748, which would cause DROP OWNED to fail with a not-for-user-consumption error message. The code would attempt to drop the database, which not only fails to work because the underlying code does not support that, but is a pretty dangerous and undesirable thing to be doing as well. This patch fixes that bug by having DROP OWNED only attempt to process shared objects when grants on them are found, ignoring ownership. Backpatch to 8.3, which is as far as the previous bug was backpatched.
2013-01-26Make LATERAL implicit for functions in FROM.Tom Lane
The SQL standard does not have general functions-in-FROM, but it does allow UNNEST() there (see the <collection derived table> production), and the semantics of that are defined to include lateral references. So spec compliance requires allowing lateral references within UNNEST() even without an explicit LATERAL keyword. Rather than making UNNEST() a special case, it seems best to extend this flexibility to any function-in-FROM. We'll still allow LATERAL to be written explicitly for clarity's sake, but it's now a noise word in this context. In theory this change could result in a change in behavior of existing queries, by allowing what had been an outer reference in a function-in-FROM to be captured by an earlier FROM-item at the same level. However, all pre-9.3 PG releases have a bug that causes them to match variable references to earlier FROM-items in preference to outer references (and then throw an error). So no previously-working query could contain the type of ambiguity that would risk a change of behavior. Per a suggestion from Andrew Gierth, though I didn't use his patch.
2013-01-26Issue ERROR if FREEZE mode can't be honored by COPYBruce Momjian
Previously non-honored FREEZE mode was ignored. This also issues an appropriate error message based on the cause of the failure, per suggestion from Tom. Additional regression test case added.
2013-01-25doc: revert 80c20fcf3df17309b3c131962045825f42e45bc7 andBruce Momjian
0e93959a70ac6e7c7858d1d6fb00645e7540a1cc Revert patch that modified doc index mentions of search_path Per Peter E.
2013-01-25doc: mention commit_delay is only honored if fsync is enabledBruce Momjian
per Tianyin Xu
2013-01-25Change plan caching to honor, not resist, changes in search_path.Tom Lane
In the initial implementation of plan caching, we saved the active search_path when a plan was first cached, then reinstalled that path anytime we needed to reparse or replan. The idea of that was to try to reselect the same referenced objects, in somewhat the same way that views continue to refer to the same objects in the face of schema or name changes. Of course, that analogy doesn't bear close inspection, since holding the search_path fixed doesn't cope with object drops or renames. Moreover sticking with the old path seems to create more surprises than it avoids. So instead of doing that, consider that the cached plan depends on search_path, and force reparse/replan if the active search_path is different than it was when we last saved the plan. This gets us fairly close to having "transparency" of plan caching, in the sense that the cached statement acts the same as if you'd just resubmitted the original query text for another execution. There are still some corner cases where this fails though: a new object added in the search path schema(s) might capture a reference in the query text, but we'd not realize that and force a reparse. We might try to fix that in the future, but for the moment it looks too expensive and complicated.
2013-01-25doc: merge ecpg username/password example into C commentBruce Momjian
Backpatch to 9.2 per Tom Lane
2013-01-25doc: adjust search_path secondary index mentionBruce Momjian
per Tom Lane
2013-01-25doc: split search_path index entries into separate secondariesBruce Momjian
Karl O. Pinc
2013-01-25Make it easy to time out pg_isready, and make the default 3 seconds.Robert Haas
Along the way, add a missing line to the help message. Phil Sorber, reviewed by Fujii Masao
2013-01-25docs: In ecpg, clarify how username/password colon parameters are usedBruce Momjian
Backpatch to 9.2. Patch from Alan B
2013-01-25Add prosecdef to \df+ output.Heikki Linnakangas
Jon Erdman, reviewed by Phil Sorber and Stephen Frost.
2013-01-25doc: improve wording of "foreign data server" in file-fdw docsBruce Momjian
Backpatch to 9.2 Shigeru HANADA
2013-01-25Make pg_dump exclude unlogged table data on hot standby slavesMagnus Hagander
Noted by Joe Van Dyk
2013-01-25Fix concat() and format() to handle VARIADIC-labeled arguments correctly.Tom Lane
Previously, the VARIADIC labeling was effectively ignored, but now these functions act as though the array elements had all been given as separate arguments. Pavel Stehule
2013-01-24doc: add mention of ssi read anomolies to mvcc docsBruce Momjian
From Jeff Davis, modified by Kevin Grittner
2013-01-24doc: correct sepgsql doc about permission checking of CASCADEBruce Momjian
Backpatch to 9.2. Patch from Kohei KaiGai
2013-01-24Fix SPI documentation for new handling of ExecutorRun's count parameter.Tom Lane
Since 9.0, the count parameter has only limited the number of tuples actually returned by the executor. It doesn't affect the behavior of INSERT/UPDATE/DELETE unless RETURNING is specified, because without RETURNING, the ModifyTable plan node doesn't return control to execMain.c for each tuple. And we only check the limit at the top level. While this behavioral change was unintentional at the time, discussion of bug #6572 led us to the conclusion that we prefer the new behavior anyway, and so we should just adjust the docs to match rather than change the code. Accordingly, do that. Back-patch as far as 9.0 so that the docs match the code in each branch.
2013-01-24Docs shouldn't say HOT Standby.Simon Riggs
Not an acronym. Jeff Janes
2013-01-23Clarify that connection parameters aren't totally meaningless for PQping.Robert Haas
Per discussion with Phil Sorber.
2013-01-23pg_isreadyRobert Haas
New command-line utility to test whether a server is ready to accept connections. Phil Sorber, reviewed by Michael Paquier and Peter Eisentraut
2013-01-23Improve concurrency of foreign key lockingAlvaro Herrera
This patch introduces two additional lock modes for tuples: "SELECT FOR KEY SHARE" and "SELECT FOR NO KEY UPDATE". These don't block each other, in contrast with already existing "SELECT FOR SHARE" and "SELECT FOR UPDATE". UPDATE commands that do not modify the values stored in the columns that are part of the key of the tuple now grab a SELECT FOR NO KEY UPDATE lock on the tuple, allowing them to proceed concurrently with tuple locks of the FOR KEY SHARE variety. Foreign key triggers now use FOR KEY SHARE instead of FOR SHARE; this means the concurrency improvement applies to them, which is the whole point of this patch. The added tuple lock semantics require some rejiggering of the multixact module, so that the locking level that each transaction is holding can be stored alongside its Xid. Also, multixacts now need to persist across server restarts and crashes, because they can now represent not only tuple locks, but also tuple updates. This means we need more careful tracking of lifetime of pg_multixact SLRU files; since they now persist longer, we require more infrastructure to figure out when they can be removed. pg_upgrade also needs to be careful to copy pg_multixact files over from the old server to the new, or at least part of multixact.c state, depending on the versions of the old and new servers. Tuple time qualification rules (HeapTupleSatisfies routines) need to be careful not to consider tuples with the "is multi" infomask bit set as being only locked; they might need to look up MultiXact values (i.e. possibly do pg_multixact I/O) to find out the Xid that updated a tuple, whereas they previously were assured to only use information readily available from the tuple header. This is considered acceptable, because the extra I/O would involve cases that would previously cause some commands to block waiting for concurrent transactions to finish. Another important change is the fact that locking tuples that have previously been updated causes the future versions to be marked as locked, too; this is essential for correctness of foreign key checks. This causes additional WAL-logging, also (there was previously a single WAL record for a locked tuple; now there are as many as updated copies of the tuple there exist.) With all this in place, contention related to tuples being checked by foreign key rules should be much reduced. As a bonus, the old behavior that a subtransaction grabbing a stronger tuple lock than the parent (sub)transaction held on a given tuple and later aborting caused the weaker lock to be lost, has been fixed. Many new spec files were added for isolation tester framework, to ensure overall behavior is sane. There's probably room for several more tests. There were several reviewers of this patch; in particular, Noah Misch and Andres Freund spent considerable time in it. Original idea for the patch came from Simon Riggs, after a problem report by Joel Jacobson. Most code is from me, with contributions from Marti Raudsepp, Alexander Shulgin, Noah Misch and Andres Freund. This patch was discussed in several pgsql-hackers threads; the most important start at the following message-ids: AANLkTimo9XVcEzfiBR-ut3KVNDkjm2Vxh+t8kAmWjPuv@mail.gmail.com 1290721684-sup-3951@alvh.no-ip.org 1294953201-sup-2099@alvh.no-ip.org 1320343602-sup-2290@alvh.no-ip.org 1339690386-sup-8927@alvh.no-ip.org 4FE5FF020200002500048A3D@gw.wicourts.gov 4FEAB90A0200002500048B7D@gw.wicourts.gov
2013-01-23Further documentation tweaks for event triggers.Robert Haas
Per discussion between Dimitri Fontaine, myself, and others.
2013-01-22doc: Fix declared number of columns in tablePeter Eisentraut
This was broken in 841a5150c575ccd89e4b03aec66eeeefb21f3cbe.
2013-01-22Fix CREATE EVENT TRIGGER syntax synopsis in documentation.Robert Haas
Dimitri Fontaine, per a report from Thom Brown
2013-01-21Typo fixes.Robert Haas
Noted by Thom Brown.
2013-01-21Add ddl_command_end support for event triggers.Robert Haas
Dimitri Fontaine, with slight changes by me
2013-01-20doc: Fix syntax of a URLPeter Eisentraut
Leading white space before the "http:" is apparently treated as a relative link at least by some browsers.
2013-01-20Clarify that streaming replication can be both async and syncMagnus Hagander
Josh Kupershmidt
2013-01-18libpq doc: Clarify what commands return PGRES_TUPLES_OKPeter Eisentraut
The old text claimed that INSERT and UPDATE always return PGRES_COMMAND_OK, but INSERT/UPDATE with RETURNING return PGRES_TUPLES_OK. Josh Kupershmidt
2013-01-18psql latex fixesBruce Momjian
Remove extra line at bottom of table for new 'latex' mode border=3. Also update 'latex'-longtable 'tableattr' docs to say 'whitespace-separated' instead of 'space'.
2013-01-17Make pg_receivexlog and pg_basebackup -X stream work across timeline switches.Heikki Linnakangas
This mirrors the changes done earlier to the server in standby mode. When receivelog reaches the end of a timeline, as reported by the server, it fetches the timeline history file of the next timeline, and restarts streaming from the new timeline by issuing a new START_STREAMING command. When pg_receivexlog crosses a timeline, it leaves the .partial suffix on the last segment on the old timeline. This helps you to tell apart a partial segment left in the directory because of a timeline switch, and a completed segment. If you just follow a single server, it won't make a difference, but it can be significant in more complicated scenarios where new WAL is still generated on the old timeline. This includes two small changes to the streaming replication protocol: First, when you reach the end of timeline while streaming, the server now sends the TLI of the next timeline in the server's history to the client. pg_receivexlog uses that as the next timeline, so that it doesn't need to parse the timeline history file like a standby server does. Second, when BASE_BACKUP command sends the begin and end WAL positions, it now also sends the timeline IDs corresponding the positions.
2013-01-17Add a latex-longtable output format to psqlBruce Momjian
latex longtable is more powerful than the 'tabular' output format 'latex' uses. Also add border=3 support to 'latex'.
2013-01-17Support multiple -t/--table arguments for more commandsMagnus Hagander
On top of the previous support in pg_dump, add support to specify multiple tables (by using the -t option multiple times) to pg_restore, clsuterdb, reindexdb and vacuumdb. Josh Kupershmidt, reviewed by Karl O. Pinc
2013-01-09Allow parallel copy/link in pg_upgradeBruce Momjian
This patch implements parallel copying/linking of files by tablespace using the --jobs option in pg_upgrade.
2013-01-07Add new "-q" logging option (quiet mode) while in initialize modeTatsuo Ishii
(-i), producing only one progress message per 5 seconds along with elapsed time and estimated remaining time. Also add elapsed time and estimated remaining time to the default logging(prints one message each 100000 rows). Patch contributed by Tomas Vondra, reviewed by Jeevan Chalke and Tatsuo Ishii.
2013-01-05Add support for generating minimal recovery.conf when doing base backupsMagnus Hagander
Adds commandline option -R to pg_basebackup that creates a recovery.conf which enables standby mode using the same parameters that pg_basebackup used to connect to the master, and writes it into the output directory (or injects it in the tar file when tar format is used). Zoltan Boszormenyi, modified by Magnus Hagander, reviewed by Amit Kapila & Fujii Masao
2013-01-05doc: Update CREATE FUNCTION compatibility informationPeter Eisentraut
Parameter defaults are actually in the SQL standard, while it was previously claimed they were not.
2013-01-04Invent a "one-shot" variant of CachedPlans for better performance.Tom Lane
SPI_execute() and related functions create a CachedPlan, execute it once, and immediately discard it, so that the functionality offered by plancache.c is of no value in this code path. And performance measurements show that the extra data copying and invalidation checking done by plancache.c slows down simple queries by 10% or more compared to 9.1. However, enough of the SPI code is shared with functions that do need plan caching that it seems impractical to bypass plancache.c altogether. Instead, let's invent a variant version of cached plans that preserves 99% of the API but doesn't offer any of the actual functionality, nor the overhead. This puts SPI_execute() performance back on par, or maybe even slightly better, than it was before. This change should resolve recent complaints of performance degradation from Dong Ye, Pavel Stehule, and others. By avoiding data copying, this change also reduces the amount of memory needed to execute many-statement SPI_execute() strings, as for instance in a recent complaint from Tomas Vondra. An additional benefit of this change is that multi-statement SPI_execute() query strings are now processed fully serially, that is we complete execution of earlier statements before running parse analysis and planning on following ones. This eliminates a long-standing POLA violation, in that DDL that affects the behavior of a later statement will now behave as expected. Back-patch to 9.2, since this was a performance regression compared to 9.1. (In 9.2, place the added struct fields so as to avoid changing the offsets of existing fields.) Heikki Linnakangas and Tom Lane
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2013-01-01Winflex binary on FTP site doesn't work on 64-bit Windows, update docs.Heikki Linnakangas
Plus some other minor clarifications to Windows build instructions. Craig Ringer, with minor editorialization by me.
2013-01-01Fix descrition of pg_resetxlog -l parameterMagnus Hagander
This was changed in commit 038f3a05092365eca070bdc588554520dfd5ffb9, including the description in the docs, but the reference was missed. Fujii Masao
2012-12-31doc: Correct description of ldapurlPeter Eisentraut
The ldapurl option doesn't actually support specifying a user name and password. Albe Laurenz
2012-12-29doc: Correct description of LDAP authenticationPeter Eisentraut
Parts of the description had claimed incorrect pg_hba.conf option names for LDAP authentication. Albe Laurenz
2012-12-26doc: Replace "NOTE" with proper markupPeter Eisentraut
2012-12-26Add pg_upgrade --jobs parameterBruce Momjian
Add pg_upgrade --jobs, which allows parallel dump/restore of databases, which improves performance.
2012-12-24Fix some minor issues in view pretty-printing.Tom Lane
Code review for commit 2f582f76b1945929ff07116cd4639747ce9bb8a1: don't use a static variable for what ought to be a deparse_context field, fix non-multibyte-safe test for spaces, avoid useless and potentially O(N^2) (though admittedly with a very small constant) calculations of wrap positions when we aren't going to wrap.
2012-12-22Fix documentation typo.Tom Lane
"GetForeignTableColumnOptions" should be "GetForeignColumnOptions". Noted by Metin Döşlü.