Skip to content

Commit 58910ca

Browse files
author
Liudmila Mantrova
committed
DOC: updated scheduler option descriptions for multimaster clusters (PGPRO-995)
1 parent 4fc5577 commit 58910ca

File tree

2 files changed

+46
-13
lines changed

2 files changed

+46
-13
lines changed

doc/src/sgml/multimaster.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ pg_ctl -D <replaceable>datadir</replaceable> -l <replaceable>pg.log</replaceable
857857
<sect3 id="multimaster-guc-variables">
858858
<title>GUC Variables</title>
859859
<variablelist>
860-
<varlistentry><term><varname>multimaster.node_id</varname>
860+
<varlistentry id="multimaster-node-id"><term><varname>multimaster.node_id</varname>
861861
<indexterm><primary><varname>multimaster.node_id</varname></primary></indexterm></term><listitem><para>
862862
Node ID &mdash; a unique natural
863863
number identifying the node of a multi-master cluster. You must

doc/src/sgml/pgpro-scheduler.sgml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ Make sure to create the <filename>pgpro_scheduler</filename> extension for each
114114
schedule jobs, in the comma-separated format:
115115
<programlisting>
116116
<varname>schedule.database</varname> = '<replaceable>database1</>,<replaceable>database2</>'
117-
</programlisting></para>
117+
</programlisting>
118+
You can omit this step when using <filename>pgpro_scheduler</filename>
119+
on a cluster configured with <filename>multimaster</filename>.</para>
118120
</listitem>
119121
<listitem>
120122
<para>
@@ -639,7 +641,7 @@ schedule.cancel_job(<replaceable>job_id</replaceable> <type>bigint</type>);
639641
</term>
640642
<listitem>
641643
<para>
642-
Specifies whether the scheduler is enabled on your system.</para>
644+
Specifies whether <filename>pgpro_scheduler</filename> is enabled on your system.</para>
643645
<para>Default: <literal>false</literal>.
644646
</para>
645647
</listitem>
@@ -653,7 +655,16 @@ schedule.cancel_job(<replaceable>job_id</replaceable> <type>bigint</type>);
653655
</term>
654656
<listitem>
655657
<para>
656-
Specifies the list of databases for which the scheduler is enabled. Database names must be separated by commas.</para><para>Default: empty string.
658+
Specifies the databases for which <filename>pgpro_scheduler</filename> is enabled.
659+
Database names must be separated by commas.
660+
</para>
661+
<para>
662+
If <filename>pgpro_scheduler</filename> is running on a cluster configured with
663+
<filename>multimaster</filename>, the database name is derived from the
664+
<xref linkend="multimaster-conn-strings"> variable.
665+
</para>
666+
<para>
667+
Default: empty string.
657668
</para>
658669
</listitem>
659670
</varlistentry>
@@ -666,11 +677,10 @@ schedule.cancel_job(<replaceable>job_id</replaceable> <type>bigint</type>);
666677
</term>
667678
<listitem>
668679
<para>
669-
Specifies the name of a schema where the scheduler
670-
stores its tables and functions. Normally, you should
671-
not change this variable. This
672-
variable may be useful if you run <filename>pgpro_scheduler</filename>
673-
on a multi-master cluster.</para>
680+
Deprecated. Specifies the name of a schema where the scheduler
681+
stores its tables and functions.
682+
If you need to change the default schema, use <xref linkend="sql-alterextension">.
683+
</para>
674684
<para>Default: <literal>schedule</literal>.
675685
</para>
676686
</listitem>
@@ -684,10 +694,18 @@ schedule.cancel_job(<replaceable>job_id</replaceable> <type>bigint</type>);
684694
</term>
685695
<listitem>
686696
<para>
687-
Specifies the node name of your <productname>&productname;</productname> instance. Do
688-
not change or use this variable if you run a single server configuration. You may need this
689-
variable if you run <filename>pgpro_scheduler</filename>
690-
on a multi-master cluster.</para>
697+
Specifies the node name of your <productname>&productname;</productname> instance.
698+
Do not change or use this variable if you run a single-server cluster configuration.
699+
</para>
700+
<para>
701+
On a cluster configured with <filename>multimaster</filename>, the node name is
702+
derived from the <xref linkend="multimaster-node-id"> variable. For example, if
703+
<literal>multimaster.node_id = 3</literal>, the <varname>schedule.nodename</>
704+
variable is set to <literal>mtm-node-3</>. However, if you explicitly set
705+
the <varname>schedule.nodename</> variable by editing the <filename>postgresql.conf</filename>
706+
file or running the <command>ALTER</command> command, <filename>pgpro_scheduler</filename>
707+
will use the provided value, ignoring the <varname>multimaster.node_id</varname> variable.
708+
</para>
691709
<para>Default: <literal>master</literal>.
692710
</para>
693711
</listitem>
@@ -2113,6 +2131,21 @@ schedule.create_job(<parameter>dates</parameter> <type>timestamp with time zone[
21132131
<para>The number of records deleted.</para></listitem></itemizedlist>
21142132
</listitem>
21152133
</varlistentry>
2134+
2135+
<varlistentry>
2136+
<term>
2137+
<function>schedule.nodename()
2138+
</function>
2139+
<indexterm>
2140+
<primary><function>schedule.nodename()</></primary>
2141+
</indexterm>
2142+
</term>
2143+
<listitem>
2144+
<para>
2145+
Returns the current node name.
2146+
</para>
2147+
</listitem>
2148+
</varlistentry>
21162149
</variablelist>
21172150
</sect4>
21182151
<sect4 id="pgpro-scheduler-one-time-job-functions"><title>Functions for Managing One-Time Jobs</title>

0 commit comments

Comments
 (0)