Message wording improvements
This commit is contained in:
parent
32b507378f
commit
b2451385cb
@ -1096,7 +1096,7 @@ test_sub=# SELECT * FROM child ORDER BY a;
|
|||||||
Each publication can optionally specify which columns of each table are
|
Each publication can optionally specify which columns of each table are
|
||||||
replicated to subscribers. The table on the subscriber side must have at
|
replicated to subscribers. The table on the subscriber side must have at
|
||||||
least all the columns that are published. If no column list is specified,
|
least all the columns that are published. If no column list is specified,
|
||||||
then all columns in the publisher are replicated.
|
then all columns on the publisher are replicated.
|
||||||
See <xref linkend="sql-createpublication"/> for details on the syntax.
|
See <xref linkend="sql-createpublication"/> for details on the syntax.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ get_publications_str(List *publications, StringInfo dest, bool quote_literal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check the specified publication(s) is(are) present in the publisher.
|
* Check that the specified publications are present on the publisher.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
check_publications(WalReceiverConn *wrconn, List *publications)
|
check_publications(WalReceiverConn *wrconn, List *publications)
|
||||||
@ -495,8 +495,8 @@ check_publications(WalReceiverConn *wrconn, List *publications)
|
|||||||
get_publications_str(publicationsCopy, pubnames, false);
|
get_publications_str(publicationsCopy, pubnames, false);
|
||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
errcode(ERRCODE_UNDEFINED_OBJECT),
|
errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||||
errmsg_plural("publication %s does not exist in the publisher",
|
errmsg_plural("publication %s does not exist on the publisher",
|
||||||
"publications %s do not exist in the publisher",
|
"publications %s do not exist on the publisher",
|
||||||
list_length(publicationsCopy),
|
list_length(publicationsCopy),
|
||||||
pubnames->data));
|
pubnames->data));
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ $node_publisher->safe_psql('postgres',
|
|||||||
#
|
#
|
||||||
# When a publisher drops a table from publication, it should also stop sending
|
# When a publisher drops a table from publication, it should also stop sending
|
||||||
# its changes to subscribers. We look at the subscriber whether it receives
|
# its changes to subscribers. We look at the subscriber whether it receives
|
||||||
# the row that is inserted to the table in the publisher after it is dropped
|
# the row that is inserted to the table on the publisher after it is dropped
|
||||||
# from the publication.
|
# from the publication.
|
||||||
$result = $node_subscriber->safe_psql('postgres',
|
$result = $node_subscriber->safe_psql('postgres',
|
||||||
"SELECT count(*), min(a), max(a) FROM tab_ins");
|
"SELECT count(*), min(a), max(a) FROM tab_ins");
|
||||||
|
@ -46,7 +46,7 @@ my ($ret, $stdout, $stderr) = $node_subscriber->psql('postgres',
|
|||||||
"CREATE SUBSCRIPTION mysub1 CONNECTION '$publisher_connstr' PUBLICATION mypub, non_existent_pub"
|
"CREATE SUBSCRIPTION mysub1 CONNECTION '$publisher_connstr' PUBLICATION mypub, non_existent_pub"
|
||||||
);
|
);
|
||||||
ok( $stderr =~
|
ok( $stderr =~
|
||||||
m/WARNING: publication "non_existent_pub" does not exist in the publisher/,
|
m/WARNING: publication "non_existent_pub" does not exist on the publisher/,
|
||||||
"Create subscription throws warning for non-existent publication");
|
"Create subscription throws warning for non-existent publication");
|
||||||
|
|
||||||
# Wait for initial table sync to finish.
|
# Wait for initial table sync to finish.
|
||||||
@ -57,7 +57,7 @@ $node_subscriber->wait_for_subscription_sync($node_publisher, 'mysub1');
|
|||||||
"ALTER SUBSCRIPTION mysub1 ADD PUBLICATION non_existent_pub1, non_existent_pub2"
|
"ALTER SUBSCRIPTION mysub1 ADD PUBLICATION non_existent_pub1, non_existent_pub2"
|
||||||
);
|
);
|
||||||
ok( $stderr =~
|
ok( $stderr =~
|
||||||
m/WARNING: publications "non_existent_pub1", "non_existent_pub2" do not exist in the publisher/,
|
m/WARNING: publications "non_existent_pub1", "non_existent_pub2" do not exist on the publisher/,
|
||||||
"Alter subscription add publication throws warning for non-existent publications"
|
"Alter subscription add publication throws warning for non-existent publications"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ ok( $stderr =~
|
|||||||
($ret, $stdout, $stderr) = $node_subscriber->psql('postgres',
|
($ret, $stdout, $stderr) = $node_subscriber->psql('postgres',
|
||||||
"ALTER SUBSCRIPTION mysub1 SET PUBLICATION non_existent_pub");
|
"ALTER SUBSCRIPTION mysub1 SET PUBLICATION non_existent_pub");
|
||||||
ok( $stderr =~
|
ok( $stderr =~
|
||||||
m/WARNING: publication "non_existent_pub" does not exist in the publisher/,
|
m/WARNING: publication "non_existent_pub" does not exist on the publisher/,
|
||||||
"Alter subscription set publication throws warning for non-existent publication"
|
"Alter subscription set publication throws warning for non-existent publication"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ $node_publisher->wait_for_catchup('tap_sub');
|
|||||||
# Ensure a transactional logical decoding message shows up on the slot
|
# Ensure a transactional logical decoding message shows up on the slot
|
||||||
$node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub DISABLE");
|
$node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub DISABLE");
|
||||||
|
|
||||||
# wait for the replication slot to become inactive in the publisher
|
# wait for the replication slot to become inactive on the publisher
|
||||||
$node_publisher->poll_query_until(
|
$node_publisher->poll_query_until(
|
||||||
'postgres',
|
'postgres',
|
||||||
"SELECT COUNT(*) FROM pg_catalog.pg_replication_slots WHERE slot_name = 'tap_sub' AND active='f'",
|
"SELECT COUNT(*) FROM pg_catalog.pg_replication_slots WHERE slot_name = 'tap_sub' AND active='f'",
|
||||||
|
@ -185,7 +185,7 @@ $node_B->safe_psql('postgres',
|
|||||||
"ALTER PUBLICATION tap_pub_B ADD TABLE tab_new");
|
"ALTER PUBLICATION tap_pub_B ADD TABLE tab_new");
|
||||||
|
|
||||||
# Alter subscription ... refresh publication should log a warning when a new
|
# Alter subscription ... refresh publication should log a warning when a new
|
||||||
# table in the publisher is subscribing data from a different publication
|
# table on the publisher is subscribing data from a different publication
|
||||||
($result, $stdout, $stderr) = $node_A->psql(
|
($result, $stdout, $stderr) = $node_A->psql(
|
||||||
'postgres', "
|
'postgres', "
|
||||||
ALTER SUBSCRIPTION $subname_AB2 REFRESH PUBLICATION");
|
ALTER SUBSCRIPTION $subname_AB2 REFRESH PUBLICATION");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user