Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 15a9b2e

Browse files
committed
Merge branch 'PGPROEE10' into PGPROEE10_MULTIMASTER
2 parents 4a99f34 + cf58bcd commit 15a9b2e

23 files changed

+435
-151
lines changed

contrib/mmts/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ all: multimaster.so
2525

2626

2727

28-
check: temp-install
29-
$(prove_check)
28+
#check: temp-install
29+
# $(prove_check)
3030

contrib/test_decoding/expected/ddl.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -570,16 +570,16 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
570570
table public.table_without_key: INSERT: id[integer]:2 data[integer]:2
571571
COMMIT
572572
BEGIN
573-
table public.table_without_key: DELETE: (no-tuple-data)
573+
table public.table_without_key: DELETE: id[integer]:1 data[integer]:1
574574
COMMIT
575575
BEGIN
576-
table public.table_without_key: UPDATE: id[integer]:2 data[integer]:3
576+
table public.table_without_key: UPDATE: old-key: id[integer]:2 data[integer]:2 new-tuple: id[integer]:2 data[integer]:3
577577
COMMIT
578578
BEGIN
579-
table public.table_without_key: UPDATE: id[integer]:-2 data[integer]:3
579+
table public.table_without_key: UPDATE: old-key: id[integer]:2 data[integer]:3 new-tuple: id[integer]:-2 data[integer]:3
580580
COMMIT
581581
BEGIN
582-
table public.table_without_key: UPDATE: id[integer]:2 data[integer]:3
582+
table public.table_without_key: UPDATE: old-key: id[integer]:-2 data[integer]:3 new-tuple: id[integer]:2 data[integer]:3
583583
COMMIT
584584
BEGIN
585585
table public.table_without_key: UPDATE: old-key: id[integer]:2 data[integer]:3 new-tuple: id[integer]:-2 data[integer]:3
@@ -626,19 +626,19 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
626626
table public.table_with_unique_not_null: INSERT: id[integer]:2 data[integer]:2
627627
COMMIT
628628
BEGIN
629-
table public.table_with_unique_not_null: DELETE: (no-tuple-data)
629+
table public.table_with_unique_not_null: DELETE: id[integer]:1 data[integer]:1
630630
COMMIT
631631
BEGIN
632-
table public.table_with_unique_not_null: UPDATE: id[integer]:2 data[integer]:3
632+
table public.table_with_unique_not_null: UPDATE: old-key: id[integer]:2 data[integer]:2 new-tuple: id[integer]:2 data[integer]:3
633633
COMMIT
634634
BEGIN
635-
table public.table_with_unique_not_null: UPDATE: id[integer]:-2 data[integer]:3
635+
table public.table_with_unique_not_null: UPDATE: old-key: id[integer]:2 data[integer]:3 new-tuple: id[integer]:-2 data[integer]:3
636636
COMMIT
637637
BEGIN
638-
table public.table_with_unique_not_null: UPDATE: id[integer]:2 data[integer]:3
638+
table public.table_with_unique_not_null: UPDATE: old-key: id[integer]:-2 data[integer]:3 new-tuple: id[integer]:2 data[integer]:3
639639
COMMIT
640640
BEGIN
641-
table public.table_with_unique_not_null: DELETE: (no-tuple-data)
641+
table public.table_with_unique_not_null: DELETE: id[integer]:2 data[integer]:3
642642
COMMIT
643643
BEGIN
644644
table public.table_with_unique_not_null: INSERT: id[integer]:3 data[integer]:1

doc/src/sgml/contrib.sgml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,8 @@
2121
</para>
2222

2323
<para>
24-
When building from the source distribution, these components are not built
25-
automatically, unless you build the "world" target.
26-
You can build and install all of them by running:
27-
<screen>
28-
<userinput>make</userinput>
29-
<userinput>make install</userinput>
30-
</screen>
31-
in the <literal>contrib</literal> directory of a configured source tree;
32-
or to build and install
33-
just one selected module, do the same in that module's subdirectory.
34-
Many of the modules have regression tests, which can be executed by
35-
running:
36-
<screen>
37-
<userinput>make check</userinput>
38-
</screen>
39-
before installation or
40-
<screen>
41-
<userinput>make installcheck</userinput>
42-
</screen>
43-
once you have a <productname>&project;</> server running.
44-
</para>
45-
46-
<para>
47-
If you are using a pre-packaged version of <productname>&project;</>,
48-
these modules are typically made available as a separate subpackage,
49-
such as <literal>postgresql-contrib</>.
24+
In <productname>&project;</>, these modules are made available as a separate
25+
subpackage <filename>postgrespro-&edn;-&majorversion;-contrib</filename>.
5026
</para>
5127

5228
<para>

doc/src/sgml/func.sgml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15910,6 +15910,11 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n);
1591015910
<entry><type>text</type></entry>
1591115911
<entry>name of <productname>Postgres Pro</> edition</entry>
1591215912
</row>
15913+
<row>
15914+
<entry><literal><function>pgpro_build()</function></literal></entry>
15915+
<entry><type>text</type></entry>
15916+
<entry>the commit ID of <productname>&project;</> source files</entry>
15917+
</row>
1591315918
</tbody>
1591415919
</tgroup>
1591515920
</table>

doc/src/sgml/installation-bin.sgml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,119 @@ pg-setup service start
390390
</tgroup>
391391
</table>
392392

393+
<para>
394+
Besides, there are separate packages providing several external modules
395+
that have been pre-built for compatibility with &project;:
396+
</para>
397+
398+
<informaltable>
399+
<tgroup cols="2">
400+
<thead>
401+
<row>
402+
<entry>
403+
<para>
404+
Package
405+
</para>
406+
</entry>
407+
<entry>
408+
<para>
409+
Description
410+
</para>
411+
</entry>
412+
</row>
413+
</thead>
414+
<tbody>
415+
<row>
416+
<entry>
417+
<para>
418+
<filename>libzstd</filename>
419+
</para>
420+
</entry>
421+
<entry>
422+
<para>
423+
A library for fast lossless data compression.
424+
</para>
425+
</entry>
426+
</row>
427+
<row>
428+
<entry>
429+
<para>
430+
<filename>mamonsu</filename>
431+
</para>
432+
</entry>
433+
<entry>
434+
<para>
435+
A monitoring agent for collecting &project; and system metrics.
436+
</para>
437+
</entry>
438+
</row>
439+
<row>
440+
<entry>
441+
<para>
442+
<filename>pg-repack-&majorversion;</filename>
443+
</para>
444+
</entry>
445+
<entry>
446+
<para>
447+
&project; extension and utility for reorganizing tables.
448+
This package is only available for Debian-based systems.
449+
</para>
450+
</entry>
451+
</row>
452+
<row>
453+
<entry>
454+
<para>
455+
<filename>pg_repack-&edn;-&majorversion;</filename>
456+
</para>
457+
</entry>
458+
<entry>
459+
<para>
460+
&project; extension and utility for reorganizing tables.
461+
This package is only available for CentOS,
462+
ALT Linux, SUSE, and RHEL-based systems.
463+
</para>
464+
</entry>
465+
</row>
466+
<row>
467+
<entry>
468+
<para>
469+
<filename>pgbadger</filename>
470+
</para>
471+
</entry>
472+
<entry>
473+
<para>
474+
&project; log analyzer that provides detailed reports and graphs.
475+
</para>
476+
</entry>
477+
</row>
478+
<row>
479+
<entry>
480+
<para>
481+
<filename>pgbouncer</filename>
482+
</para>
483+
</entry>
484+
<entry>
485+
<para>
486+
Connection pooler for &project;.
487+
</para>
488+
</entry>
489+
</row>
490+
<row>
491+
<entry>
492+
<para>
493+
<filename>zstd</filename>
494+
</para>
495+
</entry>
496+
<entry>
497+
<para>
498+
Command-line utility for the <filename>libzstd</filename> library.
499+
</para>
500+
</entry>
501+
</row>
502+
</tbody>
503+
</tgroup>
504+
</informaltable>
505+
393506
<para>
394507
Additionally, <productname>&project;</productname> provides separate
395508
packages with debug information for some operating systems:

doc/src/sgml/logicaldecoding.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,7 @@ typedef bool (*LogicalDecodeFilterDecodeTxnCB) (struct LogicalDecodingContext *c
718718
is called to determine whether data that is part of the current
719719
two-phase commit transaction should be considered for decode
720720
at this prepare stage or as a regular one-phase transaction at
721-
<command>COMMIT PREPARED</command> time later. To signal that
722-
decoding should be skipped, return true; false otherwise.
721+
<command>COMMIT PREPARED</command> time later.
723722
<programlisting>
724723
typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx,
725724
ReorderBufferTXN *txn,

doc/src/sgml/multimaster.sgml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
When the node gets synchronized up to the minimum recovery
306306
lag, all the cluster nodes get locked for write transactions to allow the
307307
recovery process to finish. By default, the minimum recovery
308-
lag is 10MB. You can change this value in the
308+
lag is 10KB. You can change this value in the
309309
<varname>multimaster.min_recovery_lag</varname> variable.
310310
</para>
311311
</listitem>
@@ -363,7 +363,7 @@
363363
<application>pg_basebackup</application> on behalf of this user.
364364
Run the following command on each node you are going to add:
365365
<programlisting>
366-
pg_basebackup -D <replaceable>datadir</> -h node1 -U myuser mydb
366+
pg_basebackup -D <replaceable>datadir</> -h node1 -U myuser
367367
</programlisting>
368368
where <replaceable>datadir</> is the directory containing the database cluster. This directory is specified at the cluster initialization stage, or set in the <envar>PGDATA</envar> environment variable.
369369
You can also use any other DBMS user with superuser rights instead of <literal>myuser</literal> to perform this task.
@@ -465,10 +465,11 @@ max_worker_processes = 250
465465
multimaster.max_nodes = 3 # cluster size
466466
multimaster.node_id = 1 # the 1-based index of this node
467467
# in the cluster
468-
multimaster.conn_strings = 'dbname=mydb user=myuser host=node1,dbname=mydb user=myuser host=node2,dbname=mydb user=myuser host=node3'
468+
multimaster.conn_strings = 'dbname=mydb user=myuser host=node1 port=5432 arbiter_port=5433,dbname=mydb user=myuser host=node2 port=5432 arbiter_port=5433,dbname=mydb user=myuser host=node3 port=5432 arbiter_port=5433'
469469
# comma-separated list
470470
# of connection strings
471471
# to neighbor nodes
472+
multimaster.arbiter_port = 5433
472473
</programlisting>
473474
<para>The <literal>multimaster.max_nodes</literal> variable defines the maximum cluster size. If you plan to add new nodes to your cluster, the <literal>multimaster.max_nodes</literal> value should exceed the initial number of nodes. In this case, you can add new nodes without restarting <productname>&productname;</productname> until the specified number of nodes is reached.
474475
</para>
@@ -487,24 +488,27 @@ multimaster.conn_strings = 'dbname=mydb user=myuser host=node1,dbname=mydb user=
487488
You can customize connection parameters by adding other
488489
<link linkend="libpq-paramkeywords">libpq connection options</link>
489490
to connection strings in the <varname>multimaster.conn_strings</varname>
490-
variable. By default, <filename>multimaster</filename> uses ports 5432
491-
and 5433 to establish connections between the nodes and for the arbiter
492-
process to listen for connections, respectively. If these ports are
493-
already in use, you must specify other ports by adding
491+
variable. By default, <filename>multimaster</filename> uses port 5432
492+
to establish connections between the nodes and port 5433 for the arbiter
493+
process to listen for connections. If these ports are
494+
already in use, you must specify other ports in
494495
<literal>port</literal> and <literal>arbiter_port</literal> options
495-
to each connection string in the <varname>multimaster.conn_strings</varname>
496-
variable. To check whether the default ports are available, you can run with the following command:
497-
<programlisting>
498-
netstat -ln | grep -E '5432|5433'
499-
</programlisting>
500-
Make sure these ports are not blocked by firewall.
496+
in each connection string in the <varname>multimaster.conn_strings</varname>
497+
variable.
501498
</para>
502499
<para>
503500
If you change the <literal>arbiter_port</literal>
504501
option, you must also specify this port in the
505502
<literal>multimaster.arbiter_port</literal> variable. For details,
506503
see <xref linkend="multimaster-arbiter-port"> and
507504
<xref linkend="multimaster-conn-strings">.
505+
</para>
506+
<para>
507+
To check whether the default ports are available, you can run the following command:
508+
<programlisting>
509+
netstat -ln | grep -E '5432|5433'
510+
</programlisting>
511+
Make sure these ports are not blocked by firewall.
508512
</para>
509513
</listitem>
510514
</itemizedlist>
@@ -565,7 +569,7 @@ SELECT mtm.get_cluster_state();
565569
<para>
566570
The <literal>multimaster.heartbeat_send_timeout</literal>
567571
variable defines the time interval between the
568-
heartbeats. By default, this variable is set to 1000ms.
572+
heartbeats. By default, this variable is set to 200ms.
569573
</para>
570574
</listitem>
571575
<listitem>
@@ -574,7 +578,7 @@ SELECT mtm.get_cluster_state();
574578
variable sets the timeout for the response. If no heartbeats are
575579
received during this time, the node is assumed to be
576580
disconnected and is excluded from the cluster. By default,
577-
this variable is set to 10000ms.
581+
this variable is set to 1000ms.
578582
</para>
579583
</listitem>
580584
</itemizedlist>
@@ -601,7 +605,7 @@ SELECT mtm.get_cluster_state();
601605
<para>
602606
<varname>multimaster.min_recovery_lag</varname> &mdash; sets the
603607
minimal WAL lag between the node to be restored and the current cluster state.
604-
By default, <varname>multimaster.min_recovery_lag</varname> is set to 10MB.
608+
By default, <varname>multimaster.min_recovery_lag</varname> is set to 10KB.
605609
When the disconnected node is fast-forwarded up to the
606610
<varname>multimaster.min_recovery_lag</varname> threshold,
607611
<filename>multimaster</filename> stops all new commits to the
@@ -1048,20 +1052,20 @@ pg_ctl -D <replaceable>datadir</replaceable> -l <replaceable>pg.log</replaceable
10481052
Time interval
10491053
between heartbeat messages, in milliseconds. An arbiter process
10501054
broadcasts heartbeat messages to all nodes to detect connection
1051-
problems. </para><para>Default: 1000
1055+
problems. </para><para>Default: 200
10521056
</para></listitem></varlistentry>
10531057
<varlistentry><term><varname>multimaster.heartbeat_recv_timeout</varname><indexterm><primary><varname>multimaster.heartbeat_recv_timeout</varname></primary></indexterm></term><listitem><para>
10541058
Timeout, in
10551059
milliseconds. If no heartbeat message is received from the node
10561060
within this timeframe, the node is excluded from the cluster.
1057-
</para><para>Default: 10000
1061+
</para><para>Default: 1000
10581062
</para></listitem></varlistentry>
10591063
<varlistentry><term><varname>multimaster.min_recovery_lag</varname><indexterm><primary><varname>multimaster.min_recovery_lag</varname></primary></indexterm></term><listitem><para>
10601064
Minimal WAL lag
10611065
between the node to be restored and the current cluster state, in
10621066
kB. When this threshold is reached during node recovery, the
10631067
cluster is locked for write transactions until the recovery is
1064-
complete. </para><para>Default: 10MB
1068+
complete. </para><para>Default: 10KB
10651069
</para></listitem></varlistentry>
10661070
<varlistentry><term><varname>multimaster.max_recovery_lag</varname><indexterm><primary><varname>multimaster.max_recovery_lag</varname></primary></indexterm></term><listitem><para>
10671071
Maximal WAL lag

doc/src/sgml/passwordcheck.sgml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@
2222
<filename>postgresql.conf</filename>, then restart the server.
2323
</para>
2424

25-
<para>
26-
You can adapt this module to your needs by changing the source code.
27-
For example, you can use
28-
<ulink url="http://sourceforge.net/projects/cracklib/">CrackLib</ulink>
29-
to check passwords &mdash; this only requires uncommenting
30-
two lines in the <filename>Makefile</filename> and rebuilding the
31-
module. (We cannot include <productname>CrackLib</productname>
32-
by default for license reasons.)
33-
Without <productname>CrackLib</productname>, the module enforces a few
34-
simple rules for password strength, which you can modify or extend
35-
as you see fit.
36-
</para>
37-
3825
<caution>
3926
<para>
4027
To prevent unencrypted passwords from being sent across the network,
@@ -52,11 +39,6 @@
5239
(see <xref linkend="client-authentication">) than to rely on
5340
passwords within the database.
5441
</para>
55-
<para>
56-
Alternatively, you could modify <filename>passwordcheck</filename>
57-
to reject pre-encrypted passwords, but forcing users to set their
58-
passwords in clear text carries its own security risks.
59-
</para>
6042
</caution>
6143

6244
</sect1>

0 commit comments

Comments
 (0)