Skip to content
Merged
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
f17441c
Invent qsort_interruptible().
tglsfdc Jul 12, 2022
f794567
Plug memory leak
alvherre Jul 13, 2022
da414c1
doc: mention the pg_locks lock names in parentheses
bmomjian Jul 14, 2022
74f5d5d
doc: mention that INSERT can block because of unique indexes
bmomjian Jul 14, 2022
0aba415
doc: clarify that "excluded" ON CONFLICT is a single row
bmomjian Jul 14, 2022
38c337c
doc: clarify the behavior of identically-named savepoints
bmomjian Jul 14, 2022
01ebb9b
doc: add documentation about ecpg Oracle-compatibility mode
bmomjian Jul 14, 2022
e022516
pg_upgrade doc: mention that replication slots must be recreated
bmomjian Jul 14, 2022
a6263f1
doc: clarify how dropping of extensions affects dependent objs.
bmomjian Jul 14, 2022
83f45de
docs: make monitoring "phases" table titles consistent
bmomjian Jul 15, 2022
1510390
Clarify that pg_dump takes ACCESS SHARE lock
j-naylor Jul 1, 2022
54dc4b3
Fix omissions in support for the "regcollation" type.
tglsfdc Jul 17, 2022
3092803
pg_upgrade: Adjust quoting style in message to match guidelines
petere Jul 18, 2022
c709cba
Re-add SPICleanup for ABI compatibility in stable branch
petere Jul 18, 2022
8c064cb
Fix ruleutils issues with dropped cols in functions-returning-composite.
tglsfdc Jul 21, 2022
f7685f8
doc: clarify that auth. names are lower case and case-sensitive
bmomjian Jul 21, 2022
9d7156a
doc: use wording "restore" instead of "reload" of dumps
bmomjian Jul 21, 2022
09e6cc1
postgres_fdw: Fix bug in checking of return value of PQsendQuery().
MasaoFujii Jul 21, 2022
558b83e
Fix get_dirent_type() for Windows junction points.
macdice Jul 22, 2022
ae96ac7
Doc: improve documentation about random().
tglsfdc Jul 23, 2022
27da795
Fix ReadRecentBuffer for local buffers.
hlinnaka Jul 25, 2022
f7a4e5b
Allow "in place" tablespaces.
alvherre Jul 27, 2022
48b63e9
Fix get_dirent_type() for symlinks on MinGW/MSYS.
macdice Jul 28, 2022
664598b
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
23 changes: 16 additions & 7 deletions contrib/pax_storage/src/test/regress/expected/create_view.out
Original file line number Diff line number Diff line change
Expand Up @@ -1551,16 +1551,25 @@ select * from tt14v;
begin;
-- this perhaps should be rejected, but it isn't:
alter table tt14t drop column f3;
-- f3 is still in the view ...
-- column f3 is still in the view, sort of ...
select pg_get_viewdef('tt14v', true);
pg_get_viewdef
--------------------------------
SELECT t.f1, +
t.f3, +
t.f4 +
FROM tt14f() t(f1, f3, f4);
pg_get_viewdef
---------------------------------
SELECT t.f1, +
t."?dropped?column?" AS f3,+
t.f4 +
FROM tt14f() t(f1, f4);
(1 row)

-- ... and you can even EXPLAIN it ...
explain (verbose, costs off) select * from tt14v;
QUERY PLAN
----------------------------------------
Function Scan on testviewschm2.tt14f t
Output: t.f1, t.f3, t.f4
Function Call: tt14f()
(3 rows)

-- but will fail at execution
select f1, f4 from tt14v;
f1 | f4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,16 +1550,25 @@ select * from tt14v;
begin;
-- this perhaps should be rejected, but it isn't:
alter table tt14t drop column f3;
-- f3 is still in the view ...
-- column f3 is still in the view, sort of ...
select pg_get_viewdef('tt14v', true);
pg_get_viewdef
--------------------------------
SELECT t.f1, +
t.f3, +
t.f4 +
FROM tt14f() t(f1, f3, f4);
pg_get_viewdef
---------------------------------
SELECT t.f1, +
t."?dropped?column?" AS f3,+
t.f4 +
FROM tt14f() t(f1, f4);
(1 row)

-- ... and you can even EXPLAIN it ...
explain (verbose, costs off) select * from tt14v;
QUERY PLAN
----------------------------------------
Function Scan on testviewschm2.tt14f t
Output: t.f1, t.f3, t.f4
Function Call: tt14f()
(3 rows)

-- but will fail at execution
select f1, f4 from tt14v;
f1 | f4
Expand Down
4 changes: 3 additions & 1 deletion contrib/pax_storage/src/test/regress/sql/create_view.sql
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ begin;
-- this perhaps should be rejected, but it isn't:
alter table tt14t drop column f3;

-- f3 is still in the view ...
-- column f3 is still in the view, sort of ...
select pg_get_viewdef('tt14v', true);
-- ... and you can even EXPLAIN it ...
explain (verbose, costs off) select * from tt14v;
-- but will fail at execution
select f1, f4 from tt14v;
select * from tt14v;
Expand Down
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
Loading
Loading