mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
"node rejoin": check for available replication slots on the rejoin target
"standby follow" did this already, but "node rejoin" didn't.
This commit is contained in:
1
HISTORY
1
HISTORY
@@ -7,6 +7,7 @@
|
||||
during "standby clone" (Ian)
|
||||
repmgr: report error code on follow/rejoin failure due to non-available
|
||||
replication slot (Ian)
|
||||
repmgr: ensure "node rejoin" checks for available replication slots (Ian)
|
||||
|
||||
5.0 2019-10-15
|
||||
general: add PostgreSQL 12 support (Ian)
|
||||
|
||||
@@ -48,6 +48,14 @@
|
||||
<sect2>
|
||||
<title>Bug fixes</title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Ensure <link linkend="repmgr-node-rejoin"><command>repmgr node rejoin</command></link>
|
||||
checks for available replication slots on the rejoin target.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
@@ -2228,6 +2228,21 @@ do_node_rejoin(void)
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sanity-check replication slot availability
|
||||
*/
|
||||
if (config_file_options.use_replication_slots)
|
||||
{
|
||||
bool slots_available = check_replication_slots_available(primary_node_record.node_id,
|
||||
primary_conn);
|
||||
if (slots_available == false)
|
||||
{
|
||||
PQfinish(primary_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* sanity-check that it will actually be possible to stream from the new upstream
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user