Commit Graph

14534 Commits

Author SHA1 Message Date
Peter Eisentraut 4552c0f566 pg_upgrade: Update obsolescent documentation note
Recently released xfsprogs 5.1.0 has reflink support enabled by
default, so the note that it's not enabled by default can be removed.
2019-07-27 08:26:33 +02:00
Peter Eisentraut 959f6d6a18 pg_upgrade: Default new bindir to pg_upgrade location
Make the directory where the pg_upgrade binary resides the default for
new bindir, as running the pg_upgrade binary from where the new
cluster is installed is a very common scenario.  Setting this as the
defauly bindir for the new cluster will remove the need to provide it
explicitly via -B in many cases.

To support directories being missing from option parsing, extend the
directory check with a missingOk mode where the path must be filled at
a later point before being used.  Also move the exec_path check to
earlier in setup to make sure we know the new cluster bindir when we
scan for required executables.

This removes the exec_path from the OSInfo struct as it is not used
anywhere.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us
2019-07-27 08:19:04 +02:00
Peter Eisentraut e829337d42 doc: Make libpq documentation navigable between functions
Turn most mentions of libpq functions into links.  At id attributes to
most libpq functions, where not existing yet, so that they can be
linked to.  (In a handful of cases there were problems with the PDF
processing toolchain, so those instances were not changed.)

Author: Fabien COELHO <coelho@cri.ensmp.fr>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1905121032330.27203@lancre
2019-07-26 10:39:14 +02:00
Peter Eisentraut f4100839a0 doc: Fix some markup whitespace issues
When making an xref to a varlistentry, the stylesheets use the first
<term> as the link text.  In the cases fixed here, the <term> element
contained extra whitespace that ended up being part of the link text,
which looked strange in the output in some cases.  This whitespace is
significant, so remove it since we don't want it.
2019-07-26 10:39:14 +02:00
Peter Eisentraut 2e32a7711a doc: Add support for xref to command and function elements
Discussion: https://www.postgresql.org/message-id/517abe28-8a93-5b7a-ff40-b1fd61d33b26%402ndquadrant.com
2019-07-26 10:39:13 +02:00
Peter Eisentraut d0f5d25b39 doc: Change libpq function ids to mixed case
The ids for linking to libpq functions were previously all lower-case.
Change to mixed-case, matching the actual function name, for easier
readability in the source.  The output isn't changed in a significant
way, since the ids are converted to lower or upper case for file names
and anchors.
2019-07-26 10:39:13 +02:00
Peter Eisentraut 35a34e62ed doc: Fix typo 2019-07-25 13:58:53 +02:00
Michael Paquier fd7d387e05 Doc: Clarify interactions of pg_receivewal with remote_apply
Using pg_receivewal with synchronous_commit = remote_apply set in the
backend is incompatible if pg_receivewal is a synchronous standby as it
never applies WAL, so document this problem and solutions to it.

Backpatch to 9.6, where remote_apply has been added.

Author: Robert Haas, Jesper Pedersen
Reviewed-by: Laurenz Albe, Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/1427a2d3-1e51-9335-1931-4f8853d90d5e@redhat.com
Backpatch-through: 9.6
2019-07-24 11:25:43 +09:00
Peter Eisentraut 06140c201b Add CREATE DATABASE LOCALE option
This sets both LC_COLLATE and LC_CTYPE with one option.  Similar
behavior is already supported in initdb, CREATE COLLATION, and
createdb.

Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
Discussion: https://www.postgresql.org/message-id/flat/d9d5043a-dc70-da8a-0166-1e218e6e34d4%402ndquadrant.com
2019-07-23 14:47:24 +02:00
Peter Eisentraut 7961886580 Revert "initdb: Change authentication defaults"
This reverts commit 09f08930f0.

The buildfarm client needs some adjustments first.
2019-07-22 19:28:25 +02:00
Peter Eisentraut 09f08930f0 initdb: Change authentication defaults
Change the defaults for the pg_hba.conf generated by initdb to "peer"
for local (if supported, else "md5") and "md5" for host.

(Changing from "md5" to SCRAM is left as a separate exercise.)

"peer" is currently not supported on AIX, HP-UX, and Windows.  Users
on those operating systems will now either have to provide a password
to initdb or choose a different authentication method when running
initdb.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/bec17f0a-ddb1-8b95-5e69-368d9d0a3390%40postgresql.org
2019-07-22 15:14:27 +02:00
Michael Paquier 23bccc823d Fix inconsistencies and typos in the tree
This is numbered take 7, and addresses a set of issues with code
comments, variable names and unreferenced variables.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/dff75442-2468-f74f-568c-6006e141062f@gmail.com
2019-07-22 10:01:50 +09:00
Michael Paquier 1300fa66b2 Doc: clarify when table rewrites happen with column addition and DEFAULT
16828d5 has improved ALTER TABLE so as a column addition does not
require a rewrite for a non-NULL default with constant expressions, but
one spot in the documentation did not get updated consistently.
The documentation also now clarifies the fact that this does not apply
if the expression is volatile, where a table rewrite is still required.

Reported-by: Daniel Westermann
Author: Ian Barwick
Reviewed-by: Michael Paquier, Daniel Westermann
Discussion: https://postgr.es/m/DB6PR0902MB2184C7D5645CF15D75EB7957D2CF0@DB6PR0902MB2184.eurprd09.prod.outlook.com
Backpatch-through: 11
2019-07-19 11:42:33 +09:00
Tom Lane bc8393cf27 Further adjust SPITupleTable to provide a public row-count field.
Now that commit fec0778c8 drew a clear line between public and private
fields in SPITupleTable, it seems pretty silly that the count of valid
tuples isn't on the public side of that line.  The reason why not was
that there wasn't such a count.  For reasons lost in the mists of time,
spi.c preferred to keep a count of remaining free entries in the array.
But that seems pretty pointless: it's unlike the way we handle similar
code everywhere else, and it involves extra subtractions that surely
outweigh having to do a comparison rather than test-for-zero to check
for array-full.

Hence, rearrange so that this code does the expansible array logic
the same as everywhere else, with a count of valid entries alongside
the allocated array length.  And document the count as public.

I looked for core-code callers where it would make sense to start
relying on tuptable->numvals rather than the separate SPI_processed
variable.  Right now there don't seem to be places where it'd be
a win to do so without more code restructuring than I care to
undertake today.  In principle, though, having SPITupleTables be
fully self-contained should be helpful down the line.

Discussion: https://postgr.es/m/16852.1563395722@sss.pgh.pa.us
2019-07-18 10:37:13 -04:00
Michael Paquier 1c1602b8b6 Simplify description of --data-checksums in documentation of initdb
The documentation mentioned that data checksums cannot be changed after
initialization, which is not true as pg_checksums can do that with its
--enable option introduced in v12.  This simply removes the sentence
telling so.

Reported-by: Basil Bourque
Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/15909-e9d74271f1647472@postgresql.org
Backpatch-through: 12
2019-07-18 10:05:59 +09:00
Tom Lane fec0778c80 Clarify the distinction between public and private SPITupleTable fields.
The fields that we consider public are "tupdesc" and "vals", which
historically are in the middle of the struct.  Move them to the front
(this should be perfectly safe to do in HEAD) and add comments to make
it quite clear which fields are public or not.

Also adjust spi.sgml's documentation of the struct to match.
That doc had bit-rotted somewhat, as it was missing some fields.
(Arguably we should just remove all the private fields from the docs,
but for now I refrained.)

Daniel Gustafsson, reviewed by Fabien Coelho

Discussion: https://postgr.es/m/0D19F836-B743-4340-B6A2-F148CA3DD1F0@yesql.se
2019-07-17 14:55:13 -04:00
Tom Lane 860c095fd5 Doc: explain where to find Makefile used to build sepgsql-regtest.pp.
At least on Fedora and RHEL, it's not in the same RPM that's needed
for building sepgsql itself.  Today is the second or third time I've
had to rediscover how to install that, so let's document it this time.
2019-07-17 13:13:15 -04:00
Michael Paquier 0896ae561b Fix inconsistencies and typos in the tree
This is numbered take 7, and addresses a set of issues around:
- Fixes for typos and incorrect reference names.
- Removal of unneeded comments.
- Removal of unreferenced functions and structures.
- Fixes regarding variable name consistency.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com
2019-07-16 13:23:53 +09:00
Bruce Momjian c6bce6ebb6 doc: mention pg_reload_conf() for reloading the config file
Reported-by: Ian Barwick

Discussion: https://postgr.es/m/538950ec-b86a-1650-6078-beb7091c09c2@2ndquadrant.com

Backpatch-through: 9.4
2019-07-15 20:57:24 -04:00
Thomas Munro 5823677acc Provide pgbench --show-script to dump built-in scripts.
Author: Fabien Coelho
Reviewed-by: Ibrar Ahmed
Discussion: https://postgr.es/m/alpine.DEB.2.21.1904081737390.5867%40lancre
2019-07-16 11:57:49 +12:00
Peter Eisentraut 5925e55498 Add gen_random_uuid function
This adds a built-in function to generate UUIDs.

PostgreSQL hasn't had a built-in function to generate a UUID yet,
relying on external modules such as uuid-ossp and pgcrypto to provide
one.  Now that we have a strong random number generator built-in, we
can easily provide a version 4 (random) UUID generation function.

This patch takes the existing function gen_random_uuid() from pgcrypto
and makes it a built-in function.  The pgcrypto implementation now
internally redirects to the built-in one.

Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
Discussion: https://www.postgresql.org/message-id/6a65610c-46fc-2323-6b78-e8086340a325@2ndquadrant.com
2019-07-14 14:30:27 +02:00
Alexander Korotkov 075f0a880f Add support for <-> (box, point) operator to SP-GiST box_ops
Opclass support functions already can handle this operator, just catalog
adjustment appears to be required.

Discussion: https://postgr.es/m/f71ba19d-d989-63b6-f04a-abf02ad9345d%40postgrespro.ru
Author: Nikita Glukhov
Reviewed-by: Tom Lane, Alexander Korotkov
2019-07-14 15:09:23 +03:00
Alexander Korotkov c085e1c1cb Add support for <-> (box, point) operator to GiST box_ops
Index-based calculation of this operator is exact.  So, signature of
gist_bbox_distance() function is changes so that caller is responsible for
setting *recheck flag.

Discussion: https://postgr.es/m/f71ba19d-d989-63b6-f04a-abf02ad9345d%40postgrespro.ru
Author: Nikita Glukhov
Reviewed-by: Tom Lane, Alexander Korotkov
2019-07-14 15:09:15 +03:00
Thomas Munro 0369f47366 Fix documentation for pgbench tpcb-like.
We choose a random value for delta, not balance.  Back-patch to 9.6 where
the mistake arrived.

Author: Fabien Coelho
Discussion: https://postgr.es/m/alpine.DEB.2.21.1904081752210.5867@lancre
2019-07-14 14:22:57 +12:00
Michael Paquier 170d11b8e7 Fix and improve several places in the docs
This adds some missing markups, fixes a couple of incorrect ones and
clarifies some documentation in various places.

Author: Liudmila Mantrova
Discussion: https://postgr.es/m/a068f947-7a51-5df1-b3fd-1a131ae5c044@postgrespro.ru
Backpatch-through: 12
2019-07-13 14:43:29 +09:00
Alexander Korotkov 0cea6eb5a5 Fixes for jsonpath filter expression elements table in docs
Reported-by: Thom Brown
Discussion: https://postgr.es/m/CAA-aLv4Tggy6Z3kaG9n%2B3SHwOVGN2Yj_MJXfdfwjH_jBNZzJNA%40mail.gmail.com
Backpatch-through: 12
2019-07-11 18:20:21 +03:00
Bruce Momjian 909a7b6b8e docs: remove pg_roles mention of the oid column being displayed
It is now always displayed in PG 12+.

Discussion: https://postgr.es/m/b6ec6167-5dd5-6347-ac1d-1fd49382019f@2ndquadrant.com

Author: Ian Barwick

Backpatch-through: 12
2019-07-10 14:24:36 -04:00
Alvaro Herrera ec4eaab78b Mention limitation of unique in partitioned tables
Per gripe from Phil Bayer.

Authors: Amit Langote and others
Discussion: https://postgr.es/m/156236160709.1192.4498528196556144085@wrigleys.postgresql.org
2019-07-10 09:12:49 -04:00
Alexander Korotkov 5a7d697a39 Assorted fixes for jsonpath documentation
This commit contains assorted fixes for jsonpath documentation including:
grammar fixes, incorrect examples fixes as well as wording improvements.

Discussion: https://postgr.es/m/CAA-aLv4VVX%3Db9RK5hkfPXJczqaiTdqO04teW9i0wiQVhdKcqzw%40mail.gmail.com
Author: Liudmila Mantrova
Reviewed-by: Alexander Korotkov
Reported-by: Thom Brown
2019-07-10 07:48:55 +03:00
Bruce Momjian 38c268dde0 doc: adjust to_timestamp()/to_date() wording
Discussion: https://postgr.es/m/20190706202425.GA16933@telsasoft.com

Author: Justin Pryzby

Backpatch-through: 12
2019-07-08 23:04:02 -04:00
Peter Eisentraut 482501d433 doc: Clarify logical replication documentation
Document that the data types of replicated tables do not need to
match.  The documentation previously claimed that they had to match.

Author: Robert Treat <rob@xzilla.net>
Discussion: https://www.postgresql.org/message-id/flat/CAJSLCQ13==D8Ka2YLyctTm0Y+8MhGYcX_zj7fU0rqRzhcV++3w@mail.gmail.com
2019-07-08 14:28:42 +02:00
Michael Paquier 6b8548964b Fix inconsistencies in the code
This addresses a couple of issues in the code:
- Typos and inconsistencies in comments and function declarations.
- Removal of unreferenced function declarations.
- Removal of unnecessary compile flags.
- A cleanup error in regressplans.sh.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/0c991fdf-2670-1997-c027-772a420c4604@gmail.com
2019-07-08 13:15:09 +09:00
Tom Lane 0ab1a2e39b Remove dead encoding-conversion functions.
The code for conversions SQL_ASCII <-> MULE_INTERNAL and
SQL_ASCII <-> UTF8 was unreachable, because we long ago changed
the wrapper functions pg_do_encoding_conversion() et al so that
they have hard-wired behaviors for conversions involving SQL_ASCII.
(At least some of those fast paths date back to 2002, though it
looks like we may not have been totally consistent about this until
later.)  Given the lack of complaints, nobody is dissatisfied with
this state of affairs.  Hence, let's just remove the unreachable code.

Also, change CREATE CONVERSION so that it rejects attempts to
define such conversions.  Since we consider that SQL_ASCII represents
lack of knowledge about the encoding in use, such a conversion would
be semantically dubious even if it were reachable.

Adjust a couple of regression test cases that had randomly decided
to rely on these conversion functions rather than any other ones.

Discussion: https://postgr.es/m/41163.1559156593@sss.pgh.pa.us
2019-07-05 14:17:27 -04:00
Tom Lane 02e95a5049 Add \warn command to psql.
This is like \echo except that the text is sent to stderr not stdout.

In passing, fix a pre-existing bug in \echo and \qecho: per documentation
the -n switch should only be recognized when it is the first argument,
but actually any argument matching "-n" was treated as a switch.
(Should we back-patch that?)

David Fetter (bug fix by me), reviewed by Fabien Coelho

Discussion: https://postgr.es/m/20190421183115.GA4311@fetter.org
2019-07-05 12:32:36 -04:00
Peter Eisentraut 594df378ff doc: Spell checking 2019-07-05 08:34:54 +02:00
Michael Paquier 313f87a171 Add min() and max() aggregates for pg_lsn
This is useful for monitoring, when it comes for example to calculations
of WAL retention with replication slots and delays with a set of
standbys.

Bump catalog version.

Author: Fabrízio de Royes Mello
Reviewed-by: Surafel Temesgen
Discussion: https://postgr.es/m/CAFcNs+oc8ZoHhowA4rR1GGCgG8QNgK_TOwPRVYQo5rYy8_PXzA@mail.gmail.com
2019-07-05 12:21:11 +09:00
Peter Eisentraut 7b925e1270 Sync our Snowball stemmer dictionaries with current upstream
The main change is a new stemmer for Greek.  There are minor changes
in the Danish and French stemmers.

Author: Panagiotis Mavrogiorgos <pmav99@gmail.com>
2019-07-04 13:26:48 +02:00
Tom Lane 03e7b302b1 Doc: document table persistence display in \dt+.
Forgotten in commit 9a2ea6183.
2019-07-03 12:18:10 -04:00
Michael Paquier 2b1394fc2b Add support for Visual Studio 2019 in build scripts
This fixes at the same time a set of inconsistencies in the
documentation and the scripts related to the versions of Windows SDK
supported.

Author: Haribabu Kommi
Reviewed-by: Andrew Dunstan, Juan José Santamaría Flecha, Michael
Paquier
Discussion: https://postgr.es/m/CAJrrPGcfqXhfPyMrny9apoDU7M1t59dzVAvoJ9AeAh5BJi+UzA@mail.gmail.com
2019-07-02 14:02:33 +09:00
Tom Lane 615cebc94b Stamp HEAD as 13devel.
Let the hacking begin ...
2019-07-01 12:50:55 -04:00
Tom Lane 145b18688c Doc: remove obsolete description of oid column as being "hidden".
Looks like one copy of this text didn't get updated.

Justin Pryzby

Discussion: https://postgr.es/m/20190701155932.GA22866@telsasoft.com
2019-07-01 12:09:06 -04:00
Michael Paquier c74d49d41c Fix many typos and inconsistencies
Author: Alexander Lakhin
Discussion: https://postgr.es/m/af27d1b3-a128-9d62-46e0-88f424397f44@gmail.com
2019-07-01 10:00:23 +09:00
Tom Lane 54100f5c60 Add an enforcement mechanism for global object names in regression tests.
In commit 18555b132 we tentatively established a rule that regression
tests should use names containing "regression" for databases, and names
starting with "regress_" for all other globally-visible object names, so
as to circumscribe the side-effects that "make installcheck" could have
on an existing installation.

This commit adds a simple enforcement mechanism for that rule: if the code
is compiled with ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS defined, it
will emit a warning (not an error) whenever a database, role, tablespace,
subscription, or replication origin name is created that doesn't obey the
rule.  Running one or more buildfarm members with that symbol defined
should be enough to catch new violations, at least in the regular
regression tests.  Most TAP tests wouldn't notice such warnings, but
that's actually fine because TAP tests don't execute against an existing
server anyway.

Since it's already the case that running src/test/modules/ tests in
installcheck mode is deprecated, we can use that as a home for tests
that seem unsafe to run against an existing server, such as tests that
might have side-effects on existing roles.  Document that (though this
commit doesn't in itself make it any less safe than before).

Update regress.sgml to define these restrictions more clearly, and
to clean up assorted lack-of-up-to-date-ness in its descriptions of
the available regression tests.

Discussion: https://postgr.es/m/16638.1468620817@sss.pgh.pa.us
2019-06-29 11:34:00 -04:00
Alvaro Herrera 55ed3defc9 Fix partitioned index creation with foreign partitions
When a partitioned tables contains foreign tables as partitions, it is
not possible to implement unique or primary key indexes -- but when
regular indexes are created, there is no reason to do anything other
than ignoring such partitions.  We were raising errors upon encountering
the foreign partitions, which is unfriendly and doesn't protect against
any actual problems.

Relax this restriction so that index creation is allowed on partitioned
tables containing foreign partitions, becoming a no-op on them.  (We may
later want to redefine this so that the FDW is told to create the
indexes on the foreign side.)  This applies to CREATE INDEX, as well as
ALTER TABLE / ATTACH PARTITION and CREATE TABLE / PARTITION OF.

Backpatch to 11, where indexes on partitioned tables were introduced.

Discussion: https://postgr.es/m/15724-d5a58fa9472eef4f@postgresql.org
Author: Álvaro Herrera
Reviewed-by: Amit Langote
2019-06-26 18:38:51 -04:00
Michael Paquier ce59b75d44 Add toast-level reloption for vacuum_index_cleanup
a96c41f has introduced the option for heap, but it still lacked the
variant to control the behavior for toast relations.

While on it, refactor the tests so as they stress more scenarios with
the various values that vacuum_index_cleanup can use.  It would be
useful to couple those tests with pageinspect to check that pages are
actually cleaned up, but this is left for later.

Author: Masahiko Sawada, Michael Paquier
Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAD21AoCqs8iN04RX=i1KtLSaX5RrTEM04b7NHYps4+rqtpWNEg@mail.gmail.com
2019-06-25 09:09:27 +09:00
Michael Paquier 252f9a2580 Fix description of pg_class.relam for table access methods
Author: Ian Barwick
Discussion: https://postgr.es/m/087a6961-1aaf-e36c-b712-bd5a644da20a@2ndquadrant.com
2019-06-20 13:04:56 +09:00
Alexander Korotkov dfd79e2d0e Fix description for $varname jsonpath variable
The description is ended part way and PASSING clause is not implemented yet.
But the variables might be passed as parameters to several jsonpath functions.
So, complete the description based on the current implementation, leaving
description of PASSING clause in TODO.

Discussion: https://postgr.es/m/CAKPRHz%2BxOuQSSvkuB1mCQjedd%2BB2B1Vnkrq0E-pLmoXyTO%2Bz9Q%40mail.gmail.com
Author: Kyotaro Horiguchi, Alexander Korotkov
2019-06-19 22:41:57 +03:00
Alexander Korotkov 1ff8dc9f19 Improve documentation for jsonpath like_regex predicate
Reference posix regex documentation section and list supported flags.

Discussion: https://postgr.es/m/CAKPRHz%2BxOuQSSvkuB1mCQjedd%2BB2B1Vnkrq0E-pLmoXyTO%2Bz9Q%40mail.gmail.com
Author: Kyotaro Horiguchi, Alexander Korotkov
2019-06-19 22:41:57 +03:00
Peter Eisentraut ac5bb8f275 Add XSL stylesheet to fix up SVG files
The SVG output produced by external tools needs some postprocessing.
This is implemented by this new XSL stylesheet.

Issues are:

- SVG produced by Ditaa does not add a viewBox attribute to the svg
  element, needed to make the image scalable.

- SVG produced by Graphviz uses a stroke="transparent" attribute,
  which is not valid SVG.  It appears to mostly work, but FOP
  complains.

Other tweaks can be added over time.

This reverts 7dc78d8ef3 and
29046c44f3, which applied these fixes
manually.
2019-06-19 21:26:42 +02:00
Tom Lane 16c4e76f1b Doc: remove description of commit 23bd3cec6 from v12 release notes.
Now that we've back-patched that, it shouldn't be mentioned in v12
anymore.
2019-06-16 14:02:22 -04:00
Tomas Vondra 7f44efa10b Fix incorrect CREATE STATISTICS example in docs
The example was incorrectly using parantheses around the list of columns, so
just drop them.

Reported-By: Robert Haas
Discussion: https://postgr.es/m/CA%2BTgmoZZEMAqWMAfvLHZnK57SoxOutgvE-ALO94WsRA7zZ7wyQ%40mail.gmail.com
2019-06-16 01:20:42 +02:00
Tomas Vondra aa087ec64f Add pg_stats_ext view for extended statistics
Regular per-column statistics are stored in pg_statistics catalog, which
is however rather difficult to read, so we also have pg_stats view with
a human-reablable version of the data.

For extended statistic the catalog was fairly easy to read, so we did
not have such human-readable view so far.  Commit 9b6babfa2d however did
split the catalog into two, which makes querying harder.  Furthermore,
we want to show the multi-column MCV list in a way similar to per-column
stats (and not as a bytea value).

This commit introduces pg_stats_ext view, joining the two catalogs and
massaging the data to produce human-readable output similar to pg_stats.
It also considers RLS and access privileges - the data is shown only when
the user has access to all columns the extended statistic is defined on.

Bumped CATVERSION due to adding new system view.

Author: Dean Rasheed, with improvements by me
Reviewed-by: Dean Rasheed, John Naylor
Discussion: https://postgr.es/m/CAEZATCUhT9rt7Ui%3DVdx4N%3D%3DVV5XOK5dsXfnGgVOz_JhAicB%3DZA%40mail.gmail.com
2019-06-16 01:20:39 +02:00
Tomas Vondra 6cbfb784c3 Rework the pg_statistic_ext catalog
Since extended statistic got introduced in PostgreSQL 10, there was a
single catalog pg_statistic_ext storing both the definitions and built
statistic.  That's however problematic when a user is supposed to have
access only to the definitions, but not to user data.

Consider for example pg_dump on a database with RLS enabled - if the
pg_statistic_ext catalog respects RLS (which it should, if it contains
user data), pg_dump would not see any records and the result would not
define any extended statistics.  That would be a surprising behavior.

Until now this was not a pressing issue, because the existing types of
extended statistic (functional dependencies and ndistinct coefficients)
do not include any user data directly.  This changed with introduction
of MCV lists, which do include most common combinations of values.

The easiest way to fix this is to split the pg_statistic_ext catalog
into two - one for definitions, one for the built statistic values.
The new catalog is called pg_statistic_ext_data, and we're maintaining
a 1:1 relationship with the old catalog - either there are matching
records in both catalogs, or neither of them.

Bumped CATVERSION due to changing system catalog definitions.

Author: Dean Rasheed, with improvements by me
Reviewed-by: Dean Rasheed, John Naylor
Discussion: https://postgr.es/m/CAEZATCUhT9rt7Ui%3DVdx4N%3D%3DVV5XOK5dsXfnGgVOz_JhAicB%3DZA%40mail.gmail.com
2019-06-16 01:20:31 +02:00
Alvaro Herrera a193cbec11 Add pg_dumpall --rows-per-insert
Commit 7e413a0f82 added that option to pg_dump, but neglected to teach
pg_dumpall how to pass it along.  Repair.

Author: Fabien Coelho
Reported-by: Peter Eisentraut
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/45f50c59-ddbb-8cf2-eedb-81003f603528@2ndquadrant.com
2019-06-14 18:21:52 -04:00
Alvaro Herrera 313f56ce2d Tweak libpq's PQhost, PQhostaddr, and psql's \connect
Fixes some problems introduced by 6e5f8d489acc:

* When reusing conninfo data from the previous connection in \connect,
  the host address should only be reused if it was specified as
  hostaddr; if it wasn't, then 'host' is resolved afresh.  We were
  reusing the same IP address, which ignores a possible DNS change
  as well as any other addresses that the name resolves to than the
  one that was used in the original connection.

* PQhost, PQhostaddr: Don't present user-specified hostaddr when we have
  an inet_net_ntop-produced equivalent address.  The latter has been
  put in canonical format, which is cleaner (so it produces "127.0.0.1"
  when given "host=2130706433", for example).

* Document the hostaddr-reusing aspect of \connect.

* Fix some code comments

Author: Fabien Coelho
Reported-by: Noah Misch
Discussion: https://postgr.es/m/20190527203713.GA58392@gust.leadboat.com
2019-06-14 18:02:26 -04:00
Bruce Momjian b9a0724cf7 doc: PG 12 relnotes, add mention of single-child optimization
Add mention of single-child optimization for partitions and UNION ALL.

Reported-by: David Rowley

Discussion: https://postgr.es/m/CAKJS1f8R8riwBXw==7ijV=UZNuhP+3qXgDBKSiM+=_cTf4mXXw@mail.gmail.com
2019-06-14 09:30:31 -04:00
Bruce Momjian be2e024bd6 docs: PG 12 relnotes, update self-join item to mention ctid
Reported-by: Robert Haas

Discussion: https://postgr.es/m/CA+TgmoY==TZwk-4cM3Usebq1f=j7Hpm1brFbk1v48h45wsWzzg@mail.gmail.com
2019-06-13 22:53:20 -04:00
Bruce Momjian 18ef7a34fe docs: PG 12 relnotes, move vacuumdb to the client app section
It was previously incorrectly placed in the server application section.

Reported-by: Tatsuo Ishii

Discussion: https://postgr.es/m/20190526.215341.1023150119477784132.t-ishii@sraoss.co.jp
2019-06-13 22:07:25 -04:00
Alvaro Herrera b976845815 Fix double-word typos
Discussion: https://postgr.es/m/20190612184527.GA24266@alvherre.pgsql
Reviewed-by: Michaël Paquier
2019-06-13 10:03:56 -04:00
Bruce Momjian 4f41a72275 doc: PG 12 relnotes: update wording on truncate/vacuum item
This item prevents unauthorized locking of relations, and the previous
wording was unclear.

Reported-by: Michael Paquier

Discussion: https://postgr.es/m/20190522072651.GC1278@paquier.xyz
2019-06-13 09:15:59 -04:00
Tom Lane 7dc6ae37de Doc: fix bogus example.
This wasn't incorrect SQL, but it was doing cm-to-inch conversion
backward, so it might confuse readers.

Per bug #15849 from TAKATSUKA Haruka.

Discussion: https://postgr.es/m/15849-37ad0c561a836107@postgresql.org
2019-06-12 23:05:40 -04:00
Tom Lane 9729c93608 Doc: improve description of allowed spellings for Boolean input.
datatype.sgml failed to explain that boolin() accepts any unique
prefix of the basic input strings.  Indeed it was actively misleading
because it called out a few minimal prefixes without mentioning that
there were more valid inputs.

I also felt that it wasn't doing anybody any favors by conflating
SQL key words, valid Boolean input, and string literals containing
valid Boolean input.  Rewrite in hopes of reducing the confusion.

Per bug #15836 from Yuming Wang, as diagnosed by David Johnston.
Back-patch to supported branches.

Discussion: https://postgr.es/m/15836-656fab055735f511@postgresql.org
2019-06-12 22:55:05 -04:00
Bruce Momjian 4bfb79ff6b docs: PG 12 relnotes, update btree items
Reported-by: Peter Geoghegan

Discussion: https://postgr.es/m/CAH2-Wzn-aH4ToZEWR05ELSSp7bO_JMn=sMPfUhNruwVmCXKh-w@mail.gmail.com
2019-06-12 22:48:04 -04:00
David Rowley ddc053dc50 doc: Fix grammatical error in partitioning docs
Reported-by: Amit Langote
Discussion: https://postgr.es/m/CA+HiwqGZFkKi0TkBGYpr2_5qrRAbHZoP47AP1BRLUOUkfQdy_A@mail.gmail.com
Backpatch-through: 10
2019-06-13 10:35:11 +12:00
Bruce Momjian 9680728371 doc: PG 12 relnotes, list added snowball/FTS languages
Reported-by: Adrien Nayrat

Discussion: https://postgr.es/m/9d6a7515-bcd8-05be-d2a5-e81dc11023cd@anayrat.info
2019-06-12 17:46:38 -04:00
Bruce Momjian 6a631a4546 doc: PG 12 relnotes, merge new SQL partition function items
Reported-by: Andres Freund

Discussion: https://postgr.es/m/20190528155823.3e4cezblxjxotq2q@alap3.anarazel.de
2019-06-12 17:36:43 -04:00
David Rowley e788e849ad doc: Add best practises section to partitioning docs
A few questionable partitioning designs have been cropping up lately
around the mailing lists.  Generally, these cases have been partitioning
using too many partitions which have caused performance or OOM problems for
the users.

Since we have very little else to guide users into good design, here we
add a new section to the partitioning documentation with some best
practise guidelines for good design.

Reviewed-by: Justin Pryzby, Amit Langote, Alvaro Herrera
Discussion: https://postgr.es/m/CAKJS1f-2rx+E9mG3xrCVHupefMjAp1+tpczQa9SEOZWyU7fjEA@mail.gmail.com
Backpatch-through: 10
2019-06-12 08:08:57 +12:00
Tom Lane 6f34fcbbd5 Fix conversion of JSON strings to JSON output columns in json_to_record().
json_to_record(), when an output column is declared as type json or jsonb,
should emit the corresponding field of the input JSON object.  But it got
this slightly wrong when the field is just a string literal: it failed to
escape the contents of the string.  That typically resulted in syntax
errors if the string contained any double quotes or backslashes.

jsonb_to_record() handles such cases correctly, but I added corresponding
test cases for it too, to prevent future backsliding.

Improve the documentation, as it provided only a very hand-wavy
description of the conversion rules used by these functions.

Per bug report from Robert Vollmert.  Back-patch to v10 where the
error was introduced (by commit cf35346e8).

Note that PG 9.4 - 9.6 also get this case wrong, but differently so:
they feed the de-escaped contents of the string literal to json[b]_in.
That behavior is less obviously wrong, so possibly it's being depended on
in the field, so I won't risk trying to make the older branches behave
like the newer ones.

Discussion: https://postgr.es/m/D6921B37-BD8E-4664-8D5F-DB3525765DCD@vllmrt.net
2019-06-11 13:33:22 -04:00
Alvaro Herrera 9f05c44ba4 Fix order of steps in DISCARD ALL documentation
The docs have always been slightly inaccurate, but got particularly so
in a874fe7b4c, which made DISCARD ALL occur before everything else;
reorder.

Author: Jan Chochol
Discussion: https://postgr.es/m/CAEASf_3TzBbnXm64HpnD5zCZEh8An9jN8ubMR=De-vOXHMHGeA@mail.gmail.com
2019-06-11 12:22:11 -04:00
Michael Paquier 727e45c8a4 Fix documentation of ALTER TABLE for stored values
Author: Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoAA_gvZ002U6kovOHu0FsM7ieoCzdSqWBd7_KaQL0UMKg@mail.gmail.com
2019-06-11 12:58:51 +09:00
Alexander Korotkov ba3783e024 Add docs of missing GUC to pgtrgm.sgml
be8a7a68 introduced pg_trgm.strict_word_similarity_threshold GUC, but missed
docs for that.  This commit fixes that.

Discussion: https://postgr.es/m/fc907f70-448e-fda3-3aa4-209a59597af0%402ndquadrant.com
Author: Ian Barwick
Reviewed-by: Masahiko Sawada, Michael Paquier
Backpatch-through: 9.6
2019-06-10 19:42:36 +03:00
Alexander Korotkov 852ddfbbe2 Fix docs indentation in pgtrgm.sgml
5871b884 introduced pg_trgm.word_similarity_threshold GUC, but its documentation
contains wrong indentation.  This commit fixes that.  Backpatch for easier
backpatching of other documentation fixes.

Discussion: https://postgr.es/m/4c735d30-ab59-fc0e-45d8-f90eb5ed3855%402ndquadrant.com
Author: Ian Barwick
Backpatch-through: 9.6
2019-06-10 19:28:47 +03:00
Michael Paquier b880e22de4 Fix some typos
Author: Guillaume Lelarge
Discussion: https://postgr.es/m/CAECtzeWPz4JikzUqZdMjqPTe8dAP3nZxPD-58Y-Hhvirg0fF+A@mail.gmail.com
2019-06-09 11:25:56 +09:00
Noah Misch a806b14a11 Update documentation about SIGKILL of postmaster.
Removing shared memory and semaphores in response to server start
failure often masks the real problem, a live process associated with the
data directory; see commit 5a907404b5.
Since 9.6, it's rarely necessary to kill subprocesses manually.  (When
it is necessary, that commit's HINT will say as much, in all supported
versions.)
2019-06-08 10:12:26 -07:00
David Rowley 6c0c283837 Docs: concurrent builds of partitioned indexes are not supported
Document that CREATE INDEX CONCURRENTLY is not currently supported for
indexes on partitioned tables.

Discussion: https://postgr.es/m/CAKJS1f_CErd2z9L21Q8OGLD4TgH7yw1z9MAtHTSO13sXVG-yow@mail.gmail.com
Backpatch-through: 11
2019-06-06 12:36:37 +12:00
Peter Eisentraut b250898c76 doc: Add links to tables
Formal tables should generally have an xref in the text that points to
them.  Add them here.
2019-06-05 22:08:50 +02:00
Alvaro Herrera 5efd604ec0 Document piecemeal construction of partitioned indexes
Continuous operation cannot be achieved without applying this technique,
so it needs to be properly described.

Author: Álvaro Herrera
Reported-by: Tom Lane
Discussion: https://postgr.es/m/8756.1556302759@sss.pgh.pa.us
2019-06-04 16:42:40 -04:00
Peter Eisentraut ece9dc40d6 doc: Fix whitespace
Verbatim environment tags should not be indented.
2019-06-04 13:57:38 +02:00
Peter Eisentraut c880096dc1 Add command column to pg_stat_progress_create_index
This allows determining which command is running, similar to
pg_stat_progress_cluster.

Discussion: https://www.postgresql.org/message-id/flat/f0e56b3b-74b7-6cbc-e207-a5ed6bee18dc%402ndquadrant.com
2019-06-04 09:29:02 +02:00
Michael Paquier 0b8e0532c6 Fix documentation of check_option in information_schema.views
Support of CHECK OPTION for updatable views has been added in 9.4, but
the documentation of information_schema never got the call even if the
information displayed is correct.

Author: Gilles Darold
Discussion: https://postgr.es/m/75d07704-6c74-4f26-656a-10045c01a17e@darold.net
Backpatch-through: 9.4
2019-06-01 15:33:47 -04:00
Michael Paquier fc115d0f9f Rework options of pg_checksums options for filenode handling
This makes the tool consistent with the option set of oid2name, which
has been historically using -f for filenodes, and has more recently
gained long options and --filenode via 1aaf532.

Reported-by: Peter Eisentraut
Author: Fabien Coelho
Discussion: https://postgr.es/m/97045260-fb9e-e145-a950-cf7d28c4eaea@2ndquadrant.com
2019-05-30 16:58:17 -04:00
Michael Paquier 56b78626c7 Fix some documentation about access methods
Author: Guillaume Lelarge
Discussion: https://postgr.es/m/CAECtzeWPz4JikzUqZdMjqPTe8dAP3nZxPD-58Y-Hhvirg0fF+A@mail.gmail.com
2019-05-29 11:37:37 -04:00
Michael Paquier f73293aba4 Fix some documentation about FKs and partitioned tables
This got forgotten in f56f8f which has added foreign key support for
partitioned tables.  In passing, add a mention about caveats applying to
tables partitioned using inheritance regarding indexes and foreign keys.

Author: Paul A Jungwirth
Reviewed-by: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/CA+renyUuSmYgmZjKc_DfUNVZ0uttF91-FwhDVW3F7WEPj0jL5w@mail.gmail.com
2019-05-29 11:19:06 -04:00
Andres Freund d5ec46bf22 v12 release notes: Correct contributor name.
Mea culpa.
2019-05-28 09:06:40 -07:00
Bruce Momjian 3ceaed106d docs: PG 12 relnote wording fix
Reported-by: Gaby Schilders
2019-05-28 07:17:34 -04:00
Peter Eisentraut 00ef6e3b28 doc: Fix generated column documentation
The old text still had an implicit reference to the virtual behavior,
which was not in the final patch.

Author: Tobias Bussmann <t.bussmann@gmx.net>
2019-05-27 12:26:16 -04:00
Amit Kapila 9679345f3c Fix typos.
Reported-by: Alexander Lakhin
Author: Alexander Lakhin
Reviewed-by: Amit Kapila and Tom Lane
Discussion: https://postgr.es/m/7208de98-add8-8537-91c0-f8b089e2928c@gmail.com
2019-05-26 18:28:18 +05:30
Peter Eisentraut 41205719d3 Change Graphviz file extension
Change extension for Graphviz files from .dot to .gv.  The latter
appears to be the generally preferred one nowadays.

Discussion: https://www.postgresql.org/message-id/flat/71fe76d2-c7d7-2acc-6762-bbf9e61c566e%402ndquadrant.com
2019-05-26 08:08:05 +02:00
Amit Kapila 02aa15de1b Doc: fix incorrect references in PG 12 release notes.
Reported-by: Euler Taveira
Author: Euler Taveira
Discussion: https://postgr.es/m/CAHE3wgjiA8DdnUzH9WqBLxdrUVvjDkKNdHx-MkEg9uV+HtpMfg@mail.gmail.com
2019-05-25 15:40:53 +05:30
Tom Lane 591fb289c3 Doc: fix typo in pgbench random_zipfian() documentation.
Per bug #15819 from Koizumi Satoru.

Discussion: https://postgr.es/m/15819-e6191bef1f7334c0@postgresql.org
2019-05-24 11:16:06 -04:00
Michael Paquier 657c2384c6 Remove -o/--oids from pg_dumpall
This has been forgotten in 578b229, which has removed support for WITH
OIDS.

Discussion: https://postgr.es/m/CALAY4q99FcFCoG6ddke0V-AksGe82L_+bhDWgEfgZBakB840zA@mail.gmail.com
Author: Surafel Temesgen
2019-05-23 09:36:28 +09:00
Fujii Masao 03de5187d5 Mention ANALYZE boolean options in documentation.
Commit 41b54ba78e allowed not only VACUUM but also ANALYZE options
to take a boolean argument. But it forgot to update the documentation
for ANALYZE. This commit adds the descriptions about those ANALYZE
boolean options into the documentation.

This patch also updates tab-completion for ANALYZE boolean options.

Reported-by: Kyotaro Horiguchi
Author: Fujii Masao
Reviewed-by: Masahiko Sawada, Michael Paquier
Discussion: https://postgr.es/m/CAHGQGwHTUt-kuwgiwe8f0AvTnB+ySqJWh95jvmh-qcoKW9YA9g@mail.gmail.com
2019-05-23 01:18:16 +09:00
Bruce Momjian 728840fe13 docs: PG 12 release notes, support functions
Move support function mention to the proper section, and reword.

Reported-by: Tom Lane

Discussion: https://postgr.es/m/5121.1558472431@sss.pgh.pa.us
2019-05-22 11:22:13 -04:00
Bruce Momjian ba95a69336 doc: PG 12 relnotes, correct recovery_target* variable mention
Clarify new restriction on recovery_target* variables.

Reported-by: Gaby Schilders

Discussion: reported via chat
2019-05-22 10:54:40 -04:00
Bruce Momjian 8e719d33fd docs: PG 12 relnote adjustments based on feedback from Tom Lane
Discussion: https://postgr.es/m/22793.1558399695@sss.pgh.pa.us
2019-05-21 16:45:48 -04:00
Bruce Momjian 3468a04a3e docs: adjust RECORD PG 12 relnote item
Discussion: https://postgr.es/m/15486.1558393010@sss.pgh.pa.us
2019-05-21 16:35:43 -04:00
Bruce Momjian b84a801d6a doc: adjust PG 12 relnotes item on float digit adjustment
Discussion: https://postgr.es/m/87y330d8ty.fsf@news-spur.riddles.org.uk
2019-05-21 16:31:02 -04:00
Bruce Momjian 0fca8285ea doc: fix markup for PG 12 rel notes 2019-05-21 16:19:43 -04:00
Bruce Momjian 32fe2e3194 doc: adjustments for PG 12 release notes
Mostly commit messages, attribution, and text, all suggested by Andres
Freund.

Discussion: https://postgr.es/m/20190520221719.pqgld3krjc2docr5@alap3.anarazel.de
2019-05-21 16:14:33 -04:00
Tom Lane cf92226e9f Doc: improve description of regexp character classes.
Define the meanings of the POSIX-spec character classes in line,
rather than referring to the ctype(3) man page.  That man page
doesn't even exist on many modern systems, and if it does exist
it probably says the wrong things about non-ASCII characters.
Also document our non-POSIX-spec "ascii" character class.

Also, point out here that this behavior is controlled by collation or
LC_CTYPE, since the existing text explaining that is pretty far away.

Per gripe from Geert Lobbestael.  Given the lack of prior complaints,
I'm not excited about back-patching this.

Discussion: https://postgr.es/m/155837022049.1359.2948065118562813468@wrigleys.postgresql.org
2019-05-20 18:39:53 -04:00
Peter Eisentraut 8bbb8166b6 Remove bug.template file
It's outdated and not really in use anymore.

Discussion: https://www.postgresql.org/message-id/flat/cf7ed2b1-1ebe-83cf-e05e-d5943f67af2d%402ndquadrant.com
2019-05-20 08:58:21 +02:00
Michael Paquier 03310dbea9 Fix some grammar in documentation of spgist and pgbench
Discussion: https://postgr.es/m/92961161-9b49-e42f-0a72-d5d47e0ed4de@postgrespro.ru
Author: Liudmila Mantrova
Reviewed-by: Jonathan Katz, Tom Lane, Michael Paquier
Backpatch-through: 9.4
2019-05-20 09:47:19 +09:00
Alexander Korotkov 87bcc02f4f Improve documentation for array subscription in jsonpath
Usage of expressions and multiple ranges in jsonpath array subscription was
undocumented.  This commit adds lacking documentation.
2019-05-19 07:43:19 +03:00
Alexander Korotkov e0e3dad770 Document jsonpath .** accessor with nesting level filter
It appears that some variants of .** jsonpath accessor are undocumented.  In
particular undocumented variants are:

 .**{level}
 .**{lower_level to upper_level}
 .**{lower_level to last}

This commit adds missing documentation for them.
2019-05-19 07:43:19 +03:00
Bruce Momjian b12db9ff5f docs: tighten up PG 12 release note item on 1k partitions 2019-05-18 09:23:31 -04:00
Bruce Momjian 05685897f0 docs: split out sort-skip partition item in PG 12 release notes
Discussion: https://postgr.es/m/0cf10a27-c6a0-de4a-cd20-ab7493ea7422@lab.ntt.co.jp
2019-05-17 11:31:49 -04:00
Michael Paquier 41998f90ce Fix typos in documentatoin of GSSAPI encryption
Author: Daniel Gustafsson
Discussion: https://postgr.es/m/5520EDD8-7AC7-4307-8171-400DD1D84FDC@yesql.se
2019-05-17 08:22:28 +09:00
Bruce Momjian a429164ef3 docs: properly indent PG 12 release notes 2019-05-15 12:44:59 -04:00
Bruce Momjian b71dad22ce docs: Indent listitem tags in PG 12 release notes 2019-05-14 13:32:03 -04:00
Tom Lane 7c850320d8 Fix SQL-style substring() to have spec-compliant greediness behavior.
SQL's regular-expression substring() function is defined to have a
pattern argument that's separated into three subpatterns by escape-
double-quote markers; the function result is the part of the input
matching the second subpattern.  The standard makes it clear that
if there is ambiguity about how to match the input to the subpatterns,
the first and third subpatterns should be taken to match the smallest
possible amount of text (i.e., they're "non greedy", in the terms of
our regex code).  We were not doing it that way: the first subpattern
would eat the largest possible amount of text, causing the function
result to be shorter than what the spec requires.

Fix that by attaching explicit greediness quantifiers to the
subpatterns.  (This depends on the regex fix in commit 8a29ed053;
before that, this didn't reliably change the regex engine's behavior.)

Also, by adding parentheses around each subpattern, we ensure that
"|" (OR) in the subpatterns behave sanely.  Previously, "|" in the
first or third subpatterns didn't work.

This patch also makes the function throw error if you write more than
two escape-double-quote markers, and do something sane if you write
just one, and document that behavior.  Previously, an odd number of
markers led to a confusing complaint about unbalanced parentheses,
while extra pairs of markers were just ignored.  (Note that the spec
requires exactly two markers, but we've historically allowed there
to be none, and this patch preserves the old behavior for that case.)

In passing, adjust some substring() test cases that didn't really
prove what they said they were testing for: they used patterns
that didn't match the data string, so that the output would be
NULL whether or not the function was really strict.

Although this is certainly a bug fix, changing the behavior in back
branches seems undesirable: applications could perhaps be depending on
the old behavior, since it's not obviously wrong unless you read the
spec very closely.  Hence, no back-patch.

Discussion: https://postgr.es/m/5bb27a41-350d-37bf-901e-9d26f5592dd0@charter.net
2019-05-14 11:27:31 -04:00
Peter Eisentraut 037165ca95 Update SQL features/conformance information to SQL:2016 2019-05-14 15:44:37 +02:00
Peter Eisentraut c29ba98189 Update SQL keywords list to SQL:2016
Per previous convention (see
ace397e9d2), drop SQL:2008 and only keep
the latest two standards and SQL-92.

Note: SQL:2016-2 lists a large number of non-reserved keywords that
are really just information_schema column names related to new
features.  Those kinds of thing have not previously been listed as
keywords, and this was apparently done here by mistake, since these
keywords have been removed again in post-2016 working drafts.  So in
order to avoid bloating the keywords table unnecessarily, I have
omitted these erroneous keywords here.
2019-05-14 15:44:37 +02:00
Bruce Momjian 356c83795a docs: update partition item in PG 12 release notes
Reported-by: Amit Langote

Discussion: https://postgr.es/m/b7954643-41ef-a174-479d-1f8d4834f40a@lab.ntt.co.jp
2019-05-14 09:17:08 -04:00
Bruce Momjian 34d40becfa docs: fix duplicate wording in PG 12 release notes
Reported-by: nickb@imap.cc

Discussion: https://postgr.es/m/6b3414e1-fcef-4ad9-b123-b3ab3702d3db@www.fastmail.com
2019-05-14 09:06:05 -04:00
Bruce Momjian 0b62f0f255 doc: Update OID item in PG 12 release notes
Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190513174759.GE23251@telsasoft.com
2019-05-13 22:55:38 -04:00
Bruce Momjian f4125278e3 doc: improve wording of PG 12 releaase note partition item
Reported-by: Amit Langote

Discussion: https://postgr.es/m/d5267ae5-bd4a-3e96-c21b-56bfa9fec7e8@lab.ntt.co.jp
2019-05-13 22:38:50 -04:00
Bruce Momjian 5d971565a7 doc: properly attibute PG 12 pgbench release note item
Reported-by: Fabien COELHO

Discussion: https://postgr.es/m/alpine.DEB.2.21.1905130839140.13487@lancre
2019-05-13 22:21:32 -04:00
Peter Geoghegan 08ca9d7fec Doc: Refer to line pointers as item identifiers.
An upcoming HEAD-only patch will standardize the terminology around
ItemIdData variables/line pointers, ending the practice of referring to
them as "item pointers".  Make the "Database Page Layout" docs
consistent with the new policy.  The term "item identifier" is already
used in the same section, so stick with that.

Discussion: https://postgr.es/m/CAH2-Wz=c=MZQjUzde3o9+2PLAPuHTpVZPPdYxN=E4ndQ2--8ew@mail.gmail.com
Backpatch: All supported branches.
2019-05-13 15:39:06 -07:00
Bruce Momjian f86b0c3c46 doc: PG 12 release notes: normalize attribution names
Reported-by: David Rowley

Discussion: https://postgr.es/m/CAKJS1f-ktEhmQ2zJQ1L1niuJ9KB8WPA-bE-AhGiFsSO6QASB_w@mail.gmail.com
2019-05-12 23:54:02 -04:00
Bruce Momjian a6927996be doc: adjust PG 12 release note sections
Tighten section designations.
2019-05-12 23:41:53 -04:00
Bruce Momjian fefb6a7538 docs: fix typo in mention of MSVC 2019-05-12 23:24:43 -04:00
Bruce Momjian 4217d15d91 docs: remove second mention of btree max length reduction
I already added that to the incompatibility section as a separate item.

Reported-by: Peter Geoghegan
2019-05-11 18:24:31 -04:00
Bruce Momjian 31f11f9647 doc: remove pg_config mention from PG 12 release notes
Reported-by: Tom Lane

Discussion: https://postgr.es/m/28209.1556556696@sss.pgh.pa.us
2019-05-11 17:59:58 -04:00
Bruce Momjian d56fd6357a docs: PG 12 release notes, mention that REINDEX could now fail
This is because of the new tid in the index entry.

Reported-by: Peter Geoghegan
2019-05-11 16:42:05 -04:00
Bruce Momjian 1708974485 docs: add links from the PG 12 release notes to the main docs 2019-05-11 16:17:18 -04:00
Bruce Momjian 0edc8fc47b docs: adjust PG 12 floating point item
Reported-by: Andrew Gierth

Discussion: https://postgr.es/m/87r295hjur.fsf@news-spur.riddles.org.uk
2019-05-11 10:29:32 -04:00
Andrew Gierth b721e201a0 Fix editing error in floating-point docs.
My fault; the error was introduced in the Ryu patch.
2019-05-11 03:23:55 +01:00
Bruce Momjian 064df0edfe doc: add Heikki to PG 12 release note btree item
Reported-by: Peter Geoghegan

Discussion: https://postgr.es/m/CAH2-WzkrX-aA7d3OYtQT+8Mspq+tU5vwuVz=FTzMH3CdrSyprA@mail.gmail.com
2019-05-10 22:11:13 -04:00
Bruce Momjian 13d258ec0e doc: improve PG 12 item on partitioned tables
Reported-by: Amit Langote

Discussion: https://postgr.es/m/5936b052-5d92-a2c9-75d2-0245fb2330b5@lab.ntt.co.jp
2019-05-10 21:22:53 -04:00
Bruce Momjian 05f9eba349 doc: reorder attribution of PG 12 btree item
Reported-by: Alexander Korotkov

Discussion: https://postgr.es/m/CAPpHfdvkM-PkyrK6LQitJUDmC_1kOCEtTuseoVhCT=ew0XJmGg@mail.gmail.com
2019-05-10 21:16:33 -04:00
Bruce Momjian 8aa1b0885e docs: properly attribute PG 12 rel item to James Coleman
Reported-by: David Rowley

Discussion: https://postgr.es/m/CAKJS1f-NDmeA_tb0oRFhrgf19xq3A9MeoyMcckY04Ct=_i0c2A@mail.gmail.com
2019-05-10 21:06:38 -04:00
Bruce Momjian 809e248299 docs: PG 12 docs, clarify btree index changes
Reported-by: Peter Geoghegan

Discussion: https://postgr.es/m/CAH2-WzkSYOM1GJVGtAbRW-OqymoCD=QWYG6ro+GaoOW-jPRuDQ@mail.gmail.com
2019-05-10 21:03:31 -04:00
Bruce Momjian b299efaea4 doc: PG 12 release note adjustment
Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190510013449.GL3925@telsasoft.com
2019-05-10 20:25:52 -04:00
Bruce Momjian c65bcfe9ae doc: add markup for PG 12 release note text
I will add links to other parts of the docs later.
2019-05-09 23:26:48 -04:00
Bruce Momjian d0bbf871ca doc: PG 12 wording improvments
Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190510001335.GJ3925@telsasoft.com
2019-05-09 20:58:02 -04:00
Bruce Momjian 97b1654da7 doc: more PG 12 wording adjustments
Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190510001959.GK3925@telsasoft.com
2019-05-09 20:32:35 -04:00
Bruce Momjian 32fe7ee2dd doc: fix capitalization in PG 12 release notes
Reported-by: Thomas Munro

Discussion: https://postgr.es/m/CA+hUKGJpep8uSXoDtVF6iROCRKce-39HEhDPUaYFyMn0U5e9ug@mail.gmail.com
2019-05-09 20:10:17 -04:00
Bruce Momjian 79697d039f doc: more PG 12 release note adjustments
This adds two more items that should have been included in the
beginning.

Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190508203204.GA25482@telsasoft.com
2019-05-09 19:59:59 -04:00
Bruce Momjian 81ddfa2e4d docs: update release notes with fixes
Reported-by: Justin Pryzby

Discussion: https://postgr.es/m/20190508203204.GA25482@telsasoft.com
2019-05-09 19:27:03 -04:00
Bruce Momjian 64084d6857 doc: update PG 12 release notes, v2
Adjustments requested by reviewers.

Reported-by: Amit Kapila, Thomas Munro, Andrew Gierth, Amit Langote, Oleg Bartunov, Michael Paquier, Alvaro Herrera, Tatsuo Ishii

Discussion: https://postgr.es/m/20190506233029.ozwged67i7s4qd6c@momjian.us
2019-05-09 16:44:27 -04:00
Etsuro Fujita a0be05bab0 Doc: Update FDW documentation about GetForeignUpperPaths().
In commit d50d172e51, which added support for LIMIT/OFFSET pushdown in
postgres_fdw, a new struct was introduced as the extra parameter of
GetForeignUpperPaths() set for UPPERREL_FINAL, but I forgot to update
the documentation to mention that.

Author: Etsuro Fujita
Discussion: https://postgr.es/m/CAPmGK17uSXQDe31oRb-z1nYyT6vVzkstZkA3_Wbq38U92b9BmQ%40mail.gmail.com
2019-05-09 19:50:15 +09:00
Peter Eisentraut 02daece4ab Fix grammar in error message 2019-05-09 09:16:59 +02:00
Fujii Masao df631ebc73 Fix documentation for the privileges required for replication functions.
Previously it's documented that use of replication functions is
restricted to superusers. This is true for the functions which
use replication origin, but not for pg_logicl_emit_message() and
functions which use replication slot. For example, not only
superusers but also users with REPLICATION privilege is allowed
to use the functions for replication slot. This commit fixes
the documentation for the privileges required for those replication
functions.

Back-patch to 9.4 (all supported versions).

Author: Matsumura Ryo
Discussion: https://postgr.es/m/03040DFF97E6E54E88D3BFEE5F5480F74ABA6E16@G01JPEXMBYT04
2019-05-09 01:35:13 +09:00
Thomas Munro 098344be66 Fix copy-and-paste mistakes in documentation.
Reported-by: Vik Fearing
2019-05-08 21:16:36 +12:00
Alexander Korotkov 53ae0b16d6 Remove word "singleton" out of jsonpath docs
Word "singleton" is hard for user understanding, especially taking into account
there is only one place it's used in the docs and there is even no definition.
Use more evident wording instead.

Discussion: https://postgr.es/m/23737.1556550645%40sss.pgh.pa.us
2019-05-08 01:02:59 +03:00
Fujii Masao b84dbc8eb8 Add TRUNCATE parameter to VACUUM.
This commit adds new parameter to VACUUM command, TRUNCATE,
which specifies that VACUUM should attempt to truncate off
any empty pages at the end of the table and allow the disk space
for the truncated pages to be returned to the operating system.

This parameter, if specified, overrides the vacuum_truncate
reloption. If neither the reloption nor the VACUUM option is
used, the default is true, as before.

Author: Fujii Masao
Reviewed-by: Julien Rouhaud, Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoD+qtrSDL=GSma4Wd3kLYLeRC0hPna-YAdkDeV4z156vg@mail.gmail.com
2019-05-08 02:10:33 +09:00
Peter Eisentraut b753bc0c84 doc: Generate keywords table automatically
The SQL keywords table in the documentation had until now been
generated by some ad hoc scripting outside the source tree once for
each major release.  This changes it to an automated process.

We have the PostgreSQL keywords available in a parseable format in
parser/kwlist.h.  For the relevant SQL standard versions, keep the
keyword lists in new text files.  A new script
generate-keywords-table.pl pulls it all together and produces a
DocBook table.

The final output in the documentation should be identical after this
change.

Discussion: https://www.postgresql.org/message-id/flat/07daeadd-8c82-0d95-5e19-e350502cb749%402ndquadrant.com
2019-05-07 15:29:39 +02:00
Amit Kapila 7db0cde6b5 Revert "Avoid the creation of the free space map for small heap relations".
This feature was using a process local map to track the first few blocks
in the relation.  The map was reset each time we get the block with enough
freespace.  It was discussed that it would be better to track this map on
a per-relation basis in relcache and then invalidate the same whenever
vacuum frees up some space in the page or when FSM is created.  The new
design would be better both in terms of API design and performance.

List of commits reverted, in reverse chronological order:

06c8a5090e  Improve code comments in b0eaa4c51b.
13e8643bfc  During pg_upgrade, conditionally skip transfer of FSMs.
6f918159a9  Add more tests for FSM.
9c32e4c350  Clear the local map when not used.
29d108cdec  Update the documentation for FSM behavior..
08ecdfe7e5  Make FSM test portable.
b0eaa4c51b  Avoid creation of the free space map for small heap relations.

Discussion: https://postgr.es/m/20190416180452.3pm6uegx54iitbt5@alap3.anarazel.de
2019-05-07 09:30:24 +05:30
Bruce Momjian bdf595adbc docs: fist draft version of the PG 12 release notes
Still needs text markup, links, word wrap, and indenting.
2019-05-06 19:02:34 -04:00
Tom Lane 8309eae499 Doc: remove obsolete comment about per-branch documentation.
I should have removed this in a0b762626, but forgot.
2019-05-03 12:32:06 -04:00