Compare commits

..

No commits in common. "b6f1cca9ba3d24c8fcaa9facc30c96bcc50b37aa" and "5e4dacb9878cf71e32950e90993afd9450dab4da" have entirely different histories.

8 changed files with 28 additions and 28 deletions

View File

@ -7943,8 +7943,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
disk and apply at once after the transaction is committed on the disk and apply at once after the transaction is committed on the
publisher and received by the subscriber, publisher and received by the subscriber,
<literal>p</literal> = apply changes directly using a parallel apply <literal>p</literal> = apply changes directly using a parallel apply
worker if available (same as <literal>t</literal> if no worker is worker if available (same as 't' if no worker is available)
available)
</para></entry> </para></entry>
</row> </row>

View File

@ -96,8 +96,8 @@ extern void RegisterCustomRmgr(RmgrId rmid, const RmgrData *rmgr);
</para> </para>
<note> <note>
<para> <para>
The extension must remain in <varname>shared_preload_libraries</varname> The extension must remain in shared_preload_libraries as long as any
as long as any custom WAL records may exist in the system. Otherwise custom WAL records may exist in the system. Otherwise
<productname>PostgreSQL</productname> will not be able to apply or decode <productname>PostgreSQL</productname> will not be able to apply or decode
the custom WAL records, which may prevent the server from starting. the custom WAL records, which may prevent the server from starting.
</para> </para>

View File

@ -1506,9 +1506,9 @@ EXEC SQL TYPE serial_t IS long;
</para> </para>
<para> <para>
Any word you declare as a <literal>typedef</literal> cannot be used as Any word you declare as a typedef cannot be used as an SQL keyword
an SQL keyword in <literal>EXEC SQL</literal> commands later in the same in <literal>EXEC SQL</literal> commands later in the same program.
program. For example, this won't work: For example, this won't work:
<programlisting> <programlisting>
EXEC SQL BEGIN DECLARE SECTION; EXEC SQL BEGIN DECLARE SECTION;
typedef int start; typedef int start;

View File

@ -2743,8 +2743,8 @@ ninja install
<para> <para>
The default backend Meson uses is ninja and that should suffice for The default backend Meson uses is ninja and that should suffice for
most use cases. However, if you'd like to fully integrate with Visual most use cases. However, if you'd like to fully integrate with Visual
Studio, you can set the <replaceable>BACKEND</replaceable> to Studio, you can set the <option>BACKEND</option> to
<literal>vs</literal>. <command>vs</command>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -326,12 +326,11 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
will work but only while the connection is alive (for example a node will work but only while the connection is alive (for example a node
restart would break it). Then, the primary may delete system catalog rows restart would break it). Then, the primary may delete system catalog rows
that could be needed by the logical decoding on the standby (as it does that could be needed by the logical decoding on the standby (as it does
not know about the <literal>catalog_xmin</literal> on the standby). not know about the catalog_xmin on the standby). Existing logical slots
Existing logical slots on standby also get invalidated if on standby also get invalidated if <varname>wal_level</varname> on the
<varname>wal_level</varname> on the primary is reduced to less than primary is reduced to less than <literal>logical</literal>.
<literal>logical</literal>.
This is done as soon as the standby detects such a change in the WAL stream. This is done as soon as the standby detects such a change in the WAL stream.
It means that, for walsenders that are lagging (if any), some WAL records up It means that, for walsenders which are lagging (if any), some WAL records up
to the <varname>wal_level</varname> parameter change on the primary won't be to the <varname>wal_level</varname> parameter change on the primary won't be
decoded. decoded.
</para> </para>

View File

@ -2437,12 +2437,11 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<term>Int32</term> <term>Int32</term>
<listitem> <listitem>
<para> <para>
The standby's current global <literal>xmin</literal>, excluding the The standby's current global xmin, excluding the catalog_xmin from any
<literal>catalog_xmin</literal> from any replication slots. If both replication slots. If both this value and the following
this value and the following <literal>catalog_xmin</literal> catalog_xmin are 0 this is treated as a notification that hot standby
are 0, this is treated as a notification that hot standby feedback feedback will no longer be sent on this connection. Later non-zero
will no longer be sent on this connection. Later non-zero messages messages may reinitiate the feedback mechanism.
may reinitiate the feedback mechanism.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -2451,7 +2450,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<term>Int32</term> <term>Int32</term>
<listitem> <listitem>
<para> <para>
The epoch of the global <literal>xmin</literal> xid on the standby. The epoch of the global xmin xid on the standby.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -2460,9 +2459,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<term>Int32</term> <term>Int32</term>
<listitem> <listitem>
<para> <para>
The lowest <literal>catalog_xmin</literal> of any replication The lowest catalog_xmin of any replication slots on the standby. Set to 0
slots on the standby. Set to 0 if no <literal>catalog_xmin</literal> if no catalog_xmin exists on the standby or if hot standby feedback is being
exists on the standby or if hot standby feedback is being
disabled. disabled.
</para> </para>
</listitem> </listitem>
@ -2472,7 +2470,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<term>Int32</term> <term>Int32</term>
<listitem> <listitem>
<para> <para>
The epoch of the <literal>catalog_xmin</literal> xid on the standby. The epoch of the catalog_xmin xid on the standby.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -70,7 +70,7 @@
</para> </para>
<para> <para>
In addition to <literal>vxid</literal> and <literal>xid</literal>, In addition to <literal>vxid</literal> and <type>xid</type>,
prepared transactions are also assigned Global Transaction prepared transactions are also assigned Global Transaction
Identifiers (<acronym>GID</acronym>). GIDs are string literals up Identifiers (<acronym>GID</acronym>). GIDs are string literals up
to 200 bytes long, which must be unique amongst other currently to 200 bytes long, which must be unique amongst other currently
@ -121,7 +121,7 @@
<para> <para>
Subtransactions can be started explicitly using the Subtransactions can be started explicitly using the
<command>SAVEPOINT</command> command, but can also be started in <command>SAVEPOINT</command> command, but can also be started in
other ways, such as PL/pgSQL's <literal>EXCEPTION</literal> clause. other ways, such as PL/pgSQL's <command>EXCEPTION</command> clause.
PL/Python and PL/TCL also support explicit subtransactions. PL/Python and PL/TCL also support explicit subtransactions.
Subtransactions can also be started from other subtransactions. Subtransactions can also be started from other subtransactions.
The top-level transaction and its child subtransactions form a The top-level transaction and its child subtransactions form a

View File

@ -500,7 +500,7 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
/* invalidate non-timetravel entries */ /* invalidate non-timetravel entries */
InvalidateSystemCaches(); InvalidateSystemCaches();
/* Decode records until we reach the requested target */ /* Decode at least one record, until we run out of records */
while (ctx->reader->EndRecPtr < moveto) while (ctx->reader->EndRecPtr < moveto)
{ {
char *errm = NULL; char *errm = NULL;
@ -523,6 +523,10 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
if (record) if (record)
LogicalDecodingProcessRecord(ctx, ctx->reader); LogicalDecodingProcessRecord(ctx, ctx->reader);
/* Stop once the requested target has been reached */
if (moveto <= ctx->reader->EndRecPtr)
break;
CHECK_FOR_INTERRUPTS(); CHECK_FOR_INTERRUPTS();
} }