aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Expose waitforarchive option through pg_stop_backup()Stephen Frost2017-03-22
| | | | | | | | | | | | | | | | | Internally, we have supported the option to either wait for all of the WAL associated with a backup to be archived, or to return immediately. This option is useful to users of pg_stop_backup() as well, when they are reading the stop backup record position and checking that the WAL they need has been archived independently. This patch adds an additional, optional, argument to pg_stop_backup() which allows the user to indicate if they wish to wait for the WAL to be archived or not. The default matches current behavior, which is to wait. Author: David Steele, with some minor changes, doc updates by me. Reviewed by: Takayuki Tsunakawa, Fujii Masao Discussion: https://postgr.es/m/758e3fd1-45b4-5e28-75cd-e9e7f93a4c02@pgmasters.net
* doc: Improve CREATE PUBLICATION examplesPeter Eisentraut2017-03-22
|
* doc: Fix logical replication setup instructionsPeter Eisentraut2017-03-22
| | | | | The pg_hba.conf rules were changed in 8df9bd0b445f9bd6134915d4417efde6e85e3add.
* doc: Markup and formatting improvementsPeter Eisentraut2017-03-22
|
* Fix wrong costing of Sort under Gather Merge.Robert Haas2017-03-22
| | | | | | | | | There's no mechanism for such a sort to become a top-N sort, so we should pass -1 rather than limit_tuples to cost_sort(). Rushabh Lathia, per a report from Mithun Cy Discussion: http://postgr.es/m/CAGPqQf1akRcSgC9=6iwx=sEPap9UvPpHJLzg8_N+OuHdb6fL+g@mail.gmail.com
* Support multiple RADIUS serversMagnus Hagander2017-03-22
| | | | | | | | This changes all the RADIUS related parameters (radiusserver, radiussecret, radiusport, radiusidentifier) to be plural and to accept a comma separated list of servers, which will be tried in order. Reviewed by Adam Brightwell
* Correct erroneous comment in GetOldestXmin()Simon Riggs2017-03-22
| | | | Craig Ringer
* Refactor GetOldestXmin() to use flagsSimon Riggs2017-03-22
| | | | | | | Replace ignoreVacuum parameter with more flexible flags. Author: Eiji Seki Review: Haribabu Kommi
* Assign AccessExclusiveLocks against subxacts in Hot StandbySimon Riggs2017-03-22
| | | | | | | | | | | | Previously AELs were registered against the top-level xid, which could cause locks to be held much longer than necessary in some cases during Hot Standby replay. We now record locks directly against their appropriate xids. Requires few code changes because original code allowed for this situation but didn’t fully implement it. Discussion: CAKJS1f9vJ841HY=wonnLVbfkTWGYWdPN72VMxnArcGCjF3SywA@mail.gmail.com Author: Simon Riggs and David Rowley
* Change logical replication pg_hba.conf usePeter Eisentraut2017-03-22
| | | | | | | | Logical replication no longer uses the "replication" keyword. It just matches database entries in the normal way. The "replication" keyword now only applies to physical replication. Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
* Refine rules for altering publication ownerPeter Eisentraut2017-03-22
| | | | | | | Previously, the new owner had to be a superuser. The new rules are more refined similar to other objects. Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
* Sync pg_dump and pg_dumpall outputAndrew Dunstan2017-03-22
| | | | | | | | | | | Before exiting any files are fsync'ed. A --no-sync option is also provided for a faster exit if desired. Michael Paquier. Reviewed by Albe Laurenz Discussion: https://postgr.es/m/CAB7nPqS1uZ=Ov+UruW6jr3vB-S_DLVMPc0dQpV-fTDjmm0ZQMg@mail.gmail.com
* Improve performance of replay of AccessExclusiveLocksSimon Riggs2017-03-22
| | | | | | | | | | | | | | | | | | | | A hot standby replica keeps a list of Access Exclusive locks for a top level transaction. These locks are released when the top level transaction ends. Searching of this list is O(N^2), and each transaction had to pay the price of searching this list for locks, even if it didn't take any AE locks itself. This patch optimizes this case by having the master server track which transactions took AE locks, and passes that along to the standby server in the commit/abort record. This allows the standby to only try to release locks for transactions which actually took any, avoiding the majority of the performance issue. Refactor MyXactAccessedTempRel into MyXactFlags to allow minimal additional cruft with this. Analysis and initial patch by David Rowley Author: David Rowley and Simon Riggs
* Teach xlogreader to follow timeline switchesSimon Riggs2017-03-22
| | | | | | | | | | Uses page-based mechanism to ensure we’re using the correct timeline. Tests are included to exercise the functionality using a cold disk-level copy of the master that's started up as a replica with slots intact, but the intended use of the functionality is with later features. Craig Ringer, reviewed by Simon Riggs and Andres Freund
* Avoid Perl warningPeter Eisentraut2017-03-22
| | | | | | | Perl versions before 5.12 would warn "Use of implicit split to @_ is deprecated". Author: Jeff Janes <jeff.janes@gmail.com>
* pg_dump: Only dump publications when dumping everythingPeter Eisentraut2017-03-21
| | | | | | | Don't dump publications with pg_dump -t or similar cases that select specific groups of objects. Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
* doc: Update tool sets documentation for modern FreeBSDPeter Eisentraut2017-03-21
| | | | | | | | | | For several operating systems, we give handy package manager one-liners to install all the requirements for building our documentation. All current production FreeBSD releases have a friendly new package manager a bit like apt/yum, so give a one line command here. Also, add a brief note about gmake vs make in the doc subdirectory. Author: Thomas Munro <thomas.munro@enterprisedb.com>
* Document btree_gin support for enumsAndrew Dunstan2017-03-21
|
* Add btree_gin support for enum typesAndrew Dunstan2017-03-21
| | | | | | Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/56EA8A71.8060107@dunslane.net
* Add btree_gist support for enum types.Andrew Dunstan2017-03-21
| | | | | | | | | | | This will allow enums to be used in exclusion constraints. The code uses the new CallerFInfoFunctionCall infrastructure in fmgr, and the support for it added to btree_gist in commit 393bb504d7. Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/56EA8A71.8060107@dunslane.net
* Use CallerFInfoFunctionCall with btree_gist for varlena typesAndrew Dunstan2017-03-21
| | | | Follow up to commit 393bb504d7 which did this for numeric types.
* Use CallerFInfoFunctionCall with btree_gist for numeric typesAndrew Dunstan2017-03-21
| | | | | | | | | | None of the existing types actually need to use this mechanism, but this will allow support for enum types which will need it. A separate patch will adjust the varlena types support for consistency. Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/27220.1478360811@sss.pgh.pa.us
* Add a pg_recvlogical wrapper to PostgresNodeSimon Riggs2017-03-21
| | | | | | | | | Allows testing of logical decoding using SQL interface and/or pg_recvlogical Most logical decoding tests are in contrib/test_decoding. This module is for work that doesn't fit well there, like where server restarts are required. Craig Ringer
* Don't scan partitioned tables.Robert Haas2017-03-21
| | | | | | | | | | | | | | | | | | | Partitioned tables do not contain any data; only their unpartitioned descendents need to be scanned. However, the partitioned tables still need to be locked, even though they're not scanned. To make that work, Append and MergeAppend relations now need to carry a list of (unscanned) partitioned relations that must be locked, and InitPlan must lock all partitioned result relations. Aside from the obvious advantage of avoiding some work at execution time, this has two other advantages. First, it may improve the planner's decision-making in some cases since the empty relation might throw things off. Second, it paves the way to getting rid of the storage for partitioned tables altogether. Amit Langote, reviewed by me. Discussion: http://postgr.es/m/6837c359-45c4-8044-34d1-736756335a15@lab.ntt.co.jp
* Fix support for some operators (&<, &>, $<|, |&>) in box operator classTeodor Sigaev2017-03-21
| | | | | | | | | | | | of SP-GiST. Bug exists since initial commit of box opclass for SP-GiST, so backpath to 9.6 Author: Nikita Glukhov with minor editorization of tests by me Reviewed-by: Kyotaro Horiguchi, Anastasia Lubennikova https://commitfest.postgresql.org/13/981/
* Add a direct function call mechanism using the caller's context.Andrew Dunstan2017-03-21
| | | | | | | | | | | | | | | | The current DirectFunctionCall functions use NULL as the flinfo in initializing the FunctionCallInfoData for the call. That means the called function has no fn_mcxt or fn_extra to work with, and attempting to do so will result in an access violation. These functions instead use the provided flinfo, which will usually be the caller's own flinfo. The caller needs to ensure that it doesn't use the fn_extra in way that is incompatible with the way the called function will use it. The called function should not rely on anything else in the provided context, as it will be relevant to the caller, not the callee. Original code from Tom Lane. Discussion: https://postgr.es/m/db2b70a4-78d7-294a-a315-8e7f506c5978@2ndQuadrant.com
* doc: Improve markupPeter Eisentraut2017-03-21
|
* doc: clarify that function "ownership" that controls permissionBruce Momjian2017-03-20
| | | | | | It used to say the creation user. Reported-by: Nathan Wagner
* doc: adjust 'Infinity' example to include minusBruce Momjian2017-03-20
| | | | | | | This clarifies that quoted infinity values must have the negative signs inside single quotes. Reported-by: Don Morrison
* Add missing support for new node fieldsAndrew Dunstan2017-03-20
| | | | | | | Commit b6fb534f added two new node fields but neglected to add copy and comparison support for them, Mea culpa, should have checked for that. per buildfarm animals with -DCOPY_PARSE_PLAN_TREES
* doc: improve createdb exampleBruce Momjian2017-03-20
| | | | | | | The previous example could error out due to encoding mismatches; use -T/template instead. Reported-by: Jason O'Donnell
* Force the regression databases to have bytea_output set to hexAndrew Dunstan2017-03-20
| | | | | | | | | | Even if the installation defaults to escape output, this makes pg_regress make the setting hex, so that installcheck tests can pass in such a setting. Jeff Janes. Discussion: http://postgr.es/m/CAMkU=1xivkTNeyCfzhwdHJ+VH5qpU+4gsipRNuEUbyQf+KN3Kw@mail.gmail.com
* Add IF NOT EXISTS for CREATE SERVER and CREATE USER MAPPINGAndrew Dunstan2017-03-20
| | | | | | | | | | | | | There is still some inconsistency with the error messages surrounding foreign servers. Some use the word "foreign" and some don't. My inclination is to remove all such uses of "foreign" on the basis that the CREATE/ALTER/DROP SERVER commands don't use the word. However, that is left for another day. In this patch I have kept to the existing usage in the affected commands, which omits "foreign". Anastasia Lubennikova, reviewed by Arthur Zakirov and Ashtosh Bapat. Discussion: http://postgr.es/m/7c2ab9b8-388a-1ce0-23a3-7acf2a0ed3c6@postgrespro.ru
* Use a consistent error message style for user mappings.Andrew Dunstan2017-03-20
| | | | | | | | | | | | User mappings are essentially anonymous, so messages referring to "user mapping foo on server bar" are wrong, and inconsistent with other error messages referring to user mappings. To be consistent with existing use, use "user mapping for foo on server bar" instead. I dropped the noise word "user" from the original suggestion to be consistent with other uses. Discussion: http://postgr.es/m/56c6f8ab-b2d6-f1fa-deb0-1d18cf67f7b9@2ndQuadrant.com
* Another fix for single-page hash index vacuum.Robert Haas2017-03-20
| | | | | | | | | The WAL consistency checking code needed to be updated for the new page status bit, but that didn't get done previously. Ashutosh Sharma, reviewed by Amit Kapila Discussion: http://postgr.es/m/CAA4eK1LP_oz4EfMen14OjJuzN5CqPdfRkFFuA-MfkcfeE8zGyg@mail.gmail.com
* Fixes for single-page hash index vacuum.Robert Haas2017-03-20
| | | | | | | | | | | | | | Clear LH_PAGE_HAS_DEAD_TUPLES during replay, similar to what gets done for btree. Update hashdesc.c for xl_hash_vacuum_one_page. Oversights in commit 6977b8b7f4dfb40896ff5e2175cad7fdbda862eb spotted by Amit Kapila. Patch by Ashutosh Sharma. Bump WAL version. The original patch to make hash indexes write-ahead logged probably should have done this, and the single page vacuuming patch probably should have done it again, but better late than never. Discussion: http://postgr.es/m/CAA4eK1Kd=mJ9xreovcsh0qMiAj-QqCphHVQ_Lfau1DR9oVjASQ@mail.gmail.com
* Add configure test to see if the C compiler has gcc-style computed gotos.Tom Lane2017-03-20
| | | | | | | | | We'll need this for the upcoming patch to speed up expression evaluation. Might as well push it now to see if it behaves sanely in the buildfarm. Andres Freund Discussion: https://postgr.es/m/20170320062511.hp5qeurtxrwsvfxr@alap3.anarazel.de
* Add .gitignore for src/test/authentication/tmp_check.Heikki Linnakangas2017-03-20
| | | | | | Michael Paquier Discussion: https://www.postgresql.org/message-id/CAB7nPqRZ_LNTCJ7gGjE_SpRanGoALfTgsxdauNsKq%2BLBRH9fxg%40mail.gmail.com
* Add missed "make clean" logic in src/interfaces/libpq/Makefile.Tom Lane2017-03-20
| | | | | | | Commit 818fd4a67 missed cleaning up the symlinks it added for various .c files imported from src/port and src/common. Neatnik-ishly make the file lists in the "clean" target look exactly like the earlier lists of what to symlink in.
* Improve regression test coverage for TID scanning.Tom Lane2017-03-20
| | | | | | | | | | TidScan plan nodes were not systematically tested before. These additions raise the LOC coverage number for the basic regression tests from 52% to 92% in nodeTidscan.c, and from 60% to 93% in tidpath.c. Andres Freund, tweaked a bit by me Discussion: https://postgr.es/m/20170320062511.hp5qeurtxrwsvfxr@alap3.anarazel.de
* Revert unintentional change in increasing usage count during pin of buffers,Teodor Sigaev2017-03-20
| | | | | | | | | | | | this makes buffer access strategy have no effect. Change was a part of commit 48354581a49c30f5757c203415aa8412d85b0f70 during 9.6 release cycle, so backpath to 9.6 Reported-by: Jim Nasby Author: Alexander Korotkov Reviewed-by: Jim Nasby, Andres Freund https://commitfest.postgresql.org/13/1029/
* pg_dump: Skip COLLATION-related regression testsStephen Frost2017-03-19
| | | | | | Not every platform supports non-default collations, as pointed out by the buildfarm, so skip collation-related regression tests in pg_dump when they aren't supported.
* Update obsolete commentMagnus Hagander2017-03-19
| | | | | Commit ff27db5d changed this function to no longer return the start position, but forgot the comment.
* doc: Fix a few typos and awkward linksPeter Eisentraut2017-03-18
|
* Avoid use of already-closed relcache entry.Tom Lane2017-03-18
| | | | Oversight in commit 17f8ffa1e. Per buildfarm member prion.
* Fix REFRESH MATERIALIZED VIEW to report activity to the stats collector.Tom Lane2017-03-18
| | | | | | | | | | | | | | | | | | | | | | | The non-concurrent code path for REFRESH MATERIALIZED VIEW failed to report its updates to the stats collector. This is bad since it means auto-analyze doesn't know there's any work to be done. Adjust it to report the refresh as a table truncate followed by insertion of an appropriate number of rows. Since a matview could contain more than INT_MAX rows, change the signature of pgstat_count_heap_insert() to accept an int64 rowcount. (The accumulator it's adding into is already int64, but existing callers could not insert more than a small number of rows at once, so the argument had been declared just "int n".) This is surely a bug fix, but changing pgstat_count_heap_insert()'s API seems too risky for the back branches. Given the lack of previous complaints, I'm not sure it's a big enough problem to justify a kluge solution that would avoid that. So, no back-patch, at least for now. Jim Mlodgenski, adjusted a bit by me Discussion: https://postgr.es/m/CAB_5SRchSz7-WmdO5szdiknG8Oj_GGqJytrk1KRd11yhcMs1KQ@mail.gmail.com
* doc: Improve wordingPeter Eisentraut2017-03-18
| | | | | Link to CREATE and ALTER ROLE consistently, instead of mixing CREATE USER and ALTER ROLE.
* doc: Add markupPeter Eisentraut2017-03-18
|
* doc: Update compatibility claimPeter Eisentraut2017-03-18
| | | | | | Update outdated claim that TRUNCATE is a PostgreSQL extension. Add cross-links between DELETE and TRUNCATE references pages.
* doc: Tweak reference page header stylePeter Eisentraut2017-03-18
| | | | | | Change the header style of references pages in HTML and PDF output to be more like the old style under DSSSL. In particular, the page should start with a header containing the command name, instead of just "Name".