Commit Graph

10754 Commits

Author SHA1 Message Date
Tom Lane ed0097e4f9 Add SQL-accessible functions for inspecting index AM properties.
Per discussion, we should provide such functions to replace the lost
ability to discover AM properties by inspecting pg_am (cf commit
65c5fcd35).  The added functionality is also meant to displace any code
that was looking directly at pg_index.indoption, since we'd rather not
believe that the bit meanings in that field are part of any client API
contract.

As future-proofing, define the SQL API to not assume that properties that
are currently AM-wide or index-wide will remain so unless they logically
must be; instead, expose them only when inquiring about a specific index
or even specific index column.  Also provide the ability for an index
AM to override the behavior.

In passing, document pg_am.amtype, overlooked in commit 473b93287.

Andrew Gierth, with kibitzing by me and others

Discussion: <87mvl5on7n.fsf@news-spur.riddles.org.uk>
2016-08-13 18:31:14 -04:00
Tom Lane 4997878193 Doc: clarify that DROP ... CASCADE is recursive.
Apparently that's not obvious to everybody, so let's belabor the point.

In passing, document that DROP POLICY has CASCADE/RESTRICT options (which
it does, per gram.y) but they do nothing (I assume, anyway).  Also update
some long-obsolete commentary in gram.y.

Discussion: <20160805104837.1412.84915@wrigleys.postgresql.org>
2016-08-12 18:45:18 -04:00
Simon Riggs 6e75559ea9 Correct TABLESAMPLE docs
Original wording was correct but not the intended meaning.

Reported by Patrik Wenger
2016-08-12 10:34:43 +01:00
Alvaro Herrera 371b572df2 Add ID property to replication slots' sect2 2016-08-11 15:13:57 -04:00
Bruce Momjian fd5a2db774 docs: my second pass over the 9.6 release notes 2016-08-10 23:08:47 -04:00
Tom Lane ff2fd6b06a Doc: write some for adminpack.
Previous contents of adminpack.sgml were rather far short of project norms.
Not to mention being outright wrong about the signature of pg_file_read().
2016-08-10 21:39:50 -04:00
Bruce Momjian 2abf92bc69 docs: my first pass over the 9.6 release notes 2016-08-09 18:36:18 -04:00
Tom Lane e775d35317 Doc: clarify description of CREATE/ALTER FUNCTION ... SET FROM CURRENT.
Per discussion with David Johnston.
2016-08-09 13:39:24 -04:00
Bruce Momjian cfdadf5f93 doc: update list of pg_trgm authors
Author: Oleg Bartunov
2016-08-08 14:02:43 -04:00
Tom Lane de4b3ea16d Update 9.6 release notes through today. 2016-08-08 13:13:05 -04:00
Tom Lane 9b8271c5a6 Last-minute updates for release notes.
Security: CVE-2016-5423, CVE-2016-5424
2016-08-08 11:56:10 -04:00
Noah Misch 9d924e9a64 Introduce a psql "\connect -reuse-previous=on|off" option.
The decision to reuse values of parameters from a previous connection
has been based on whether the new target is a conninfo string.  Add this
means of overriding that default.  This feature arose as one component
of a fix for security vulnerabilities in pg_dump, pg_dumpall, and
pg_upgrade, so back-patch to 9.1 (all supported versions).  In 9.3 and
later, comment paragraphs that required update had already-incorrect
claims about behavior when no connection is open; fix those problems.

Security: CVE-2016-5424
2016-08-08 10:07:46 -04:00
Peter Eisentraut a1f8b6bd14 doc: Update benchmark results
From: Alexander Law <exclusion@gmail.com>
2016-08-08 09:27:20 -04:00
Tom Lane be7f7ee5ea Update 9.6 release notes through today. 2016-08-07 22:24:59 -04:00
Tom Lane 19322c0a78 Release notes for 9.5.4, 9.4.9, 9.3.14, 9.2.18, 9.1.23. 2016-08-07 21:31:37 -04:00
Peter Eisentraut 4a1f42f287 doc: Move mention of rsync of temp tables to better place 2016-08-07 21:27:36 -04:00
Tom Lane 95bee941be Fix misestimation of n_distinct for a nearly-unique column with many nulls.
If ANALYZE found no repeated non-null entries in its sample, it set the
column's stadistinct value to -1.0, intending to indicate that the entries
are all distinct.  But what this value actually means is that the number
of distinct values is 100% of the table's rowcount, and thus it was
overestimating the number of distinct values by however many nulls there
are.  This could lead to very poor selectivity estimates, as for example
in a recent report from Andreas Joseph Krogh.  We should discount the
stadistinct value by whatever we've estimated the nulls fraction to be.
(That is what will happen if we choose to use a negative stadistinct for
a column that does have repeated entries, so this code path was just
inconsistent.)

In addition to fixing the stadistinct entries stored by several different
ANALYZE code paths, adjust the logic where get_variable_numdistinct()
forces an "all distinct" estimate on the basis of finding a relevant unique
index.  Unique indexes don't reject nulls, so there's no reason to assume
that the null fraction doesn't apply.

Back-patch to all supported branches.  Back-patching is a bit of a judgment
call, but this problem seems to affect only a few users (else we'd have
identified it long ago), and it's bad enough when it does happen that
destabilizing plan choices in a worse direction seems unlikely.

Patch by me, with documentation wording suggested by Dean Rasheed

Report: <VisenaEmail.26.df42f82acae38a58.156463942b8@tc7-visena>
Discussion: <16143.1470350371@sss.pgh.pa.us>
2016-08-07 18:52:02 -04:00
Tom Lane 3676631c68 First-draft release notes for 9.5.4.
As usual, the release notes for other branches will be made by cutting
these down, but put them up for community review first.
2016-08-06 22:08:31 -04:00
Tom Lane f10eab73df Make array_to_tsvector() sort and de-duplicate the given strings.
This is required for the result to be a legal tsvector value.
Noted while fooling with Andreas Seltenreich's ts_delete() crash.

Discussion: <87invhoj6e.fsf@credativ.de>
2016-08-05 16:09:06 -04:00
Bruce Momjian 5ebad9a580 docs: re-add spaces before units removed
This reverts the spaces before k/M/G/TB units removed for consistency in
commit ca0c37b56f.

Discussion: 20160802165116.GC32575@momjian.us
2016-08-05 14:36:17 -04:00
Bruce Momjian 4eb4b3f245 docs: mention rsync of temp and unlogged tables
This happens when using rsync to pg_upgrade slaves.

Reported-by: Jerry Sievers

Discussion: 20160726161946.GA3511@momjian.us
2016-08-04 18:55:36 -04:00
Peter Eisentraut 81568a971f doc: Move indexterms to avoid whitespace issue in man pages 2016-08-03 17:02:00 -04:00
Peter Eisentraut 2b8fd4fa67 doc: Remove documentation of nonexistent information schema columns
These were probably copied in by accident.

From: Clément Prévost <prevostclement@gmail.com>
2016-08-03 13:50:13 -04:00
Peter Eisentraut 69bdfc4090 doc: Change recommendation to put NOTIFY into a rule
Suggest a statement trigger instead.
2016-08-03 12:29:15 -04:00
Kevin Grittner c93d8737be Add OldSnapshotTimeMapLock to wait_event table in docs.
Ashutosh Sharma with minor fixes by me.
2016-08-03 09:58:50 -05:00
Peter Eisentraut 0a4d67b16c doc: Remove slightly confusing xreflabels
It seems clearer to refer to these tables in the normal way.
2016-08-02 22:34:45 -04:00
Peter Eisentraut 0710499195 Small wording tweaks
Dmitry Igrishin
2016-08-02 22:33:56 -04:00
Bruce Momjian a253a88594 doc: OS collation changes can break indexes
Discussion: 20160702155517.GD18610@momjian.us

Reviewed-by: Christoph Berg

Backpatch-through: 9.1
2016-08-02 17:13:10 -04:00
Peter Eisentraut e9888c2a48 doc: Whitespace fixes in man pages 2016-08-02 12:35:35 -04:00
Bruce Momjian 878bd9accb pg_rewind docs: clarify handling of remote servers 2016-08-01 12:52:22 -04:00
Fujii Masao 74d8c95b74 Fix pg_basebackup so that it accepts 0 as a valid compression level.
The help message for pg_basebackup specifies that the numbers 0 through 9
are accepted as valid values of -Z option. But, previously -Z 0 was rejected
as an invalid compression level.

Per discussion, it's better to make pg_basebackup treat 0 as valid
compression level meaning no compression, like pg_dump.

Back-patch to all supported versions.

Reported-By: Jeff Janes
Reviewed-By: Amit Kapila
Discussion: CAMkU=1x+GwjSayc57v6w87ij6iRGFWt=hVfM0B64b1_bPVKRqg@mail.gmail.com
2016-08-01 17:36:14 +09:00
Tom Lane 11653cd87f Doc: remove claim that hash index creation depends on effective_cache_size.
This text was added by commit ff213239c, and not long thereafter obsoleted
by commit 4adc2f72a (which made the test depend on NBuffers instead); but
nobody noticed the need for an update.  Commit 9563d5b5e adds some further
dependency on maintenance_work_mem, but the existing verbiage seems to
cover that with about as much precision as we really want here.  Let's
just take it all out rather than leaving ourselves open to more errors of
omission in future.  (That solution makes this change back-patchable, too.)

Noted by Peter Geoghegan.

Discussion: <CAM3SWZRVANbj9GA9j40fAwheQCZQtSwqTN1GBTVwRrRbmSf7cg@mail.gmail.com>
2016-07-31 18:32:34 -04:00
Bruce Momjian 6335c80ef4 doc: improve wording of Error Message Style Guide
Reported-by: Daniel Gustafsson

Discussion: 48DB4EDA-96F8-4B2F-99C4-110900FC7540@yesql.se

Author: Daniel Gustafsson
2016-07-30 21:34:28 -04:00
Bruce Momjian 9e765bb10f pgbench docs: fix incorrect "last two" fields text
Reported-by: Alexander Law

Discussion: 5786638C.8080508@gmail.com

Backpatch-through: 9.4
2016-07-30 16:59:34 -04:00
Bruce Momjian ca0c37b56f docs: properly capitalize and space kB, MB, GB, TB 2016-07-30 12:27:39 -04:00
Peter Eisentraut 5676da2d01 Documentation spell checking and markup improvements 2016-07-28 22:46:15 -04:00
Tom Lane 46b773d4fe Improve documentation about CREATE TABLE ... LIKE.
The docs failed to explain that LIKE INCLUDING INDEXES would not preserve
the names of indexes and associated constraints.  Also, it wasn't mentioned
that EXCLUDE constraints would be copied by this option.  The latter
oversight seems enough of a documentation bug to justify back-patching.

In passing, do some minor copy-editing in the same area, and add an entry
for LIKE under "Compatibility", since it's not exactly a faithful
implementation of the standard's feature.

Discussion: <20160728151154.AABE64016B@smtp.hushmail.com>
2016-07-28 13:26:58 -04:00
Fujii Masao de8c92e6ca Fix incorrect description of udt_privileges view in documentation.
The description of udt_privileges view contained an incorrect copy-pasted word.

Back-patch to 9.2 where udt_privileges view was added.

Author: Alexander Law
2016-07-28 22:34:42 +09:00
Tom Lane 4452000f31 Fix constant-folding of ROW(...) IS [NOT] NULL with composite fields.
The SQL standard appears to specify that IS [NOT] NULL's tests of field
nullness are non-recursive, ie, we shouldn't consider that a composite
field with value ROW(NULL,NULL) is null for this purpose.
ExecEvalNullTest got this right, but eval_const_expressions did not,
leading to weird inconsistencies depending on whether the expression
was such that the planner could apply constant folding.

Also, adjust the docs to mention that IS [NOT] DISTINCT FROM NULL can be
used as a substitute test if a simple null check is wanted for a rowtype
argument.  That motivated reordering things so that IS [NOT] DISTINCT FROM
is described before IS [NOT] NULL.  In HEAD, I went a bit further and added
a table showing all the comparison-related predicates.

Per bug #14235.  Back-patch to all supported branches, since it's certainly
undesirable that constant-folding should change the semantics.

Report and patch by Andrew Gierth; assorted wordsmithing and revised
regression test cases by me.

Report: <20160708024746.1410.57282@wrigleys.postgresql.org>
2016-07-26 15:25:02 -04:00
Tom Lane 13bf801a25 Remove GetUserMappingId() and GetUserMappingById().
These functions were added in commits fbe5a3fb7 and a104a017f,
but commit 45639a052 removed their only callers.  Put the related
code in foreign.c back to the way it was in 9.5, to avoid pointless
cross-version diffs.

Etsuro Fujita

Patch: <d674a3f1-6b63-519c-ef3f-f3188ed6a178@lab.ntt.co.jp>
2016-07-22 11:32:23 -04:00
Magnus Hagander 094ea692ee Fix typos
Alexander Law
2016-07-20 10:39:18 +02:00
Kevin Grittner 1c15aac53f Add comment & docs about no vacuum truncation with sto.
Omission noted by Andres Freund.
2016-07-19 16:25:53 -05:00
Tom Lane ade64d05a0 Doc: improve discussion of plpgsql's GET DIAGNOSTICS, other minor fixes.
9.4 added a second description of GET DIAGNOSTICS that was totally
independent of the existing one, resulting in each description lying to the
extent that it claimed the set of status items it described was complete.
Fix that, and do some minor markup improvement.

Also some other small fixes per bug #14258 from Dilian Palauzov.

Discussion: <20160718181437.1414.40802@wrigleys.postgresql.org>
2016-07-18 16:52:06 -04:00
Tom Lane 82bbfc75c1 Doc: fix table of BRIN operator strategy numbers.
brin-extensibility-inclusion-table was confused in places about the
difference between strategy 4 (RTOverRight) and strategy 5 (RTRight).

Alexander Law
2016-07-18 13:32:48 -04:00
Tom Lane 18555b1323 Establish conventions about global object names used in regression tests.
To ensure that "make installcheck" can be used safely against an existing
installation, we need to be careful about what global object names
(database, role, and tablespace names) we use; otherwise we might
accidentally clobber important objects.  There's been a weak consensus that
test databases should have names including "regression", and that test role
names should start with "regress_", but we didn't have any particular rule
about tablespace names; and neither of the other rules was followed with
any consistency either.

This commit moves us a long way towards having a hard-and-fast rule that
regression test databases must have names including "regression", and that
test role and tablespace names must start with "regress_".  It's not
completely there because I did not touch some test cases in rolenames.sql
that test creation of special role names like "session_user".  That will
require some rethinking of exactly what we want to test, whereas the intent
of this patch is just to hit all the cases in which the needed renamings
are cosmetic.

There is no enforcement mechanism in this patch either, but if we don't
add one we can expect that the tests will soon be violating the convention
again.  Again, that's not such a cosmetic change and it will require
discussion.  (But I did use a quick-hack enforcement patch to find these
cases.)

Discussion: <16638.1468620817@sss.pgh.pa.us>
2016-07-17 18:42:43 -04:00
Peter Eisentraut 7482fc4600 doc: Supply XSLT template for superscript element in man pages
The default is no decoration, which looks confusing, for example on the
CREATE SEQUENCE man page.
2016-07-17 17:01:07 -04:00
Tom Lane fe03f28962 Update 9.6 release notes through today. 2016-07-16 18:39:47 -04:00
Tom Lane 745513c702 Clarify usage of clientcert authentication option.
For some reason this option wasn't discussed at all in client-auth.sgml.
Document it there, and be more explicit about its relationship to the
"cert" authentication method.  Per gripe from Srikanth Venkatesh.

I failed to resist the temptation to do some minor wordsmithing in the
same area, too.

Discussion: <20160713110357.1410.30407@wrigleys.postgresql.org>
2016-07-16 14:12:44 -04:00
Tom Lane ce150e7e0f Improve documentation about search_path for SECURITY DEFINER functions.
Clarify that the reason for recommending that pg_temp be put last is to
prevent temporary tables from capturing unqualified table names.  Per
discussion with Albe Laurenz.

Discussion: <A737B7A37273E048B164557ADEF4A58B5386C6E1@ntex2010i.host.magwien.gv.at>
2016-07-15 10:58:39 -04:00
Peter Eisentraut 3aed52a622 doc: Fix typos
From: Alexander Law <exclusion@gmail.com>
2016-07-14 22:28:58 -04:00
Tom Lane 91c0eb5040 Fix obsolete header-file reference in pg_buffercache docs.
Commit 2d0019049 moved enum ForkNumber from relfilenode.h into relpath.h,
but missed updating this documentation reference.

Alexander Law
2016-07-13 11:17:15 -04:00
Stephen Frost 42ec6c2da6 Add missing hyphen
Pointed out by Alexander Law
2016-07-13 09:17:35 -04:00
Peter Eisentraut b9fc9f7c3c Put some things in a better order in psql help 2016-07-12 18:11:45 -04:00
Peter Eisentraut d3fbd5929c doc: Fix typo
From: Alexander Law <exclusion@gmail.com>
2016-07-12 13:30:48 -04:00
Tom Lane a670c24c38 Improve output of psql's \df+ command.
Add display of proparallel (parallel-safety) when the server is >= 9.6,
and display of proacl (access privileges) for all server versions.
Minor tweak of column ordering to keep related columns together.

Michael Paquier

Discussion: <CAB7nPqTR3Vu3xKOZOYqSm-+bSZV0kqgeGAXD6w5GLbkbfd5Q6w@mail.gmail.com>
2016-07-11 12:35:08 -04:00
Peter Eisentraut 740bf396a1 doc: Update URL for PL/PHP 2016-07-11 12:10:10 -04:00
Tom Lane 769159fd39 Docs: minor improvements for documentation about plpgsql triggers.
Fabien Coelho, some further wordsmithing by me
2016-07-08 13:23:09 -04:00
Tom Lane 8ba4ccda45 Docs: improve examples about not repeating table name in UPDATE ... SET.
Alexander Law
2016-07-08 12:46:04 -04:00
Tom Lane 262c1b2e16 Docs: typo fix.
Etsuro Fujita
2016-07-08 12:40:51 -04:00
Stephen Frost e8bde9e253 Typo fix, buils -> builds
Pointed out by Alexander Law.
2016-07-08 09:26:53 -04:00
Magnus Hagander 51dc30856e Fix missing parenthesis in docs
Author: Alexander Law
2016-07-08 10:06:45 +03:00
Robert Haas d1f822e585 Clarify resource utilization of parallel query.
temp_file_limit is a per-process limit, not a per-session limit across
all cooperating parallel processes; change wording accordingly, per a
suggestion from Tom Lane.

Also, document under max_parallel_workers_per_gather the fact that each
process involved in a parallel query may use as many resources as a
separate session.  Caveat emptor.

Per a complaint from Peter Geoghegan.
2016-07-07 11:35:08 -04:00
Fujii Masao 60d50769b7 Rename pg_stat_wal_receiver.conn_info to conninfo.
Per discussion on pgsql-hackers, conninfo is better as the column name
because it's more commonly used in PostgreSQL.

Catalog version bumped due to the change of pg_proc.

Author: Michael Paquier
2016-07-07 12:59:39 +09:00
Peter Eisentraut 9b7bb106e0 doc: Fix option order in man pages and fix typos 2016-07-06 21:09:26 -04:00
Bruce Momjian b54f7a9ac9 doc: mention dependency on collation libraries
Document that index storage is dependent on the operating system's
collation library ordering, and any change in that ordering can create
invalid indexes.

Discussion: 20160617154311.GB19359@momjian.us

Backpatch-through: 9.1
2016-07-02 11:22:36 -04:00
Tom Lane 9e703987a8 Rethink the GetForeignUpperPaths API (again).
In the previous design, the GetForeignUpperPaths FDW callback hook was
called before we got around to labeling upper relations with the proper
consider_parallel flag; this meant that any upper paths created by an FDW
would be marked not-parallel-safe.  While that's probably just as well
right now, we aren't going to want it to be true forever.  Hence, abandon
the idea that FDWs should be allowed to inject upper paths before the core
code has gotten around to creating the relevant upper relation.  (Well,
actually they still can, but it's on their own heads how well it works.)
Instead, adopt the same API already designed for create_upper_paths_hook:
we call GetForeignUpperPaths after each upperrel has been created and
populated with the paths the core planner knows how to make.
2016-07-01 13:12:34 -04:00
Alvaro Herrera 9ed551e0a4 Add conninfo to pg_stat_wal_receiver
Commit b1a9bad9e7 introduced a stats view to provide insight into the
running WAL receiver, but neglected to include the connection string in
it, as reported by Michaël Paquier.  This commit fixes that omission.
(Any security-sensitive information is not disclosed).

While at it, close the mild security hole that we were exposing the
password in the connection string in shared memory.  This isn't
user-accessible, but it still looks like a good idea to avoid having the
cleartext password in memory.

Author: Michaël Paquier, Álvaro Herrera
Review by: Vik Fearing

Discussion: https://www.postgresql.org/message-id/CAB7nPqStg4M561obo7ryZ5G+fUydG4v1Ajs1xZT1ujtu+woRag@mail.gmail.com
2016-06-29 16:57:17 -04:00
Tom Lane 4242a715c3 Adjust text search documentation for recent commits.
Fix some now-obsolete statements that were overlooked in commits
6734a1cac, 3dbbd0f02, 028350f61.  Document the behavior of <0>.
Also do a little bit of rearranging and copy-editing for clarity.
2016-06-29 15:00:33 -04:00
Teodor Sigaev 73e6bea603 Document precedence of FTS operators in tsquery
Oleg Bartunov
2016-06-29 17:59:36 +03:00
Bruce Momjian 8a395e0b9a doc: add link for list-of-scalars mention
Reported-by: Manlio Perillo

Bug: 14016

Discussion: 20160311163928.6674.94707@wrigleys.postgresql.org

Reviewed-by: David G. Johnston
2016-06-28 16:16:06 -04:00
Bruce Momjian 46eafc8855 doc: update effective_io_concurrency for SSDs
SSDs are no longer exotic, so recommend a default in the hundreds for
them.
2016-06-28 16:09:15 -04:00
Bruce Momjian 8e1ad1b37c doc: remove GIN vs. GiST performance mention
This is a followup to commit 6d8b2aa83a.
2016-06-28 16:00:40 -04:00
Bruce Momjian 69769a3a6e doc: in binary mode mention, say "encoding conversion"
Used to say "character set conversion"

Reported-by: Tatsuo Ishii

Discussion: 20160618.210417.343199294611427151.t-ishii@sraoss.co.jp
2016-06-28 14:21:43 -04:00
Bruce Momjian 675684fc23 doc: remove mention of UT1 in representing time
UT1 was incorrectly specified as our time representation.  (UT1 is
astronomical time.)  We are not actually UTC either because we ignore
leap seconds.

Reported-by: Thomas Munro

Discussion: CAEepm=3-TW9PLwGZhqjSSiEQ9UzJEKE-HELQDzRE0QUSCp8dgw@mail.gmail.com
2016-06-28 13:49:37 -04:00
Robert Haas 957616dbae Fix mistakes in pg_visibility documentation.
Michael Paquier
2016-06-27 17:55:03 -04:00
Teodor Sigaev 028350f619 Make exact distance match for FTS phrase operator
Phrase operator now requires exact distance betweens lexems instead of
less-or-equal.

Per discussion c19fcfec308e6ccd952cdde9e648b505@mail.gmail.com
2016-06-27 20:41:00 +03:00
Tom Lane 2d673424fa Improve user-facing documentation for partial/parallel aggregation.
Add a section to xaggr.sgml, as we have done in the past for other
extensions to the aggregation functionality.  Assorted wordsmithing
and other minor improvements.

David Rowley and Tom Lane
2016-06-22 19:14:16 -04:00
Tom Lane f8ace5477e Fix type-safety problem with parallel aggregate serial/deserialization.
The original specification for this called for the deserialization function
to have signature "deserialize(serialtype) returns transtype", which is a
security violation if transtype is INTERNAL (which it always would be in
practice) and serialtype is not (which ditto).  The patch blithely overrode
the opr_sanity check for that, which was sloppy-enough work in itself,
but the indisputable reason this cannot be allowed to stand is that CREATE
FUNCTION will reject such a signature and thus it'd be impossible for
extensions to create parallelizable aggregates.

The minimum fix to make the signature type-safe is to add a second, dummy
argument of type INTERNAL.  But to lock it down a bit more and make misuse
of INTERNAL-accepting functions less likely, let's get rid of the ability
to specify a "serialtype" for an aggregate and just say that the only
useful serialtype is BYTEA --- which, in practice, is the only interesting
value anyway, due to the usefulness of the send/recv infrastructure for
this purpose.  That means we only have to allow "serialize(internal)
returns bytea" and "deserialize(bytea, internal) returns internal" as
the signatures for these support functions.

In passing fix bogus signature of int4_avg_combine, which I found thanks
to adding an opr_sanity check on combinefunc signatures.

catversion bump due to removing pg_aggregate.aggserialtype and adjusting
signatures of assorted built-in functions.

David Rowley and Tom Lane

Discussion: <27247.1466185504@sss.pgh.pa.us>
2016-06-22 16:52:41 -04:00
Tom Lane 342921078a Document that dependency tracking doesn't consider function bodies.
If there's anyplace in our SGML docs that explains this behavior, I can't
find it right at the moment.  Add an explanation in "Dependency Tracking"
which seems like the authoritative place for such a discussion.  Per
gripe from Michelle Schwan.

While at it, update this section's example of a dependency-related
error message: they last looked like that in 8.3.  And remove the
explanation of dependency updates from pre-7.3 installations, which
is probably no longer worth anybody's brain cells to read.

The bogus error message example seems like an actual documentation bug,
so back-patch to all supported branches.

Discussion: <20160620160047.5792.49827@wrigleys.postgresql.org>
2016-06-21 20:07:58 -04:00
Bruce Momjian 3557b1791b docs: clarify use of pg_rewind arguments
Specifically, --source-pgdata and --source-server.

Discussion: 20160617155108.GC19359@momjian.us

Reviewed-by: Michael Paquier
2016-06-20 11:09:21 -04:00
Magnus Hagander 4d48adc2b8 Add missing documentation of pg_roles.rolbypassrls
Noted by Lukas Fittl
2016-06-20 10:29:20 +02:00
Tom Lane 705ad7f3b5 Docs: improve description of psql's %R prompt escape sequence.
Dilian Palauzov pointed out in bug #14201 that the docs failed to mention
the possibility of %R producing '(' due to an unmatched parenthesis.

He proposed just adding that in the same style as the other options were
listed; but it seemed to me that the sentence was already nearly
unintelligible, so I rewrote it a bit more extensively.

Report: <20160619121113.5789.68274@wrigleys.postgresql.org>
2016-06-19 13:11:40 -04:00
Tom Lane a3f42e8546 Update 9.6 release notes through today. 2016-06-18 18:05:27 -04:00
Tom Lane d30d1acf90 Docs typo fix.
Guillaume Lelarge
2016-06-17 18:23:39 -04:00
Robert Haas 71d05a2c7b pg_visibility: Add pg_truncate_visibility_map function.
This requires some core changes as well so that we can properly
WAL-log the truncation.  Specifically, it changes the format of the
XLOG_SMGR_TRUNCATE WAL record, so bump XLOG_PAGE_MAGIC.

Patch by me, reviewed but not fully endorsed by Andres Freund.
2016-06-17 17:37:30 -04:00
Robert Haas ede62e56fb Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies.
If you really want to vacuum every single page in the relation,
regardless of apparent visibility status or anything else, you can use
this option.  In previous releases, this behavior could be achieved
using VACUUM (FREEZE), but because we can now recognize all-frozen
pages as not needing to be frozen again, that no longer works.  There
should be no need for routine use of this option, but maybe bugs or
disaster recovery will necessitate its use.

Patch by me, reviewed by Andres Freund.
2016-06-17 15:48:57 -04:00
Tom Lane 75be66464c Invent min_parallel_relation_size GUC to replace a hard-wired constant.
The main point of doing this is to allow the cutoff to be set very small,
even zero, to allow parallel-query behavior to be tested on relatively
small tables such as we typically use in the regression tests.  But it
might be of use to users too.  The number-of-workers scaling behavior in
create_plain_partial_paths() is pretty ad-hoc and subject to change, so
we won't expose anything about that, but the notion of not considering
parallel query at all for tables below size X seems reasonably stable.

Amit Kapila, per a suggestion from me

Discussion: <17170.1465830165@sss.pgh.pa.us>
2016-06-16 13:47:20 -04:00
Robert Haas e472ce9624 Add integrity-checking functions to pg_visibility.
The new pg_check_visible() and pg_check_frozen() functions can be used to
verify that the visibility map bits for a relation's data pages match the
actual state of the tuples on those pages.

Amit Kapila and Robert Haas, reviewed (in earlier versions) by Andres
Freund.  Additional testing help by Thomas Munro.
2016-06-15 14:33:58 -04:00
Peter Eisentraut f0688d6e6c PL/Python: Clean up extended error reporting docs and tests
Format the example and test code more to Python style standards.
Improve whitespace.  Improve documentation formatting.
2016-06-15 10:34:11 -04:00
Bruce Momjian fab9d1da4a document when PREPARE uses generic plans
Also explain how generic plans are created.
Link to PREPARE docs from wire-protocol prepare docs.

Reported-by: Jonathan Rogers

Discussion: https://www.postgresql.org/message-id/flat/561E749D.4090301%40socialserve.com
2016-06-14 16:11:48 -04:00
Peter Eisentraut 020140d84d PL/Python: Rename new keyword arguments of plpy.error() etc.
Rename schema -> schema_name etc. to remain consistent with C API and
PL/pgSQL.
2016-06-11 19:27:49 -04:00
Andres Freund 4bc0f165cb Change default of backend_flush_after GUC to 0 (disabled).
While beneficial, both for throughput and average/worst case latency, in
a significant number of workloads, there are other workloads in which
backend_flush_after can cause significant performance regressions in
comparison to < 9.6 releases. The regression is most likely when the hot
data set is bigger than shared buffers, but significantly smaller than
the operating system's page cache.

I personally think that the benefit of enabling backend flush control is
considerably bigger than the potential downsides, but a fair argument
can be made that not regressing is more important than improving
performance/latency. As the latter is the consensus, change the default
to 0.

The other settings introduced in 428b1d6b2 do not have the same
potential for regressions, so leave them enabled.

Benchmarks leading up to changing the default have been performed by
Mithun Cy, Ashutosh Sharma and Robert Haas.

Discussion: CAD__OuhPmc6XH=wYRm_+Q657yQE88DakN4=Ybh2oveFasHkoeA@mail.gmail.com
2016-06-10 15:31:11 -07:00
Tom Lane 7feb60c1bb Clarify documentation of ceil/ceiling/floor functions.
Document these as "nearest integer >= argument" and "nearest integer <=
argument", which will hopefully be less confusing than the old formulation.
New wording is from Matlab via Dean Rasheed.

I changed the pg_description entries as well as the SGML docs.  In the
back branches, this will only affect installations initdb'd in the future,
but it should be harmless otherwise.

Discussion: <CAEZATCW3yzJo-NMSiQs5jXNFbTsCEftZS-Og8=FvFdiU+kYuSA@mail.gmail.com>
2016-06-09 11:58:00 -04:00
Robert Haas c9ce4a1c61 Eliminate "parallel degree" terminology.
This terminology provoked widespread complaints.  So, instead, rename
the GUC max_parallel_degree to max_parallel_workers_per_gather
(leaving room for a possible future GUC max_parallel_workers that acts
as a system-wide limit), and rename the parallel_degree reloption to
parallel_workers.  Rename structure members to match.

These changes create a dump/restore hazard for users of PostgreSQL
9.6beta1 who have set the reloption (or applied the GUC using ALTER
USER or ALTER DATABASE).
2016-06-09 10:00:26 -04:00
Tom Lane 6581e930a8 Polish the documentation concerning phrase text search.
Fix grammar, improve examples, etc.

I did not attempt to document the current behavior concerning distance-zero
matches, because I think that's broken and needs to change, so I'm not
going to use up brain cells figuring out how to explain how it works now.
One way or the other, there's still more to write here.
2016-06-09 00:30:59 -04:00
Robert Haas f721e94b5f Fix typo.
Amit Langote
2016-06-08 08:37:06 -04:00
Alvaro Herrera a6dacf6bbb Fix thinko in description of table_name parameter
Commit 6820094d1 mixed up types of parent object (table) with type of
sub-object being commented on.  Noticed while fixing docs for
COMMENT ON ACCESS METHOD.

Backpatch to 9.5, like that commit.
2016-06-07 18:18:26 -04:00
Alvaro Herrera 4f04b66f97 Fix loose ends for SQL ACCESS METHOD objects
COMMENT ON ACCESS METHOD was missing; add it, along psql tab-completion
support for it.

psql was also missing a way to list existing access methods; the new \dA
command does that.

Also add tab-completion support for DROP ACCESS METHOD.

Author: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAB7nPqTzdZdu8J7EF8SXr_R2U5bSUUYNOT3oAWBZdEoggnwhGA@mail.gmail.com
2016-06-07 17:59:34 -04:00
Peter Eisentraut df7cc3976d doc: Update wording about direct system catalog manipulation
It was previously suggested that "esoteric" operations such as creating
a new access method would require direct manipulation of the system
catalogs, but that example has gone away, and I can't think of a new one
to replace it, so just put in some weasel wording.
2016-06-07 14:18:55 -04:00
Peter Eisentraut 79616ae73b doc: Fix typo 2016-06-07 14:18:55 -04:00