We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 004dfe2 commit f002725Copy full SHA for f002725
store/postgres/src/connection_pool.rs
@@ -1440,10 +1440,16 @@ impl PoolCoordinator {
1440
// version. Since dropping and recreating the foreign table
1441
// definitions can slow the startup of other nodes down because of
1442
// locking, we try to only do this when it is actually needed
1443
- for server in self.servers.iter() {
1444
- if pool.needs_remap(server)? {
1445
- pool.remap(server)?;
1446
- }
+ {
+ let mut conn = pool.get()?;
+ with_migration_lock(&mut conn, |_| {
+ for server in self.servers.iter() {
1447
+ if pool.needs_remap(server)? {
1448
+ pool.remap(server)?;
1449
+ }
1450
1451
+ Ok(())
1452
+ })?;
1453
}
1454
1455
// pool had schema changes, refresh the import from pool into all
0 commit comments