mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 00:04:53 -05:00
Fix shadow variable warning in subscriptioncmds.c.
Author: Shlok Kyal <shlok.kyal.oss@gmail.com> Author: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Vignesh C <vignesh21@gmail.com> Discussion: https://postgr.es/m/CAHut+PsF8R0Bt4J3c92+T2F0mun0rRfK=-GH+iBv2s-O8ahJJw@mail.gmail.com
This commit is contained in:
parent
a6d05c8193
commit
c252d37d8c
@ -1122,10 +1122,10 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data,
|
|||||||
* to be at the end because otherwise if there is an error while doing
|
* to be at the end because otherwise if there is an error while doing
|
||||||
* the database operations we won't be able to rollback dropped slots.
|
* the database operations we won't be able to rollback dropped slots.
|
||||||
*/
|
*/
|
||||||
foreach_ptr(SubRemoveRels, rel, sub_remove_rels)
|
foreach_ptr(SubRemoveRels, sub_remove_rel, sub_remove_rels)
|
||||||
{
|
{
|
||||||
if (rel->state != SUBREL_STATE_READY &&
|
if (sub_remove_rel->state != SUBREL_STATE_READY &&
|
||||||
rel->state != SUBREL_STATE_SYNCDONE)
|
sub_remove_rel->state != SUBREL_STATE_SYNCDONE)
|
||||||
{
|
{
|
||||||
char syncslotname[NAMEDATALEN] = {0};
|
char syncslotname[NAMEDATALEN] = {0};
|
||||||
|
|
||||||
@ -1139,7 +1139,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data,
|
|||||||
* dropped slots and fail. For these reasons, we allow
|
* dropped slots and fail. For these reasons, we allow
|
||||||
* missing_ok = true for the drop.
|
* missing_ok = true for the drop.
|
||||||
*/
|
*/
|
||||||
ReplicationSlotNameForTablesync(sub->oid, rel->relid,
|
ReplicationSlotNameForTablesync(sub->oid, sub_remove_rel->relid,
|
||||||
syncslotname, sizeof(syncslotname));
|
syncslotname, sizeof(syncslotname));
|
||||||
ReplicationSlotDropAtPubNode(wrconn, syncslotname, true);
|
ReplicationSlotDropAtPubNode(wrconn, syncslotname, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user