summaryrefslogtreecommitdiff
path: root/doc/src
AgeCommit message (Collapse)Author
2017-07-02doc: Document that logical replication supports synchronous replicationPeter Eisentraut
Update the documentation a bit to include that logical replication as well as other and third-party replication clients can participate in synchronous replication.
2017-06-28Fix transition tables for partition/inheritance.Andrew Gierth
We disallow row-level triggers with transition tables on child tables. Transition tables for triggers on the parent table contain only those columns present in the parent. (We can't mix tuple formats in a single transition table.) Patch by Thomas Munro Discussion: https://postgr.es/m/CA%2BTgmoZzTBBAsEUh4MazAN7ga%3D8SsMC-Knp-6cetts9yNZUCcg%40mail.gmail.com
2017-06-28Second try at fixing tcp_keepalives_idle option on Solaris.Tom Lane
Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it with "&& defined(__darwin__)", since it's unclear that anyone else would follow Apple's precedent of spelling the symbol that way. Also, follow a suggestion from Michael Paquier of eliminating code duplication by defining a couple of intermediate symbols for the socket option. In passing, make some effort to reduce the number of translatable messages by replacing "setsockopt(foo) failed" with "setsockopt(%s) failed", etc, throughout the affected files. And update relevant documentation so that it doesn't claim to provide an exhaustive list of the possible socket option names. Like the previous commit (f0256c774), back-patch to all supported branches. Discussion: https://postgr.es/m/[email protected]
2017-06-28Merge remote-tracking branch 'remotes/origin/master' into xl10develPavan Deolasee
This merges the current master branch of XL with the XL 10 development branch. Commits upto f72330316ea5796a2b11a05710b98eba4e706788 are included in this merge.
2017-06-27Merge PG10 master branch into xl10develPavan Deolasee
This commit merges PG10 branch upto commit 2710ccd782d0308a3fa1ab193531183148e9b626. Regression tests show no noteworthy additional failures. This merge includes major pgindent work done with the newer version of pgindent
2017-06-26Consistently use () for function calls in release notesMagnus Hagander
2017-06-25Doc: minor improvements for collation-related man pages.Tom Lane
2017-06-24Further hacking on ICU collation creation and usage.Tom Lane
pg_import_system_collations() refused to create any ICU collations if the current database's encoding didn't support ICU. This is wrongheaded: initdb must initialize pg_collation in an encoding-independent way since it might be used in other databases with different encodings. The reason for the restriction seems to be that get_icu_locale_comment() used icu_from_uchar() to convert the UChar-format display name, and that unsurprisingly doesn't know what to do in unsupported encodings. But by the same token that the initial catalog contents must be encoding-independent, we can't allow non-ASCII characters in the comment strings. So we don't really need icu_from_uchar() here: just check for Unicode codes outside the ASCII range, and if there are none, the format conversion is trivial. If there are some, we can simply not install the comment. (In my testing, this affects only Norwegian BokmÃ¥l, which has given us trouble before.) For paranoia's sake, also check for non-ASCII characters in ICU locale names, and skip such locales, as we do for libc locales. I don't currently have a reason to believe that this will ever reject anything, but then again the libc maintainers should have known better too. With just the import changes, ICU collations can be found in pg_collation in databases with unsupported encodings. This resulted in more or less clean failures at runtime, but that's not how things act for unsupported encodings with libc collations. Make it work the same as our traditional behavior for libc collations by having collation lookup take into account whether is_encoding_supported_by_icu(). Adjust documentation to match. Also, expand Table 23.1 to show which encodings are supported by ICU. catversion bump because of likely change in pg_collation/pg_description initial contents in ICU-enabled builds. Discussion: https://postgr.es/m/[email protected]
2017-06-23Fix replication with replica identity fullPeter Eisentraut
The comparison with the target rows on the subscriber side was done with datumIsEqual(), which can have false negatives. For instance, it didn't work reliably for text columns. So use the equality operator provided by the type cache instead. Also add more user documentation about replica identity requirements. Reported-by: Tatsuo Ishii <[email protected]>
2017-06-23Rethink behavior of pg_import_system_collations().Tom Lane
Marco Atzeri reported that initdb would fail if "locale -a" reported the same locale name more than once. All previous versions of Postgres implicitly de-duplicated the results of "locale -a", but the rewrite to move the collation import logic into C had lost that property. It had also lost the property that locale names matching built-in collation names were silently ignored. The simplest way to fix this is to make initdb run the function in if-not-exists mode, which means that there's no real use-case for non if-not-exists mode; we might as well just drop the boolean argument and simplify the function's definition to be "add any collations not already known". This change also gets rid of some odd corner cases caused by the fact that aliases were added in if-not-exists mode even if the function argument said otherwise. While at it, adjust the behavior so that pg_import_system_collations() doesn't spew "collation foo already exists, skipping" messages during a re-run; that's completely unhelpful, especially since there are often hundreds of them. And make it return a count of the number of collations it did add, which seems like it might be helpful. Also, re-integrate the previous coding's property that it would make a deterministic selection of which alias to use if there were conflicting possibilities. This would only come into play if "locale -a" reports multiple equivalent locale names, say "de_DE.utf8" and "de_DE.UTF-8", but that hardly seems out of the question. In passing, fix incorrect behavior in pg_import_system_collations()'s ICU code path: it neglected CommandCounterIncrement, which would result in failures if ICU returns duplicate names, and it would try to create comments even if a new collation hadn't been created. Also, reorder operations in initdb so that the 'ucs_basic' collation is created before calling pg_import_system_collations() not after. This prevents a failure if "locale -a" were to report a locale named that. There's no reason to think that that ever happens in the wild, but the old coding would have survived it, so let's be equally robust. Discussion: https://postgr.es/m/[email protected]
2017-06-23Minor corrections to high availability docsSimon Riggs
Startup process is displayed in pg_stat_activity, noted by Yugo Nagata. Transactions can be resolved at end of recovery. Author: Yugo Nagata, with addition by me
2017-06-20Upgrade documentation connected with shared_preload_libraries et al.Tom Lane
Noplace in the documentation actually defined what these variables contain. Define them as lists of arguments for LOAD, and improve that command's documentation a bit. Discussion: https://postgr.es/m/CAB-oJtxHVDc3H+Km3CjB9mY1VDzuyaVH_ZYSz7iXcRqCtb93Ew@mail.gmail.com
2017-06-19Fix materialized-view documentation oversights.Tom Lane
When materialized views were added, psql's \d commands were made to treat them as a separate object category ... but not everyplace in the documentation or comments got the memo. Noted by David Johnston. Back-patch to 9.3 where matviews came in. Discussion: https://postgr.es/m/CAKFQuwb27M3VXRhHErjCpkWwN9eKThbqWb1=trtoXi9_ejqPXQ@mail.gmail.com
2017-06-19doc: Improve logical replication security setup infoPeter Eisentraut
Reported-by: Jeff Janes <[email protected]>
2017-06-19Improve PostgreSQL 10.0 release note regarding pg_current_logfile().Tatsuo Ishii
Author: Yugo Nagata
2017-06-18Documentation spell checking and markup improvementsPeter Eisentraut
2017-06-18Fix copy/paste error in docsMagnus Hagander
Author: Julien Rouhaud <[email protected]>
2017-06-17doc: Fix typoPeter Eisentraut
Author: Julien Rouhaud <[email protected]>
2017-06-17doc: Fix typoPeter Eisentraut
Author: Julien Rouhaud <[email protected]>
2017-06-17doc: Add note that COPY commands are published as INSERTsPeter Eisentraut
2017-06-16doc: Add section about logical replication restrictionsPeter Eisentraut
2017-06-15doc: remove mention of Windows junction points by pg_upgradeBruce Momjian
pg_upgrade never used Windows junction points but instead always used Windows hard links. Reported-by: Adrian Klaver Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.3, where the mention first appeared
2017-06-15docs: Fix pg_upgrade standby server upgrade docsBruce Momjian
It was unsafe to instruct users to start/stop the server after pg_upgrade was run but before the standby servers were rsync'ed. The new instructions avoid this. RELEASE NOTES: This fix should be mentioned in the minor release notes. Reported-by: Dmitriy Sarafannikov and Sergey Burladyan Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5, where standby server upgrade instructions first appeared
2017-06-15Merge 'remotes/PGSQL/master' into xl10develPavan Deolasee
Merge upstream master branch upto e800656d9a9b40b2f55afabe76354ab6d93353b3. Code compiles and regression works ok (with lots and lots of failures though).
2017-06-15Fix typo in PostgreSQL 10.0 release note.Tatsuo Ishii
Patch by Yugo Nagata.
2017-06-15Fix document bug regarding read only transactions.Tatsuo Ishii
It was explained that read only transactions (not in standby) allow to update sequences. This had been wrong since the commit: 05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7 Discussion: https://www.postgresql.org/message-id/20170614.110826.425627939780392324.t-ishii%40sraoss.co.jp
2017-06-14Don't force-assign transaction id when exporting a snapshot.Andres Freund
Previously we required every exported transaction to have an xid assigned. That was used to check that the exporting transaction is still running, which in turn is needed to guarantee that that necessary rows haven't been removed in between exporting and importing the snapshot. The exported xid caused unnecessary problems with logical decoding, because slot creation has to wait for all concurrent xid to finish, which in turn serializes concurrent slot creation. It also prohibited snapshots to be exported on hot-standby replicas. Instead export the virtual transactionid, which avoids the unnecessary serialization and the inability to export snapshots on standbys. This changes the file name of the exported snapshot, but since we never documented what that one means, that seems ok. Author: Petr Jelinek, slightly editorialized by me Reviewed-By: Andres Freund Discussion: https://postgr.es/m/[email protected]
2017-06-14doc: Whitespace fixes in man pagesPeter Eisentraut
2017-06-14Improve release note text about set-returning-function changes.Tom Lane
Paul Ramsey griped about this awhile ago, but I'd been holding fire on changing it until we settled what to do about the CASE/COALESCE issue. Discussion: https://postgr.es/m/CACowWR0AMyUt5fwtvuDqWyYNdp-hQJj9XqSxJR6YM9sKWov=_w@mail.gmail.com
2017-06-14Put documentation of options and commands in more alphabetical orderPeter Eisentraut
2017-06-14Merge from PG master upto d5cb3bab564e0927ffac7c8729eacf181a12dd40Pavan Deolasee
This is the result of the "git merge remotes/PGSQL/master" upto the said commit point. We have done some basic analysis, fixed compilation problems etc, but bulk of the logical problems in conflict resolution etc will be handled by subsequent commits.
2017-06-14Disallow set-returning functions inside CASE or COALESCE.Tom Lane
When we reimplemented SRFs in commit 69f4b9c85, our initial choice was to allow the behavior to vary from historical practice in cases where a SRF call appeared within a conditional-execution construct (currently, only CASE or COALESCE). But that was controversial to begin with, and subsequent discussion has resulted in a consensus that it's better to throw an error instead of executing the query differently from before, so long as we can provide a reasonably clear error message and a way to rewrite the query. Hence, add a parser mechanism to allow detection of such cases during parse analysis. The mechanism just requires storing, in the ParseState, a pointer to the set-returning FuncExpr or OpExpr most recently emitted by parse analysis. Then the parsing functions for CASE and COALESCE can detect the presence of a SRF in their arguments by noting whether this pointer changes while analyzing their arguments. Furthermore, if it does, it provides a suitable error cursor location for the complaint. (This means that if there's more than one SRF in the arguments, the error will point at the last one to be analyzed not the first. While connoisseurs of parsing behavior might find that odd, it's unlikely the average user would ever notice.) While at it, we can also provide more specific error messages than before about some pre-existing restrictions, such as no-SRFs-within-aggregates. Also, reject at parse time cases where a NULLIF or IS DISTINCT FROM construct would need to return a set. We've never supported that, but the restriction is depended on in more subtle ways now, so it seems wise to detect it at the start. Also, provide some documentation about how to rewrite a SRF-within-CASE query using a custom wrapper SRF. It turns out that the information_schema.user_mapping_options view contained an instance of exactly the behavior we're now forbidding; but rewriting it makes it more clear and safer too. initdb forced because of user_mapping_options change. Patch by me, with error message suggestions from Alvaro Herrera and Andres Freund, pursuant to a complaint from Regina Obe. Discussion: https://postgr.es/m/[email protected]
2017-06-13doc: Update example version numbers in pg_upgrade documentationPeter Eisentraut
The exact numbers don't matter, since they are examples, but it was looking quite dated. For the target version, we now automatically substitute the current major version. The updated example source version should be good for a couple of years.
2017-06-13doc: Fix typoPeter Eisentraut
Author: Julien Rouhaud <[email protected]>
2017-06-13doc: Update external PL listPeter Eisentraut
Add PL/Lua, PL/v8. Remove stale/unmaintained PL/PHP, PL/Py, PL/Ruby, PL/Scheme. Reported-by: Adam Sah <[email protected]>
2017-06-12doc: Update information_schema documentation for identity columnsPeter Eisentraut
This was apparently forgotten in the original patch.
2017-06-12Trim trailing whitespacePeter Eisentraut
2017-06-12Fix ALTER TABLE doc examples.Tatsuo Ishii
Patch by Yugo Nagata <[email protected]>. Confirmed by Amit Langote, who is the original author of the document part.
2017-06-10Remove bogus http:// from a program listing in docsTomas Vondra
2017-06-10doc: Add Node.js and Go drivers to client interfacesPeter Eisentraut
Also, fix client interface JDBC language name to Java. Author: Sehrope Sarkuni <[email protected]>
2017-06-09doc: Improve types in examplePeter Eisentraut
Reported-by: Nikolaus Thiel <[email protected]>
2017-06-09doc: Document that subscriptions to same server might hangPeter Eisentraut
2017-06-08Update key words table for version 10Peter Eisentraut
2017-06-08Put new command-line options in alphabetical orderPeter Eisentraut
2017-06-07Docs: improve CREATE TABLE ref page's discussion of partition bounds.Tom Lane
Clarify in the syntax synopsis that partition bound values must be exactly numeric literals or string literals; previously it said "bound_literal" which was defined nowhere. Replace confusing --- and, I think, incorrect in detail --- definition of how range bounds work with a reference to row-wise comparison plus a concrete example (which I stole from Robert Haas). Minor copy-editing in the same area. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
2017-06-06Fix some cases of "the the" split across two lines.Robert Haas
Kevin Grittner observed that 2186b608b3cb859fe0ec04015a5c4e4cbf69caed introduced a new occurence of this by copying existing text, and I found a few more cases using grep. Discussion: http://postgr.es/m/CADAecHWfG-K+YvocHCkrXV-ycm+eUOaaUVfYZNOnwf0pSmuQCw@mail.gmail.com
2017-06-06Clean up partcollation handling for OID 0.Robert Haas
Consistent with what we do for indexes, we shouldn't try to record dependencies on collation OID 0 or the default collation OID (which is pinned). Also, the fact that indcollation and partcollation can contain zero OIDs when the data type is not collatable should be documented. Amit Langote, per a complaint from me. Discussion: http://postgr.es/m/CA+Tgmoba5mtPgM3NKfG06vv8na5gGbVOj0h4zvivXQwLw8wXXQ@mail.gmail.com
2017-06-06Fix docs to not claim ECPG's SET CONNECTION is not thread-aware.Michael Meskes
Changed by: Tsunakawa, Takayuki <[email protected]>
2017-06-06Prevent possibility of panics during shutdown checkpoint.Andres Freund
When the checkpointer writes the shutdown checkpoint, it checks afterwards whether any WAL has been written since it started and throws a PANIC if so. At that point, only walsenders are still active, so one might think this could not happen, but walsenders can also generate WAL, for instance in BASE_BACKUP and logical decoding related commands (e.g. via hint bits). So they can trigger this panic if such a command is run while the shutdown checkpoint is being written. To fix this, divide the walsender shutdown into two phases. First, checkpointer, itself triggered by postmaster, sends a PROCSIG_WALSND_INIT_STOPPING signal to all walsenders. If the backend is idle or runs an SQL query this causes the backend to shutdown, if logical replication is in progress all existing WAL records are processed followed by a shutdown. Otherwise this causes the walsender to switch to the "stopping" state. In this state, the walsender will reject any further replication commands. The checkpointer begins the shutdown checkpoint once all walsenders are confirmed as stopping. When the shutdown checkpoint finishes, the postmaster sends us SIGUSR2. This instructs walsender to send any outstanding WAL, including the shutdown checkpoint record, wait for it to be replicated to the standby, and then exit. Author: Andres Freund, based on an earlier patch by Michael Paquier Reported-By: Fujii Masao, Andres Freund Reviewed-By: Michael Paquier Discussion: https://postgr.es/m/[email protected] Backpatch: 9.4, where logical decoding was introduced
2017-06-06Revert "Prevent panic during shutdown checkpoint"Andres Freund
This reverts commit 086221cf6b1727c2baed4703c582f657b7c5350e, which was made to master only. The approach implemented in the above commit has some issues. While those could easily be fixed incrementally, doing so would make backpatching considerably harder, so instead first revert this patch. Discussion: https://postgr.es/m/[email protected]