Commit Graph

13234 Commits

Author SHA1 Message Date
Tom Lane 54dbd4dc78 First-draft release notes for 9.6.3.
As usual, the release notes for other branches will be made by cutting
these down, but put them up for community review first.  Note there
are some entries that really only apply to pre-9.6 branches.
2017-05-05 19:33:34 -04:00
Peter Eisentraut 086221cf6b Prevent panic during shutdown checkpoint
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 certain variants of
CREATE_REPLICATION_SLOT.  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, the
postmaster sends a SIGUSR2 signal to all walsenders.  The walsenders
then put themselves into the "stopping" state.  In this state, they
reject any new commands.  (For simplicity, we reject all new commands,
so that in the future we do not have to track meticulously which
commands might generate WAL.)  The checkpointer waits for all walsenders
to reach this state before proceeding with the shutdown checkpoint.
After the shutdown checkpoint is done, the postmaster sends
SIGINT (previously unused) to the walsenders.  This triggers the
existing shutdown behavior of sending out the shutdown checkpoint record
and then terminating.

Author: Michael Paquier <michael.paquier@gmail.com>
Reported-by: Fujii Masao <masao.fujii@gmail.com>
2017-05-05 10:31:42 -04:00
Bruce Momjian 5469e44ffc doc: update PG 10 release notes
Mention vacuum verbose includes oldest xmin, BRIN index usage
estimation, and multi-column statistics.

Reported-by: Masahiko Sawada, Alvaro Herrera
2017-05-04 20:33:06 -04:00
Bruce Momjian 4f45beba7a doc: PG 10 release note updates for psql, GiST, and markup
Reported-by: Andrew Borodin, Fabien COELHO, Dagfinn Ilmari Mannsaker
2017-05-04 19:33:41 -04:00
Alvaro Herrera c22b59edd2 Credit Claudio as main author of feature 2017-05-04 17:50:54 -03:00
Heikki Linnakangas 20bf7b2b0a Fix PQencryptPasswordConn to work with older server versions.
password_encryption was a boolean before version 10, so cope with "on" and
"off".

Also, change the behavior with "plain", to treat it the same as "md5".
We're discussing removing the password_encryption='plain' option from the
server altogether, which will make this the only reasonable choice, but
even if we kept it, it seems best to never send the password in cleartext.
2017-05-04 12:28:25 +03:00
Heikki Linnakangas 8f8b9be51f Add PQencryptPasswordConn function to libpq, use it in psql and createuser.
The new function supports creating SCRAM verifiers, in addition to md5
hashes. The algorithm is chosen based on password_encryption, by default.

This fixes the issue reported by Jeff Janes, that there was previously
no way to create a SCRAM verifier with "\password".

Michael Paquier and me

Discussion: https://www.postgresql.org/message-id/CAMkU%3D1wfBgFPbfAMYZQE78p%3DVhZX7nN86aWkp0QcCp%3D%2BKxZ%3Dbg%40mail.gmail.com
2017-05-03 11:19:07 +03:00
Alvaro Herrera 93bbeec6a2 extstats: change output functions to emit valid JSON
Manipulating extended statistics is more convenient as JSON than the
current ad-hoc format, so let's change before it's too late.

Discussion: https://postgr.es/m/20170420193828.k3fliiock5hdnehn@alvherre.pgsql
2017-05-02 18:49:32 -03:00
Peter Eisentraut e950024066 doc: Improve order in ALTER PUBLICATION/SUBSCRIPTION ref pages
Move the OWNER and RENAME clauses to the end, so the interesting
functionality is listed first.  This is more typical on nearby reference
pages, whereas the previous order was the order in which the clauses
were added.
2017-05-02 15:31:25 -04:00
Peter Eisentraut 460c89f46c doc: Add missing markup 2017-05-02 14:33:19 -04:00
Peter Eisentraut a35ac7c4e3 doc: Update ALTER SEQUENCE claims about changes being nontransactional
Clarify that all changes except RESTART are transactional (since
1753b1b027).

Reported-by: Michael Paquier <michael.paquier@gmail.com>
2017-05-02 10:34:49 -04:00
Magnus Hagander 34fc616738 Change hot_standby default value to 'on'
This goes together with the changes made to enable replication on the
sending side by default (wal_level, max_wal_senders etc) by making the
receiving stadby node also enable it by default.

Huong Dangminh
2017-05-02 11:12:30 +02:00
Robert Haas e180c8aa8c Fire per-statement triggers on partitioned tables.
Even though no actual tuples are ever inserted into a partitioned
table (the actual tuples are in the partitions, not the partitioned
table itself), we still need to have a ResultRelInfo for the
partitioned table, or per-statement triggers won't get fired.

Amit Langote, per a report from Rajkumar Raghuwanshi.  Reviewed by me.

Discussion: http://postgr.es/m/CAKcux6%3DwYospCRY2J4XEFuVy0L41S%3Dfic7rmkbsU-GXhhSbmBg%40mail.gmail.com
2017-05-01 08:23:01 -04:00
Peter Eisentraut bc920bee29 doc: Fix typo in 9.6 release notes
Author: Huong Dangminh <huo-dangminh@ys.jp.nec.com>
2017-04-28 15:32:33 -04:00
Stephen Frost b9a3ef55b2 Remove unnecessairly duplicated gram.y productions
Declarative partitioning duplicated the TypedTableElement productions,
evidently to remove the need to specify WITH OPTIONS when creating
partitions.  Instead, simply make WITH OPTIONS optional in the
TypedTableElement production and remove all of the duplicate
PartitionElement-related productions.  This change simplifies the
syntax and makes WITH OPTIONS optional when adding defaults, constraints
or storage parameters to columns when creating either typed tables or
partitions.

Also update pg_dump to no longer include WITH OPTIONS, since it's not
necessary, and update the documentation to reflect that WITH OPTIONS is
now optional.
2017-04-27 20:14:39 -04:00
Bruce Momjian a311d2a04f doc: PG10 release note typo fix
Reported-by: daniel.westermann
2017-04-27 10:21:44 -04:00
Bruce Momjian f8ab08ad0e doc PG10rel: adjust hash index commits and add parallel subquery
Reported-by: Amit Kapila
2017-04-27 10:17:16 -04:00
Bruce Momjian fda4fec578 doc PG10: add commit for transition table item 2017-04-26 15:50:59 -04:00
Peter Eisentraut e315346d83 doc: ALTER SUBSCRIPTION documentation fixes
WITH is optional for REFRESH PUBLICATION.  Also, remove a spurious
bracket and fix a punctuation.

Author: Euler Taveira <euler@timbira.com.br>
2017-04-26 12:07:22 -04:00
Bruce Momjian 309191f66a doc PG10: add Rafia Sabih to parallel index scan item
Reported-by: Amit Kapila
2017-04-26 06:33:25 -04:00
Stephen Frost 9139aa1942 Allow ALTER TABLE ONLY on partitioned tables
There is no need to forbid ALTER TABLE ONLY on partitioned tables,
when no partitions exist yet.  This can be handy for users who are
building up their partitioned table independently and will create actual
partitions later.

In addition, this is how pg_dump likes to operate in certain instances.

Author: Amit Langote, with some error message word-smithing by me
2017-04-25 16:57:43 -04:00
Bruce Momjian 5f2b48d1dd doc PG10: update EXPLAIN SUMMARY item
Reported-by: Tels
2017-04-25 15:30:53 -04:00
Bruce Momjian ef0ba572b6 doc: update PG 10 item about referencing many relations
Reported-by: Tom Lane
2017-04-25 13:47:51 -04:00
Bruce Momjian 3d7741194a doc: add PG 10 doc item about VACUUM truncation, 7e26e02ee
Reported-by: Andres Freund
2017-04-25 13:45:47 -04:00
Bruce Momjian 3640cf5e1c doc PG10: add commit 090010f2e and adjust EXPLAIN SUMMARY item
Reported-by: Tels, Andres Freund
2017-04-25 13:29:26 -04:00
Bruce Momjian bf368fbee2 doc: properly indent SGML tags in PG 10 release notes 2017-04-25 12:54:45 -04:00
Bruce Momjian cdd5bcad5e doc: PG 10 release notes updates
Reported-by: Michael Paquier, Felix Gerzaguet
2017-04-25 11:17:14 -04:00
Bruce Momjian 64f0f7cfc7 doc: PG 10 release note updates
Reported-by: David Rowley, Amit Langote, Ashutosh Bapat
2017-04-25 11:04:43 -04:00
Bruce Momjian 45e3d8ae2b doc: move hash info to new section and split out growth item
Reported-by: Amit Kapila
2017-04-25 09:44:50 -04:00
Bruce Momjian cef5dbbf2b doc: move hash performance item into index section
The requirement to rebuild pg_upgrade-ed hash indexes was kept in the
incompatibilities section.

Reported-by: Amit Kapila
2017-04-24 23:29:14 -04:00
Bruce Momjian b007b1af20 doc: add Rafia Sabih to PG 10 release note item
Reported-by: Amit Kapila
2017-04-24 23:08:25 -04:00
Bruce Momjian d103e6718b doc: fix PG 10 release note doc markup 2017-04-24 22:53:16 -04:00
Bruce Momjian 419a055454 doc: merge PG 10 release SysV item
Reported-by: Takayuki Tsunakawa
2017-04-24 22:51:28 -04:00
Bruce Momjian 6e033c6a96 doc: PG 10 fixes
Reported-by: Takayuki Tsunakawa
2017-04-24 22:48:25 -04:00
Bruce Momjian bba375eb9d doc: several minor PG 10 doc adjustments 2017-04-24 22:45:06 -04:00
Bruce Momjian a0d932b39d doc: fix attribution of sequence item, order incompatibilities
Reported-by: Andreas Karlsson
2017-04-24 21:53:37 -04:00
Bruce Momjian 1d8573ed55 doc: first draft of Postgres 10 release notes 2017-04-24 21:26:33 -04:00
Bruce Momjian 66fade8a04 doc: update release doc markup instructions 2017-04-24 19:04:28 -04:00
Peter Eisentraut f58b664393 doc: Update link
The reference "That is the topic of the next section." has been
incorrect since the materialized views documentation got inserted
between the section "rules-views" and "rules-update".

Author: Zertrin <postgres_wiki@zertrin.org>
2017-04-21 19:42:01 -04:00
Heikki Linnakangas 68e61ee72e Change the on-disk format of SCRAM verifiers to conform to RFC 5803.
It doesn't make any immediate difference to PostgreSQL, but might as well
follow the standard, since one exists. (I looked at RFC 5803 earlier, but
didn't fully understand it back then.)

The new format uses Base64 instead of hex to encode StoredKey and
ServerKey, which makes the verifiers slightly smaller. Using the same
encoding for the salt and the keys also means that you only need one
encoder/decoder instead of two. Although we have code in the backend to
do both, we are talking about teaching libpq how to create SCRAM verifiers
for PQencodePassword(), and libpq doesn't currently have any code for hex
encoding.

Bump catversion, because this renders any existing SCRAM verifiers in
pg_authid invalid.

Discussion: https://www.postgresql.org/message-id/351ba574-85ea-d9b8-9689-8c928dd0955d@iki.fi
2017-04-21 22:51:57 +03:00
Peter Eisentraut c29a752c68 doc: Fix typo 2017-04-21 15:33:25 -04:00
Alvaro Herrera 919f6d746e Improve multivariate statistics documentation
Extended statistics commit 7b504eb282 did not include appropriate
documentation next to where we document regular planner statistics (I
ripped what was submitted before commit and then forgot to put it back),
and while later commit 2686ee1b7c added some material, it structurally
depended on what I had ripped out, so the end result wasn't proper.

Fix those problems by shuffling what was added by 2686ee1b7c and
including some additional material, so that now chapter 14 "Performance
Tips" now describes the types of multivariate statistics we currently
have, and chapter 68 "How the Planner Uses Statistics" shows some
examples.  The new text should be more in line with previous material,
in (hopefully) the appropriate depth.

While at it, fix a small bug in pg_statistic_ext docs: one column was
listed in the wrong spot.
2017-04-20 15:43:33 -03:00
Tom Lane 8bcb31ad5a Sync pg_ctl documentation and usage message with reality.
Commit 05cd12ed5 ("pg_ctl: Change default to wait for all actions")
was a tad sloppy about updating the documentation to match.  The
documentation was also sorely in need of a copy-editing pass, having
been adjusted at different times by different people who took little
care to maintain consistency of style.
2017-04-20 14:41:55 -04:00
Peter Eisentraut 594b526bcf Modify message when partitioned table is added to publication
Give a more specific error message than "xyz is not a table".

Also document in CREATE PUBLICATION which kinds of relations are not
supported.

based on patch by Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
2017-04-20 14:18:33 -04:00
Heikki Linnakangas e68432a0e1 Fix typo in docs on SASL authentication.
Word "sends" was missing.

Jaime Casanova
2017-04-19 21:43:16 +03:00
Tom Lane 539f67012e Doc: improve markup in self-signed certificate example. 2017-04-18 14:21:57 -04:00
Fujii Masao a790ed9f69 Improve documentation and comment for quorum-based sync replication.
Author: Masahiko Sawada, heavily modified by me
Discussion: http://postgr.es/m/CAHGQGwEKOw=SmPLxJzkBsH6wwDBgOnVz46QjHbtsiZ-d-2RGUg@mail.gmail.com
2017-04-19 02:58:28 +09:00
Andrew Dunstan 2b67c9d207 Simplify docs on creating a self-signed SSL certificate
Discussion: <https://postgr.es/m/72335afb-969b-af84-3fcb-1739e3ed09a6@2ndQuadrant.com>
2017-04-18 08:50:15 -04:00
Heikki Linnakangas c727f120ff Rename "scram" to "scram-sha-256" in pg_hba.conf and password_encryption.
Per discussion, plain "scram" is confusing because we actually implement
SCRAM-SHA-256 rather than the original SCRAM that uses SHA-1 as the hash
algorithm. If we add support for SCRAM-SHA-512 or some other mechanism in
the SCRAM family in the future, that would become even more confusing.

Most of the internal files and functions still use just "scram" as a
shorthand for SCRMA-SHA-256, but I did change PASSWORD_TYPE_SCRAM to
PASSWORD_TYPE_SCRAM_SHA_256, as that could potentially be used by 3rd
party extensions that hook into the password-check hook.

Michael Paquier did this in an earlier version of the SCRAM patch set
already, but I didn't include that in the version that was committed.

Discussion: https://www.postgresql.org/message-id/fde71ff1-5858-90c8-99a9-1c2427e7bafb@iki.fi
2017-04-18 14:50:50 +03:00
Heikki Linnakangas b2188575c5 Fix example on creating a trigger with a transition table.
Yugo Nagata

Discussion: https://www.postgresql.org/message-id/20170417180921.3047f3b0.nagata@sraoss.co.jp
2017-04-18 11:51:06 +03:00