Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e8289c9
Invent qsort_interruptible().
tglsfdc Jul 12, 2022
387f1a2
Plug memory leak
alvherre Jul 13, 2022
375a81f
doc: mention the pg_locks lock names in parentheses
bmomjian Jul 14, 2022
d51b43f
doc: mention that INSERT can block because of unique indexes
bmomjian Jul 14, 2022
a55a32e
doc: clarify that "excluded" ON CONFLICT is a single row
bmomjian Jul 14, 2022
808f50f
doc: clarify the behavior of identically-named savepoints
bmomjian Jul 14, 2022
a44badb
doc: add documentation about ecpg Oracle-compatibility mode
bmomjian Jul 14, 2022
f0327ea
pg_upgrade doc: mention that replication slots must be recreated
bmomjian Jul 14, 2022
32ba67c
doc: clarify how dropping of extensions affects dependent objs.
bmomjian Jul 14, 2022
0236817
docs: make monitoring "phases" table titles consistent
bmomjian Jul 15, 2022
093db68
Clarify that pg_dump takes ACCESS SHARE lock
j-naylor Jul 1, 2022
4c3826f
Fix omissions in support for the "regcollation" type.
tglsfdc Jul 17, 2022
406e65c
pg_upgrade: Adjust quoting style in message to match guidelines
petere Jul 18, 2022
eebbc27
Re-add SPICleanup for ABI compatibility in stable branch
petere Jul 18, 2022
3418a16
Fix ruleutils issues with dropped cols in functions-returning-composite.
tglsfdc Jul 21, 2022
28df1e7
doc: clarify that auth. names are lower case and case-sensitive
bmomjian Jul 21, 2022
dc87622
doc: use wording "restore" instead of "reload" of dumps
bmomjian Jul 21, 2022
1ffb440
postgres_fdw: Fix bug in checking of return value of PQsendQuery().
MasaoFujii Jul 21, 2022
359a61d
Fix get_dirent_type() for Windows junction points.
macdice Jul 22, 2022
975f611
Doc: improve documentation about random().
tglsfdc Jul 23, 2022
dc4c67a
Fix ReadRecentBuffer for local buffers.
hlinnaka Jul 25, 2022
ed1f8a2
Allow "in place" tablespaces.
alvherre Jul 27, 2022
ef50ea4
Fix get_dirent_type() for symlinks on MinGW/MSYS.
macdice Jul 28, 2022
9da58ba
place allow_in_place_tablespaces in sync_guc_name
reshke Feb 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/postgres_fdw/postgres_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -7167,7 +7167,7 @@ fetch_more_data_begin(AsyncRequest *areq)
snprintf(sql, sizeof(sql), "FETCH %d FROM c%u",
fsstate->fetch_size, fsstate->cursor_number);

if (PQsendQuery(fsstate->conn, sql) < 0)
if (!PQsendQuery(fsstate->conn, sql))
pgfdw_report_error(ERROR, NULL, fsstate->conn, false, fsstate->query);

/* Remember that the request is in process */
Expand Down
4 changes: 3 additions & 1 deletion doc/src/sgml/client-auth.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ hostnogssenc <replaceable>database</replaceable> <replaceable>user</replaceabl
<para>
Specifies the authentication method to use when a connection matches
this record. The possible choices are summarized here; details
are in <xref linkend="auth-methods"/>.
are in <xref linkend="auth-methods"/>. All the options
are lower case and treated case sensitively, so even acronyms like
<literal>ldap</literal> must be specified as lower case.

<variablelist>
<varlistentry>
Expand Down
19 changes: 19 additions & 0 deletions doc/src/sgml/config.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -10458,6 +10458,25 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
</para>

<variablelist>
<varlistentry id="guc-allow-in-place-tablespaces" xreflabel="allow_in_place_tablespaces">
<term><varname>allow_in_place_tablespaces</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>allow_in_place_tablespaces</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Allows tablespaces to be created as directories inside
<filename>pg_tblspc</filename>, when an empty location string
is provided to the <command>CREATE TABLESPACE</command> command. This
is intended to allow testing replication scenarios where primary and
standby servers are running on the same machine. Such directories
are likely to confuse backup tools that expect to find only symbolic
links in that location. Only superusers can change this setting.
</para>
</listitem>
</varlistentry>

<varlistentry id="guc-allow-system-table-mods" xreflabel="allow_system_table_mods">
<term><varname>allow_system_table_mods</varname> (<type>boolean</type>)
<indexterm>
Expand Down
10 changes: 5 additions & 5 deletions doc/src/sgml/ddl.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ CREATE TABLE products (
tests, it cannot guarantee that the database will not reach a state
in which the constraint condition is false (due to subsequent changes
of the other row(s) involved). This would cause a database dump and
reload to fail. The reload could fail even when the complete
restore to fail. The restore could fail even when the complete
database state is consistent with the constraint, due to rows not
being loaded in an order that will satisfy the constraint. If
possible, use <literal>UNIQUE</literal>, <literal>EXCLUDE</literal>,
Expand All @@ -569,10 +569,10 @@ CREATE TABLE products (
If what you desire is a one-time check against other rows at row
insertion, rather than a continuously-maintained consistency
guarantee, a custom <link linkend="triggers">trigger</link> can be used
to implement that. (This approach avoids the dump/reload problem because
to implement that. (This approach avoids the dump/restore problem because
<application>pg_dump</application> does not reinstall triggers until after
reloading data, so that the check will not be enforced during a
dump/reload.)
restoring data, so that the check will not be enforced during a
dump/restore.)
</para>
</note>

Expand All @@ -594,7 +594,7 @@ CREATE TABLE products (
function. <productname>PostgreSQL</productname> does not disallow
that, but it will not notice if there are rows in the table that now
violate the <literal>CHECK</literal> constraint. That would cause a
subsequent database dump and reload to fail.
subsequent database dump and restore to fail.
The recommended way to handle such a change is to drop the constraint
(using <command>ALTER TABLE</command>), adjust the function definition,
and re-add the constraint, thereby rechecking it against all table rows.
Expand Down
39 changes: 38 additions & 1 deletion doc/src/sgml/ecpg.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
</programlisting>
The indicator variable <varname>val_ind</varname> will be zero if
the value was not null, and it will be negative if the value was
null.
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
Oracle-specific behavior.)
</para>

<para>
Expand Down Expand Up @@ -9801,6 +9802,42 @@ risnull(CINTTYPE, (char *) &i);
</sect2>
</sect1>

<sect1 id="ecpg-oracle-compat">
<title><productname>Oracle</productname> Compatibility Mode</title>
<para>
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
compatibility mode</firstterm>. If this mode is active, it tries to
behave as if it were Oracle <productname>Pro*C</productname>.
</para>

<para>
Specifically, this mode changes <command>ecpg</command> in three ways:

<itemizedlist>
<listitem>
<para>
Pad character arrays receiving character string types with
trailing spaces to the specified length
</para>
</listitem>

<listitem>
<para>
Zero byte terminate these character arrays, and set the indicator
variable if truncation occurs
</para>
</listitem>

<listitem>
<para>
Set the null indicator to <literal>-1</literal> when character
arrays receive empty character string types
</para>
</listitem>
</itemizedlist>
</para>
</sect1>

<sect1 id="ecpg-develop">
<title>Internals</title>

Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/extend.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ SET LOCAL search_path TO @extschema@, pg_temp;
<application>pg_dump</application>. But that behavior is undesirable for a
configuration table; any data changes made by the user need to be
included in dumps, or the extension will behave differently after a dump
and reload.
and restore.
</para>

<indexterm>
Expand Down
3 changes: 3 additions & 0 deletions doc/src/sgml/func.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,9 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
subsequent <function>random()</function> calls in the current session
can be repeated by re-issuing <function>setseed()</function> with the same
argument.
Without any prior <function>setseed()</function> call in the same
session, the first <function>random()</function> call obtains a seed
from a platform-dependent source of random bits.
</para>

<para>
Expand Down
4 changes: 2 additions & 2 deletions doc/src/sgml/monitoring.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -5607,7 +5607,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
</table>

<table id="analyze-phases">
<title>ANALYZE phases</title>
<title>ANALYZE Phases</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
Expand Down Expand Up @@ -6537,7 +6537,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
</table>

<table id="basebackup-phases">
<title>Base backup phases</title>
<title>Base Backup Phases</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
Expand Down
16 changes: 8 additions & 8 deletions doc/src/sgml/mvcc.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
<title>Table-Level Lock Modes</title>
<varlistentry>
<term>
<literal>ACCESS SHARE</literal>
<literal>ACCESS SHARE</literal> (<literal>AccessShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -893,7 +893,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ROW SHARE</literal>
<literal>ROW SHARE</literal> (<literal>RowShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -914,7 +914,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ROW EXCLUSIVE</literal>
<literal>ROW EXCLUSIVE</literal> (<literal>RowExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -936,7 +936,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE UPDATE EXCLUSIVE</literal>
<literal>SHARE UPDATE EXCLUSIVE</literal> (<literal>ShareUpdateExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -962,7 +962,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE</literal>
<literal>SHARE</literal> (<literal>ShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -982,7 +982,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE ROW EXCLUSIVE</literal>
<literal>SHARE ROW EXCLUSIVE</literal> (<literal>ShareRowExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -1004,7 +1004,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>EXCLUSIVE</literal>
<literal>EXCLUSIVE</literal> (<literal>ExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -1026,7 +1026,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ACCESS EXCLUSIVE</literal>
<literal>ACCESS EXCLUSIVE</literal> (<literal>AccessExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/perform.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;

<para>
Dump scripts generated by <application>pg_dump</application> automatically apply
several, but not all, of the above guidelines. To reload a
several, but not all, of the above guidelines. To restore a
<application>pg_dump</application> dump as quickly as possible, you need to
do a few extra things manually. (Note that these points apply while
<emphasis>restoring</emphasis> a dump, not while <emphasis>creating</emphasis> it.
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/plhandler.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
attached to a function when <varname>check_function_bodies</varname> is on.
Therefore, checks whose results might be affected by GUC parameters
definitely should be skipped when <varname>check_function_bodies</varname> is
off, to avoid false failures when reloading a dump.
off, to avoid false failures when restoring a dump.
</para>

<para>
Expand Down
6 changes: 4 additions & 2 deletions doc/src/sgml/ref/alter_function.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param
<para>
This form marks the function as dependent on the extension, or no longer
dependent on that extension if <literal>NO</literal> is specified.
A function that's marked as dependent on an extension is automatically
dropped when the extension is dropped.
A function that's marked as dependent on an extension is dropped when the
extension is dropped, even if <literal>CASCADE</literal> is not specified.
A function can depend upon multiple extensions, and will be dropped when
any one of those extensions is dropped.
</para>
</listitem>
</varlistentry>
Expand Down
7 changes: 6 additions & 1 deletion doc/src/sgml/ref/alter_procedure.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
<term><replaceable class="parameter">extension_name</replaceable></term>
<listitem>
<para>
The name of the extension that the procedure is to depend on.
This form marks the procedure as dependent on the extension, or no longer
dependent on the extension if <literal>NO</literal> is specified.
A procedure that's marked as dependent on an extension is dropped when the
extension is dropped, even if cascade is not specified.
A procedure can depend upon multiple extensions, and will be dropped when
any one of those extensions is dropped.
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/ref/alter_type.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> SET ( <replaceable
around</quote> since the original creation of the enum type). The slowdown is
usually insignificant; but if it matters, optimal performance can be
regained by dropping and recreating the enum type, or by dumping and
reloading the database.
restoring the database.
</para>
</refsect1>

Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/ref/create_domain.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ INSERT INTO tab (domcol) VALUES ((SELECT domcol FROM tab WHERE false));
function. <productname>PostgreSQL</productname> does not disallow that,
but it will not notice if there are stored values of the domain type that
now violate the <literal>CHECK</literal> constraint. That would cause a
subsequent database dump and reload to fail. The recommended way to
subsequent database dump and restore to fail. The recommended way to
handle such a change is to drop the constraint (using <command>ALTER
DOMAIN</command>), adjust the function definition, and re-add the
constraint, thereby rechecking it against stored data.
Expand Down
10 changes: 6 additions & 4 deletions doc/src/sgml/ref/drop_extension.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [

<para>
<command>DROP EXTENSION</command> removes extensions from the database.
Dropping an extension causes its component objects to be dropped as well.
Dropping an extension causes its component objects, and other explicitly
dependent routines (see <xref linkend="sql-alterroutine"/>,
the depends on extension action), to be dropped as well.
</para>

<para>
Expand Down Expand Up @@ -77,9 +79,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [
<term><literal>RESTRICT</literal></term>
<listitem>
<para>
Refuse to drop the extension if any objects depend on it (other than
its own member objects and other extensions listed in the same
<command>DROP</command> command). This is the default.
This option prevents the specified extensions from being dropped
if there exists non-extension-member objects that depends on any
the extensions. This is the default.
</para>
</listitem>
</varlistentry>
Expand Down
9 changes: 7 additions & 2 deletions doc/src/sgml/ref/insert.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
</para>

<para>
<command>INSERT</command> into tables that lack unique indexes will
not be blocked by concurrent activity. Tables with unique indexes
might block if concurrent sessions perform actions that lock or modify
rows matching the unique index values being inserted; the details
are covered in <xref linkend="index-unique-checks"/>.
<literal>ON CONFLICT</literal> can be used to specify an alternative
action to raising a unique constraint or exclusion constraint
violation error. (See <xref linkend="sql-on-conflict"/> below.)
Expand Down Expand Up @@ -176,7 +181,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
provided, it completely hides the actual name of the table.
This is particularly useful when <literal>ON CONFLICT DO UPDATE</literal>
targets a table named <varname>excluded</varname>, since that will otherwise
be taken as the name of the special table representing rows proposed
be taken as the name of the special table representing the row proposed
for insertion.
</para>
</listitem>
Expand Down Expand Up @@ -396,7 +401,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
conflict. The <literal>SET</literal> and
<literal>WHERE</literal> clauses in <literal>ON CONFLICT DO
UPDATE</literal> have access to the existing row using the
table's name (or an alias), and to rows proposed for insertion
table's name (or an alias), and to the row proposed for insertion
using the special <varname>excluded</varname> table.
<literal>SELECT</literal> privilege is required on any column in the
target table where corresponding <varname>excluded</varname>
Expand Down
Loading
Loading