Re: Perform streaming logical transactions by background workers and parallel apply
От | Peter Smith |
---|---|
Тема | Re: Perform streaming logical transactions by background workers and parallel apply |
Дата | |
Msg-id | CAHut+Pv_0nfUxriwxBQnZTOF5dy5nfG5NtWMr8e00mPrt2Vjzw@mail.gmail.com обсуждение исходный текст |
Ответ на | RE: Perform streaming logical transactions by background workers and parallel apply ("shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>) |
Список | pgsql-hackers |
Here are my review comments for v6-0002. ====== 1. src/test/subscription/t/015_stream.pl +################################ +# Test using streaming mode 'on' +################################ $node_subscriber->safe_psql('postgres', "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); - $node_publisher->wait_for_catchup($appname); - # Also wait for initial table sync to finish my $synced_query = "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; - my $result = $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(2|2|2), 'check initial data was copied to subscriber'); 1a. Several whitespace lines became removed by the patch. IMO it was better (e.g. less squishy) how it looked originally. 1b. Maybe some more blank lines should be added to the 'apply' test part too, to match 1a. ~~~ 2. src/test/subscription/t/015_stream.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; Should that say "... after changing SUBSCRIPTION"? ~~~ 3. src/test/subscription/t/016_stream_subxact.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; + Should that say "... after changing SUBSCRIPTION"? ~~~ 4. src/test/subscription/t/017_stream_ddl.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; + Should that say "... after changing SUBSCRIPTION"? ~~~ 5. .../t/018_stream_subxact_abort.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; Should that say "... after changing SUBSCRIPTION" ? ~~~ 6. .../t/019_stream_subxact_ddl_abort.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; + Should that say "... after changing SUBSCRIPTION"? ~~~ 7. .../subscription/t/023_twophase_stream.pl ############################### # Check initial data was copied to subscriber ############################### Perhaps the above comment now looks a bit out-of-place with the extra #####. Looks better now as just: # Check initial data was copied to the subscriber ~~~ 8. .../subscription/t/023_twophase_stream.pl +$node_publisher->poll_query_until('postgres', + "SELECT pid != $oldpid FROM pg_stat_replication WHERE application_name = '$appname' AND state = 'streaming';" +) or die "Timed out while waiting for apply to restart after changing PUBLICATION"; Should that say "... after changing SUBSCRIPTION"? ------ Kind Regards, Peter Smith. Fujitsu Australia
В списке pgsql-hackers по дате отправления:
Следующее
От: Kyotaro HoriguchiДата:
Сообщение: Re: Build-farm - intermittent error in 031_column_list.pl