Skip to content

Commit 39ebb24

Browse files
authored
Merge pull request #160 from postgres/master
Sync Fork from Upstream Repo
2 parents 66ea795 + 86a1aae commit 39ebb24

File tree

160 files changed

+1304
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+1304
-387
lines changed

doc/src/sgml/bki.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
<filename>reformat_dat_file.pl</filename> can be adapted to perform
670670
many kinds of bulk changes. Look for its block comments showing where
671671
one-off code can be inserted. In the following example, we are going
672-
to consolidate two boolean fields in <structname>pg_proc</structname>
672+
to consolidate two Boolean fields in <structname>pg_proc</structname>
673673
into a char field:
674674

675675
<orderedlist>

doc/src/sgml/config.sgml

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,7 +3141,7 @@ include_dir 'conf.d'
31413141
</term>
31423142
<listitem>
31433143
<para>
3144-
This parameter enables compression of WAL using the specified
3144+
This parameter enables compression of WAL using the specified
31453145
compression method.
31463146
When enabled, the <productname>PostgreSQL</productname>
31473147
server compresses full page images written to WAL when
@@ -8434,6 +8434,68 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
84348434
</listitem>
84358435
</varlistentry>
84368436

8437+
<varlistentry id="guc-transaction-isolation" xreflabel="transaction_isolation">
8438+
<term><varname>transaction_isolation</varname> (<type>enum</type>)
8439+
<indexterm>
8440+
<primary>transaction isolation level</primary>
8441+
</indexterm>
8442+
<indexterm>
8443+
<primary><varname>transaction_isolation</varname> configuration parameter</primary>
8444+
</indexterm>
8445+
</term>
8446+
<listitem>
8447+
<para>
8448+
This parameter reflects the current transaction's isolation level.
8449+
At the beginning of each transaction, it is set to the current value
8450+
of <xref linkend="guc-default-transaction-isolation"/>.
8451+
Any subsequent attempt to change it is equivalent to a <xref
8452+
linkend="sql-set-transaction"/> command.
8453+
</para>
8454+
</listitem>
8455+
</varlistentry>
8456+
8457+
<varlistentry id="guc-transaction-read-only" xreflabel="transaction_read_only">
8458+
<term><varname>transaction_read_only</varname> (<type>boolean</type>)
8459+
<indexterm>
8460+
<primary>read-only transaction</primary>
8461+
<secondary>setting default</secondary>
8462+
</indexterm>
8463+
<indexterm>
8464+
<primary><varname>transaction_read_only</varname> configuration parameter</primary>
8465+
</indexterm>
8466+
</term>
8467+
<listitem>
8468+
<para>
8469+
This parameter reflects the current transaction's read-only status.
8470+
At the beginning of each transaction, it is set to the current value
8471+
of <xref linkend="guc-default-transaction-read-only"/>.
8472+
Any subsequent attempt to change it is equivalent to a <xref
8473+
linkend="sql-set-transaction"/> command.
8474+
</para>
8475+
</listitem>
8476+
</varlistentry>
8477+
8478+
<varlistentry id="guc-transaction-deferrable" xreflabel="transaction_deferrable">
8479+
<term><varname>transaction_deferrable</varname> (<type>boolean</type>)
8480+
<indexterm>
8481+
<primary>deferrable transaction</primary>
8482+
<secondary>setting default</secondary>
8483+
</indexterm>
8484+
<indexterm>
8485+
<primary><varname>transaction_deferrable</varname> configuration parameter</primary>
8486+
</indexterm>
8487+
</term>
8488+
<listitem>
8489+
<para>
8490+
This parameter reflects the current transaction's deferrability status.
8491+
At the beginning of each transaction, it is set to the current value
8492+
of <xref linkend="guc-default-transaction-deferrable"/>.
8493+
Any subsequent attempt to change it is equivalent to a <xref
8494+
linkend="sql-set-transaction"/> command.
8495+
</para>
8496+
</listitem>
8497+
</varlistentry>
8498+
84378499

84388500
<varlistentry id="guc-session-replication-role" xreflabel="session_replication_role">
84398501
<term><varname>session_replication_role</varname> (<type>enum</type>)
@@ -8741,7 +8803,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
87418803
</term>
87428804
<listitem>
87438805
<para>
8744-
Specifies the maximum age (in transactions) that a table's
8806+
Specifies the maximum age (in multixacts) that a table's
87458807
<structname>pg_class</structname>.<structfield>relminmxid</structfield>
87468808
field can attain before <command>VACUUM</command> takes
87478809
extraordinary measures to avoid system-wide multixact ID
@@ -10913,7 +10975,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
1091310975
<productname>PostgreSQL</productname> will automatically remove
1091410976
temporary files after a backend crash. If disabled, the files will be
1091510977
retained and may be used for debugging, for example. Repeated crashes
10916-
may however result in accumulation of useless files. This parameter
10978+
may however result in accumulation of useless files. This parameter
1091710979
can only be set in the <filename>postgresql.conf</filename> file or on
1091810980
the server command line.
1091910981
</para>

doc/src/sgml/fdwhandler.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ AddForeignUpdateTargets(PlannerInfo *root,
461461
<structfield>vartype</structfield> = <type>RECORD</type>,
462462
and <literal>wholerow<replaceable>N</replaceable></literal>
463463
for a whole-row <structname>Var</structname> with
464-
<structfield>vartype</structfield> equal to the table's declared rowtype.
464+
<structfield>vartype</structfield> equal to the table's declared row type.
465465
Re-use these names when you can (the planner will combine duplicate
466466
requests for identical junk columns). If you need another kind of
467467
junk column besides these, it might be wise to choose a name prefixed

doc/src/sgml/func.sgml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,16 +988,23 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
988988
<returnvalue>double precision</returnvalue>
989989
</para>
990990
<para>
991-
Exponentiation (unlike typical mathematical practice, multiple uses of
992-
<literal>^</literal> will associate left to right)
991+
Exponentiation
993992
</para>
994993
<para>
995994
<literal>2 ^ 3</literal>
996995
<returnvalue>8</returnvalue>
997996
</para>
997+
<para>
998+
Unlike typical mathematical practice, multiple uses of
999+
<literal>^</literal> will associate left to right by default:
1000+
</para>
9981001
<para>
9991002
<literal>2 ^ 3 ^ 3</literal>
10001003
<returnvalue>512</returnvalue>
1004+
</para>
1005+
<para>
1006+
<literal>2 ^ (3 ^ 3)</literal>
1007+
<returnvalue>134217728</returnvalue>
10011008
</para></entry>
10021009
</row>
10031010

@@ -19181,6 +19188,29 @@ SELECT NULLIF(value, '(none)') ...
1918119188
<returnvalue>{[1,2)}</returnvalue>
1918219189
</para></entry>
1918319190
</row>
19191+
19192+
<row>
19193+
<entry role="func_table_entry"><para role="func_signature">
19194+
<indexterm>
19195+
<primary>unnest</primary>
19196+
<secondary>for multirange</secondary>
19197+
</indexterm>
19198+
<function>unnest</function> ( <type>anymultirange</type> )
19199+
<returnvalue>setof anyrange</returnvalue>
19200+
</para>
19201+
<para>
19202+
Expands a multirange into a set of ranges.
19203+
The ranges are read out in storage order (ascending).
19204+
</para>
19205+
<para>
19206+
<literal>unnest('{[1,2), [3,4)}'::int4multirange)</literal>
19207+
<returnvalue></returnvalue>
19208+
<programlisting>
19209+
[1,2)
19210+
[3,4)
19211+
</programlisting>
19212+
</para></entry>
19213+
</row>
1918419214
</tbody>
1918519215
</tgroup>
1918619216
</table>
@@ -24954,8 +24984,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
2495424984
sending a <systemitem>SIGHUP</systemitem> signal to the postmaster
2495524985
process, which in turn sends <systemitem>SIGHUP</systemitem> to each
2495624986
of its children.) You can use the
24957-
<link linkend="view-pg-file-settings">pg_file_settings</link> and
24958-
<link linkend="view-pg-hba-file-rules">pg_hba_file_rules</link> views
24987+
<link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link> and
24988+
<link linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link> views
2495924989
to check the configuration files for possible errors, before reloading.
2496024990
</para></entry>
2496124991
</row>
@@ -26563,6 +26593,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
2656326593
be <literal>pg_catalog</literal>, but that is not a requirement; the
2656426594
collations could be installed into some other schema as well. The
2656526595
function returns the number of new collation objects it created.
26596+
Use of this function is restricted to superusers.
2656626597
</para></entry>
2656726598
</row>
2656826599
</tbody>

doc/src/sgml/gist.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ my_consistent(PG_FUNCTION_ARGS)
374374
<para>
375375
Depending on which operators you have included in the class, the data
376376
type of <varname>query</varname> could vary with the operator, since it will
377-
be whatever type is on the righthand side of the operator, which might
378-
be different from the indexed data type appearing on the lefthand side.
377+
be whatever type is on the right-hand side of the operator, which might
378+
be different from the indexed data type appearing on the left-hand side.
379379
(The above code skeleton assumes that only one type is possible; if
380380
not, fetching the <varname>query</varname> argument value would have to depend
381381
on the operator.) It is recommended that the SQL declaration of

doc/src/sgml/indexam.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ aminsert (Relation indexRelation,
310310
</para>
311311

312312
<para>
313-
The <literal>indexUnchanged</literal> boolean value gives a hint
313+
The <literal>indexUnchanged</literal> Boolean value gives a hint
314314
about the nature of the tuple to be indexed. When it is true,
315315
the tuple is a duplicate of some existing tuple in the index. The
316316
new tuple is a logically unchanged successor MVCC tuple version. This
@@ -493,7 +493,7 @@ amproperty (Oid index_oid, int attno,
493493
code, it's better to inspect <parameter>prop</parameter>.
494494
If the <structfield>amproperty</structfield> method returns <literal>true</literal> then
495495
it has determined the property test result: it must set <literal>*res</literal>
496-
to the boolean value to return, or set <literal>*isnull</literal>
496+
to the Boolean value to return, or set <literal>*isnull</literal>
497497
to <literal>true</literal> to return a NULL. (Both of the referenced variables
498498
are initialized to <literal>false</literal> before the call.)
499499
If the <structfield>amproperty</structfield> method returns <literal>false</literal> then

doc/src/sgml/installation.sgml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -354,31 +354,36 @@ su - postgres
354354
<title>Getting the Source</title>
355355

356356
<para>
357-
The <productname>PostgreSQL</productname> &version; sources can be obtained from the
358-
download section of our
359-
website: <ulink url="https://www.postgresql.org/download/"></ulink>. You
360-
should get a file named <filename>postgresql-&version;.tar.gz</filename>
361-
or <filename>postgresql-&version;.tar.bz2</filename>. After
362-
you have obtained the file, unpack it:
357+
The version control repository for <productname>PostgreSQL</productname>
358+
can be obtained from
359+
<ulink url="https://git.postgresql.org/gitweb/?p=postgresql.git;a=summary"></ulink>;
360+
this is the recommended way to obtain the
361+
<productname>PostgreSQL</productname> source code.
362+
You can obtain a clone of the repository by running
363363
<screen>
364-
<userinput>gunzip postgresql-&version;.tar.gz</userinput>
365-
<userinput>tar xf postgresql-&version;.tar</userinput>
364+
<userinput>git clone https://git.postgresql.org/git/postgresql.git</userinput>
366365
</screen>
367-
(Use <command>bunzip2</command> instead of <command>gunzip</command> if
368-
you have the <filename>.bz2</filename> file. Also, note that most
369-
modern versions of <command>tar</command> can unpack compressed archives
370-
directly, so you don't really need the
371-
separate <command>gunzip</command> or <command>bunzip2</command> step.)
372-
This will create a directory
373-
<filename>postgresql-&version;</filename> under the current directory
374-
with the <productname>PostgreSQL</productname> sources.
375-
Change into that directory for the rest
376-
of the installation procedure.
366+
This will create a directory <filename>postgresql</filename> under the current
367+
directory with the <productname>PostgreSQL</productname> sources.
368+
Change into that directory for the rest of the installation procedure.
369+
See <xref linkend="git"/> for further information.
377370
</para>
378371

379372
<para>
380-
You can also get the source directly from the version control repository, see
381-
<xref linkend="sourcerepo"/>.
373+
Alternatively, source code for the released versions can be obtained
374+
from the download section of our website:
375+
<ulink url="https://www.postgresql.org/ftp/source/"></ulink>.
376+
Download then
377+
<filename>postgresql-<replaceable>version</replaceable>.tar.gz</filename>
378+
or <filename>postgresql-<replaceable>version</replaceable>.tar.bz2</filename>
379+
you're interested in, then unpack it:
380+
<screen>
381+
<userinput>tar xf postgresql-<replaceable>version</replaceable>.tar.bz2</userinput>
382+
</screen>
383+
This will create a directory
384+
<filename>postgresql-<replaceable>version</replaceable></filename> under
385+
the current directory with the <productname>PostgreSQL</productname> sources.
386+
Change into that directory for the rest of the installation procedure.
382387
</para>
383388
</sect1>
384389

doc/src/sgml/json.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
617617
<para>
618618
<command>UPDATE</command> statements may use subscripting in the
619619
<literal>SET</literal> clause to modify <type>jsonb</type> values. Subscript
620-
paths must be traversible for all affected values insofar as they exist. For
620+
paths must be traversable for all affected values insofar as they exist. For
621621
instance, the path <literal>val['a']['b']['c']</literal> can be traversed all
622622
the way to <literal>c</literal> if every <literal>val</literal>,
623623
<literal>val['a']</literal>, and <literal>val['a']['b']</literal> is an

doc/src/sgml/libpq.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
17191719
There is no environment variable equivalent to this option, and no
17201720
facility for looking it up in <filename>.pgpass</filename>. It can be
17211721
used in a service file connection definition. Users with
1722-
more sophisticated uses should consider using openssl engines and
1722+
more sophisticated uses should consider using <productname>OpenSSL</productname> engines and
17231723
tools like PKCS#11 or USB crypto offload devices.
17241724
</para>
17251725
</listitem>
@@ -5032,7 +5032,7 @@ int PQflush(PGconn *conn);
50325032
<para>
50335033
While the pipeline API was introduced in
50345034
<productname>PostgreSQL</productname> 14, it is a client-side feature
5035-
which doesn't require special server support, and works on any server
5035+
which doesn't require special server support and works on any server
50365036
that supports the v3 extended query protocol.
50375037
</para>
50385038

@@ -5451,8 +5451,8 @@ int PQsendFlushRequest(PGconn *conn);
54515451
are being performed in rapid succession. There is usually less benefit
54525452
in using pipelined commands when each query takes many multiples of the client/server
54535453
round-trip time to execute. A 100-statement operation run on a server
5454-
300ms round-trip-time away would take 30 seconds in network latency alone
5455-
without pipelining; with pipelining it may spend as little as 0.3s waiting for
5454+
300 ms round-trip-time away would take 30 seconds in network latency alone
5455+
without pipelining; with pipelining it may spend as little as 0.3 s waiting for
54565456
results from the server.
54575457
</para>
54585458

@@ -7109,9 +7109,9 @@ defaultNoticeProcessor(void *arg, const char *message)
71097109
<para>
71107110
Each registered event handler is associated with two pieces of data,
71117111
known to <application>libpq</application> only as opaque <literal>void *</literal>
7112-
pointers. There is a <firstterm>passthrough</firstterm> pointer that is provided
7112+
pointers. There is a <firstterm>pass-through</firstterm> pointer that is provided
71137113
by the application when the event handler is registered with a
7114-
<structname>PGconn</structname>. The passthrough pointer never changes for the
7114+
<structname>PGconn</structname>. The pass-through pointer never changes for the
71157115
life of the <structname>PGconn</structname> and all <structname>PGresult</structname>s
71167116
generated from it; so if used, it must point to long-lived data.
71177117
In addition there is an <firstterm>instance data</firstterm> pointer, which starts
@@ -7121,9 +7121,9 @@ defaultNoticeProcessor(void *arg, const char *message)
71217121
<xref linkend="libpq-PQsetInstanceData"/>,
71227122
<xref linkend="libpq-PQresultInstanceData"/> and
71237123
<function>PQsetResultInstanceData</function> functions. Note that
7124-
unlike the passthrough pointer, instance data of a <structname>PGconn</structname>
7124+
unlike the pass-through pointer, instance data of a <structname>PGconn</structname>
71257125
is not automatically inherited by <structname>PGresult</structname>s created from
7126-
it. <application>libpq</application> does not know what passthrough
7126+
it. <application>libpq</application> does not know what pass-through
71277127
and instance data pointers point to (if anything) and will never attempt
71287128
to free them &mdash; that is the responsibility of the event handler.
71297129
</para>

doc/src/sgml/logicaldecoding.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ stream_commit_cb(...); &lt;-- commit of the streamed transaction
12511251
Similar to spill-to-disk behavior, streaming is triggered when the total
12521252
amount of changes decoded from the WAL (for all in-progress transactions)
12531253
exceeds the limit defined by <varname>logical_decoding_work_mem</varname> setting.
1254-
At that point, the largest toplevel transaction (measured by the amount of memory
1254+
At that point, the largest top-level transaction (measured by the amount of memory
12551255
currently used for decoded changes) is selected and streamed. However, in
12561256
some cases we still have to spill to disk even if streaming is enabled
12571257
because we exceed the memory threshold but still have not decoded the

0 commit comments

Comments
 (0)