summaryrefslogtreecommitdiff
path: root/doc/src/sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml')
-rw-r--r--doc/src/sgml/catalogs.sgml25
-rw-r--r--doc/src/sgml/config.sgml12
-rw-r--r--doc/src/sgml/ref/alter_subscription.sgml5
-rw-r--r--doc/src/sgml/ref/create_subscription.sgml43
-rw-r--r--doc/src/sgml/rules.sgml1
-rw-r--r--doc/src/sgml/xfunc.sgml15
6 files changed, 83 insertions, 18 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index da8a7882580..e9095bedf21 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -8096,6 +8096,31 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
<row>
<entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>submaxretention</structfield> <type>int4</type>
+ </para>
+ <para>
+ The maximum duration (in milliseconds) for which information (e.g., dead
+ tuples, commit timestamps, and origins) useful for conflict detection can
+ be retained.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>subretentionactive</structfield> <type>bool</type>
+ </para>
+ <para>
+ The retention status of information (e.g., dead tuples, commit
+ timestamps, and origins) useful for conflict detection. True if
+ <link linkend="sql-createsubscription-params-with-retain-dead-tuples"><literal>retain_dead_tuples</literal></link>
+ is enabled, and the retention duration has not exceeded
+ <link linkend="sql-createsubscription-params-with-max-retention-duration"><literal>max_retention_duration</literal></link>,
+ when defined.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
<structfield>subconninfo</structfield> <type>text</type>
</para>
<para>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 0a4b3e55ba5..2a3685f474a 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7383,6 +7383,11 @@ local0.* /var/log/postgresql
</varlistentry>
<varlistentry id="guc-debug-print-parse">
+ <term><varname>debug_print_raw_parse</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>debug_print_raw_parse</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
<term><varname>debug_print_parse</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>debug_print_parse</varname> configuration parameter</primary>
@@ -7401,8 +7406,8 @@ local0.* /var/log/postgresql
<listitem>
<para>
These parameters enable various debugging output to be emitted.
- When set, they print the resulting parse tree, the query rewriter
- output, or the execution plan for each executed query.
+ When set, they print the resulting raw parse tree, the parse tree, the query
+ rewriter output, or the execution plan for each executed query.
These messages are emitted at <literal>LOG</literal> message level, so by
default they will appear in the server log but will not be sent to the
client. You can change that by adjusting
@@ -7422,7 +7427,8 @@ local0.* /var/log/postgresql
<listitem>
<para>
When set, <varname>debug_pretty_print</varname> indents the messages
- produced by <varname>debug_print_parse</varname>,
+ produced by <varname>debug_print_raw_parse</varname>,
+ <varname>debug_print_parse</varname>,
<varname>debug_print_rewritten</varname>, or
<varname>debug_print_plan</varname>. This results in more readable
but much longer output than the <quote>compact</quote> format used when
diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml
index d48cdc76bd3..12f72ba3167 100644
--- a/doc/src/sgml/ref/alter_subscription.sgml
+++ b/doc/src/sgml/ref/alter_subscription.sgml
@@ -236,8 +236,9 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<link linkend="sql-createsubscription-params-with-run-as-owner"><literal>run_as_owner</literal></link>,
<link linkend="sql-createsubscription-params-with-origin"><literal>origin</literal></link>,
<link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>,
- <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>, and
- <link linkend="sql-createsubscription-params-with-retain-dead-tuples"><literal>retain_dead_tuples</literal></link>.
+ <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>,
+ <link linkend="sql-createsubscription-params-with-retain-dead-tuples"><literal>retain_dead_tuples</literal></link>, and
+ <link linkend="sql-createsubscription-params-with-max-retention-duration"><literal>max_retention_duration</literal></link>.
Only a superuser can set <literal>password_required = false</literal>.
</para>
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index 247c5bd2604..fc314437311 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -448,7 +448,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
If set to <literal>true</literal>, the detection of
<xref linkend="conflict-update-deleted"/> is enabled, and a physical
replication slot named <quote><literal>pg_conflict_detection</literal></quote>
- created on the subscriber to prevent the information for detecting
+ is created on the subscriber to prevent the information for detecting
conflicts from being removed.
</para>
@@ -521,6 +521,47 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</para>
</listitem>
</varlistentry>
+
+ <varlistentry id="sql-createsubscription-params-with-max-retention-duration">
+ <term><literal>max_retention_duration</literal> (<type>integer</type>)</term>
+ <listitem>
+ <para>
+ Maximum duration in milliseconds for which this subscription's apply worker
+ is allowed to retain the information useful for conflict detection when
+ <literal>retain_dead_tuples</literal> is enabled. The default value
+ is <literal>0</literal>, indicating that the information is retained
+ until it is no longer needed for detection purposes.
+ </para>
+ <para>
+ The information useful for conflict detection is no longer retained if
+ all apply workers associated with the subscriptions, where
+ <literal>retain_dead_tuples</literal> is enabled, confirm that the
+ retention duration has exceeded the
+ <literal>max_retention_duration</literal> set within the corresponding
+ subscription. The retention will not be automatically resumed unless a
+ new subscription is created with <literal>retain_dead_tuples =
+ true</literal>, or the user manually re-enables
+ <literal>retain_dead_tuples</literal>.
+ </para>
+ <para>
+ Note that overall retention will not stop if other subscriptions that
+ have a value greater than 0 for this parameter have not exceeded it,
+ or if they set this option to 0.
+ </para>
+ <para>
+ This option is effective only when
+ <literal>retain_conflict_info</literal> is enabled and the apply
+ worker associated with the subscription is active.
+ </para>
+ <warning>
+ <para>
+ Note that setting a non-zero value for this option could lead to
+ information for conflict detection being removed prematurely,
+ potentially resulting in incorrect conflict detection.
+ </para>
+ </warning>
+ </listitem>
+ </varlistentry>
</variablelist></para>
</listitem>
diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml
index 8467d961fd0..282dcd722d4 100644
--- a/doc/src/sgml/rules.sgml
+++ b/doc/src/sgml/rules.sgml
@@ -60,6 +60,7 @@
<acronym>SQL</acronym> statement where the single parts that it is
built from are stored separately. These query trees can be shown
in the server log if you set the configuration parameters
+ <varname>debug_print_raw_parse</varname>,
<varname>debug_print_parse</varname>,
<varname>debug_print_rewritten</varname>, or
<varname>debug_print_plan</varname>. The rule actions are also
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index f116d0648e5..da21ef56891 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -3759,7 +3759,7 @@ LWLockPadded *GetNamedLWLockTranche(const char *tranche_name)
<literal>shmem_request_hook</literal>. To do so, first allocate a
<literal>tranche_id</literal> by calling:
<programlisting>
-int LWLockNewTrancheId(void)
+int LWLockNewTrancheId(const char *name)
</programlisting>
Next, initialize each LWLock, passing the new
<literal>tranche_id</literal> as an argument:
@@ -3777,17 +3777,8 @@ void LWLockInitialize(LWLock *lock, int tranche_id)
</para>
<para>
- Finally, each backend using the <literal>tranche_id</literal> should
- associate it with a <literal>tranche_name</literal> by calling:
-<programlisting>
-void LWLockRegisterTranche(int tranche_id, const char *tranche_name)
-</programlisting>
- </para>
-
- <para>
- A complete usage example of <function>LWLockNewTrancheId</function>,
- <function>LWLockInitialize</function>, and
- <function>LWLockRegisterTranche</function> can be found in
+ A complete usage example of <function>LWLockNewTrancheId</function> and
+ <function>LWLockInitialize</function> can be found in
<filename>contrib/pg_prewarm/autoprewarm.c</filename> in the
<productname>PostgreSQL</productname> source tree.
</para>