mirror of
https://github.com/postgres/postgres.git
synced 2025-08-05 07:41:25 +03:00
Fix parsing of DROP SUBSCRIPTION ... DROP SLOT
It didn't actually parse before. Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
This commit is contained in:
@@ -9196,11 +9196,13 @@ DropSubscriptionStmt: DROP SUBSCRIPTION name opt_drop_slot
|
|||||||
;
|
;
|
||||||
|
|
||||||
opt_drop_slot:
|
opt_drop_slot:
|
||||||
IDENT SLOT
|
DROP SLOT
|
||||||
{
|
{
|
||||||
if (strcmp($1, "drop") == 0)
|
$$ = TRUE;
|
||||||
$$ = TRUE;
|
}
|
||||||
else if (strcmp($1, "nodrop") == 0)
|
| IDENT SLOT
|
||||||
|
{
|
||||||
|
if (strcmp($1, "nodrop") == 0)
|
||||||
$$ = FALSE;
|
$$ = FALSE;
|
||||||
else
|
else
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
@@ -179,7 +179,7 @@ $node_publisher->poll_query_until('postgres',
|
|||||||
or die "Timed out while waiting for apply to restart";
|
or die "Timed out while waiting for apply to restart";
|
||||||
|
|
||||||
# check all the cleanup
|
# check all the cleanup
|
||||||
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed");
|
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub_renamed DROP SLOT");
|
||||||
|
|
||||||
$result =
|
$result =
|
||||||
$node_subscriber->safe_psql('postgres', "SELECT count(*) FROM pg_subscription");
|
$node_subscriber->safe_psql('postgres', "SELECT count(*) FROM pg_subscription");
|
||||||
|
Reference in New Issue
Block a user