Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53a6668

Browse files
committed
Merge branch 'PGPROEE9_6_MULTIMASTER' of git.postgrespro.ru:pgpro-dev/postgrespro into PGPROEE9_6_MULTIMASTER
2 parents7d5dc8a +3e4ac04 commit53a6668

File tree

146 files changed

+8210
-5330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+8210
-5330
lines changed

‎configure

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ else
27702770
fi
27712771

27722772

2773-
PGPRO_VERSION="$PACKAGE_VERSION.1"
2773+
PGPRO_VERSION="$PACKAGE_VERSION.2"
27742774
PGPRO_PACKAGE_NAME="PostgresPro"
27752775
PGPRO_EDITION="enterprise"
27762776

@@ -16078,24 +16078,6 @@ cat >>confdefs.h <<_ACEOF
1607816078
_ACEOF
1607916079

1608016080

16081-
16082-
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
16083-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16084-
/* end confdefs.h. */
16085-
16086-
#define INT64CONST(x) x##LL
16087-
long long int foo = INT64CONST(0x1234567890123456);
16088-
16089-
_ACEOF
16090-
if ac_fn_c_try_compile "$LINENO"; then :
16091-
16092-
$as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
16093-
16094-
fi
16095-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16096-
fi
16097-
16098-
1609916081
# If we found "long int" is 64 bits, assume snprintf handles it. If
1610016082
# we found we need to use "long long int", better check. We cope with
1610116083
# snprintfs that use %lld, %qd, or %I64d as the format. If none of these

‎configure.in

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major versio
3838
PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
3939
[PG_VERSION="$PACKAGE_VERSION$withval"],
4040
[PG_VERSION="$PACKAGE_VERSION"])
41-
PGPRO_VERSION="$PACKAGE_VERSION.1"
41+
PGPRO_VERSION="$PACKAGE_VERSION.2"
4242
PGPRO_PACKAGE_NAME="PostgresPro"
4343
PGPRO_EDITION="enterprise"
4444
AC_SUBST(PGPRO_PACKAGE_NAME)
@@ -1877,18 +1877,6 @@ fi
18771877
AC_DEFINE_UNQUOTED(PG_INT64_TYPE, $pg_int64_type,
18781878
[Define to the name of a signed 64-bit integer type.])
18791879

1880-
dnl If we need to use "long long int", figure out whether nnnLL notation works.
1881-
1882-
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
1883-
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
1884-
#define INT64CONST(x) x##LL
1885-
long long int foo = INT64CONST(0x1234567890123456);
1886-
])],
1887-
[AC_DEFINE(HAVE_LL_CONSTANTS, 1, [Define to 1 if constants of type 'long long int' should have the suffix LL.])],
1888-
[])
1889-
fi
1890-
1891-
18921880
# If we found "long int" is 64 bits, assume snprintf handles it. If
18931881
# we found we need to use "long long int", better check. We cope with
18941882
# snprintfs that use %lld, %qd, or %I64d as the format. If none of these

‎contrib/mmts/Cluster.pm

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ sub start
157157
foreachmy$node (@$nodes)
158158
{
159159
$node->start();
160-
diag"Starting node with connstr 'dbname=postgres port=@{[$node->port() ]} host=@{[$node->host() ]}'";
160+
note("Starting node with connstr 'dbname=postgres port=@{[$node->port() ]} host=@{[$node->host() ]}'");
161161
}
162162
}
163163

@@ -167,7 +167,7 @@ sub stopnode
167167
return 1unlessdefined$node->{_pid};
168168
$mode ='fast'unlessdefined$mode;
169169
my$name =$node->name;
170-
diag("stopping$name${mode}ly");
170+
note("stopping$name${mode}ly");
171171

172172
if ($modeeq'kill') {
173173
killtree($node->{_pid});
@@ -177,13 +177,13 @@ sub stopnode
177177
my$pgdata =$node->data_dir;
178178
my$ret = TestLib::system_log('pg_ctl','-D',$pgdata,'-m','fast','stop');
179179
my$pidfile =$node->data_dir ."/postmaster.pid";
180-
diag("unlink$pidfile");
180+
note("unlink$pidfile");
181181
unlink$pidfile;
182182
$node->{_pid} =undef;
183183
$node->_update_pid;
184184

185185
if ($ret != 0) {
186-
diag("$name failed to stop${mode}ly");
186+
note("$name failed to stop${mode}ly");
187187
return 0;
188188
}
189189

@@ -201,16 +201,16 @@ sub dumplogs
201201
my ($self) =@_;
202202
my$nodes =$self->{nodes};
203203

204-
diag("Dumping logs:");
204+
note("Dumping logs:");
205205
foreachmy$node (@$nodes) {
206-
diag("##################################################################");
207-
diag($node->{_logfile});
208-
diag("##################################################################");
206+
note("##################################################################");
207+
note($node->{_logfile});
208+
note("##################################################################");
209209
my$filename =$node->{_logfile};
210210
openmy$fh,'<',$filenameordie"error opening$filename:$!";
211211
my$data =do {local$/; <$fh> };
212-
diag($data);
213-
diag("##################################################################\n\n");
212+
note($data);
213+
note("##################################################################\n\n");
214214
}
215215
}
216216

@@ -221,7 +221,7 @@ sub stop
221221
$mode ='fast'unlessdefined$mode;
222222

223223
my$ok = 1;
224-
diag("stopping cluster${mode}ly");
224+
note("stopping cluster${mode}ly");
225225

226226
foreachmy$node (@$nodes) {
227227
if (!stopnode($node,$mode)) {
@@ -276,7 +276,7 @@ sub poll
276276
return 1;
277277
}
278278
my$tries_left =$tries -$i - 1;
279-
diag("$poller poll for$pollee failed [$tries_left tries left]");
279+
note("$poller poll for$pollee failed [$tries_left tries left]");
280280
sleep($delay);
281281
}
282282
return 0;
@@ -304,7 +304,7 @@ sub pgbench_async()
304304
-p=>$self->{nodes}->[$node]->port(),
305305
'postgres',
306306
);
307-
diag("running pgbench:" .join("",@pgbench_command));
307+
note("running pgbench:" .join("",@pgbench_command));
308308
my$handle = IPC::Run::start(\@pgbench_command,$in,$out);
309309
return$handle;
310310
}
@@ -329,7 +329,7 @@ sub is_data_identic()
329329
$self->{nodes}->[$i]->psql('postgres',$sql,stdout=> \$current_hash);
330330
if ($current_hasheq'')
331331
{
332-
diag("got empty hash from node$i");
332+
note("got empty hash from node$i");
333333
return 0;
334334
}
335335
if ($checksumeq'')
@@ -338,12 +338,12 @@ sub is_data_identic()
338338
}
339339
elsif ($checksumne$current_hash)
340340
{
341-
diag("got different hashes:$checksum ang$current_hash");
341+
note("got different hashes:$checksum ang$current_hash");
342342
return 0;
343343
}
344344
}
345345

346-
diag($checksum);
346+
note($checksum);
347347
return 1;
348348
}
349349

‎contrib/mmts/t/000_truncate.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
$cluster->init();
1414
$cluster->configure();
1515
$cluster->start();
16-
diag("sleeping 10");
16+
note("sleeping 10");
1717
sleep(10);
1818

1919
my ($in,$out,$err,$rc);
@@ -28,7 +28,7 @@
2828
-p=>$cluster->{nodes}->[0]->port(),
2929
'postgres',
3030
);
31-
diag("running pgbench init");
31+
note("running pgbench init");
3232
my$init_run = start(\@init_argv,$in,$out);
3333
finish($init_run) || BAIL_OUT("pgbench exited with$?");
3434

@@ -41,7 +41,7 @@
4141
-p=>$cluster->{nodes}->[0]->port(),
4242
'postgres',
4343
);
44-
diag("running pgbench:" .join('',@bench_argv));
44+
note("running pgbench:" .join('',@bench_argv));
4545
my$bench_run = start(\@bench_argv,$in,$out);
4646
sleep(2);
4747

‎contrib/mmts/t/001_basic_recovery.pl

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Work after node stop
4040
###############################################################################
4141

42-
diag("stopping node 2");
42+
note("stopping node 2");
4343
if ($cluster->stopid(2,'fast')) {
4444
pass("node 2 stops in fast mode");
4545
}else {
@@ -49,68 +49,69 @@
4949

5050
sleep(5);# Wait until failure of node will be detected
5151

52-
diag("inserting 2 on node 0");
52+
note("inserting 2 on node 0");
5353
$ret =$cluster->psql(0,'postgres',"insert into t values(2, 20);");# this transaciton may fail
54-
diag"tx1 status =$ret";
54+
note("tx1 status =$ret");
55+
5556

56-
diag("inserting 3 on node 1");
57+
note("inserting 3 on node 1");
5758
$ret =$cluster->psql(1,'postgres',"insert into t values(3, 30);");# this transaciton may fail
58-
diag"tx2 status =$ret";
59+
note("tx2 status =$ret");
5960

60-
diag("inserting 4 on node 0 (can fail)");
61+
note("inserting 4 on node 0 (can fail)");
6162
$ret =$cluster->psql(0,'postgres',"insert into t values(4, 40);");
62-
diag"tx1 status =$ret";
63+
note("tx1 status =$ret");
6364

64-
diag("inserting 5 on node 1 (can fail)");
65+
note("inserting 5 on node 1 (can fail)");
6566
$ret =$cluster->psql(1,'postgres',"insert into t values(5, 50);");
66-
diag"tx2 status =$ret";
67+
note("tx2 status =$ret");
6768

68-
diag("selecting");
69+
note("selecting");
6970
$cluster->psql(1,'postgres',"select v from t where k=4;",stdout=> \$psql_out);
70-
diag("selected");
71+
note("selected");
7172
is($psql_out,'40',"Check replication after node failure.");
7273

7374
###############################################################################
7475
# Work after node start
7576
###############################################################################
7677

77-
diag("starting node 2");
78+
note("starting node 2");
7879
$cluster->{nodes}->[2]->start;
7980

8081
sleep(5);# Wait until node is started
8182

82-
diag("inserting 6 on node 0 (can fail)");
83+
note("inserting 6 on node 0 (can fail)");
8384
$cluster->psql(0,'postgres',"insert into t values(6, 60);");
84-
diag("inserting 7 on node 1 (can fail)");
85+
note("inserting 7 on node 1 (can fail)");
8586
$cluster->psql(1,'postgres',"insert into t values(7, 70);");
8687

87-
diag("polling node 2");
88+
note("polling node 2");
8889
for (my$poller = 0;$poller < 3;$poller++) {
8990
my$pollee = 2;
9091
ok($cluster->poll($poller,'postgres',$pollee, 10, 1),"node$pollee is online according to node$poller");
9192
}
9293

93-
diag("getting cluster state");
94+
note("getting cluster state");
9495
$cluster->psql(0,'postgres',"select * from mtm.get_cluster_state();",stdout=> \$psql_out);
95-
diag("Node 1 status:$psql_out");
96+
note("Node 1 status:$psql_out");
9697
$cluster->psql(1,'postgres',"select * from mtm.get_cluster_state();",stdout=> \$psql_out);
97-
diag("Node 2 status:$psql_out");
98+
note("Node 2 status:$psql_out");
9899
$cluster->psql(2,'postgres',"select * from mtm.get_cluster_state();",stdout=> \$psql_out);
99-
diag("Node 3 status:$psql_out");
100+
note("Node 3 status:$psql_out");
100101

101-
diag("inserting 8 on node 0");
102+
note("inserting 8 on node 0");
102103
$cluster->psql(0,'postgres',"insert into t values(8, 80);");
103-
diag("inserting 9 on node 1");
104+
note("inserting 9 on node 1");
104105
$cluster->psql(1,'postgres',"insert into t values(9, 90);");
105106

106-
diag("selecting from node 2");
107+
note("selecting from node 2");
107108
$cluster->psql(2,'postgres',"select v from t where k=8;",stdout=> \$psql_out);
108-
diag("selected");
109+
note("selected");
109110

110111
is($psql_out,'80',"Check replication after failed node recovery.");
111112

112113
$cluster->psql(2,'postgres',"select v from t where k=9;",stdout=> \$psql_out);
113-
diag("selected");
114+
note("selected");
114115

115116
is($psql_out,'90',"Check replication after failed node recovery.");
116117

‎contrib/mmts/t/002_cross.pl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
my ($rc,$in,$out,$err);
2020

21-
diag("sleeping 10");
21+
note("sleeping 10");
2222
sleep(10);
2323

24-
diag("preparing the tables");
24+
note("preparing the tables");
2525
if ($cluster->psql(0,'postgres',"create table t (k int primary key, v int)"))
2626
{
2727
$cluster->bail_out_with_logs('failed to create t');
@@ -50,7 +50,7 @@ sub appender
5050
'postgres',
5151
);
5252

53-
diag("running[" . getcwd() ."]:" .join('',@argv));
53+
note("running[" . getcwd() ."]:" .join('',@argv));
5454

5555
return start(\@argv,$inref,$outref);
5656
}
@@ -59,12 +59,12 @@ sub state_dump
5959
{
6060
my$state =shift;
6161

62-
diag("<<<<<");
62+
note("<<<<<");
6363
while (my ($key,$value) =each(%{$state}))
6464
{
65-
diag("$key ->$value");
65+
note("$key ->$value");
6666
}
67-
diag(">>>>>");
67+
note(">>>>>");
6868
}
6969

7070
substate_leq
@@ -75,13 +75,13 @@ sub state_leq
7575
{
7676
if (!exists($b->{$key}))
7777
{
78-
diag("b has no key$key\n");
78+
note("b has no key$key\n");
7979
return 0;
8080
}
8181

8282
if ($b->{$key} <$value)
8383
{
84-
diag($b->{$key} ." <$value\n");
84+
note($b->{$key} ." <$value\n");
8585
return 0;
8686
}
8787
}
@@ -102,8 +102,8 @@ sub parse_state
102102
return$state;
103103
}
104104

105-
diag("starting appenders");
106-
diag("starting benches");
105+
note("starting appenders");
106+
note("starting benches");
107107
$in ='';
108108
$out ='';
109109
my@appenders = ();
@@ -136,13 +136,13 @@ sub parse_state
136136
{
137137
if (!state_leq($state_a,$state_b) && !state_leq($state_a,$state_b))
138138
{
139-
diag("cross anomaly detected:\n===a\n$out_a\n+++b\n$out_b\n---\n");
139+
note("cross anomaly detected:\n===a\n$out_a\n+++b\n$out_b\n---\n");
140140
$anomalies++;
141141
}
142142
}
143143
}
144144

145-
diag("finishing benches");
145+
note("finishing benches");
146146
foreachmy$appender (@appenders)
147147
{
148148
if (!finish($appender))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp