Skip to content

Commit

Permalink
Fix problems with bad migration to 1.5 (#792)
Browse files Browse the repository at this point in the history
The script to migrate from 1.4 to 1.5 did not correctly remove the old
`register_node` function. This caused issues for the migration from 1.5
to 1.6, because we remove the old `replication_state` type there. The
old `register_node` function still depended on this version of the
`replication_state` type, so it's removal was blocked.
  • Loading branch information
JelteF committed Sep 2, 2021
1 parent 9284de8 commit 6b91a38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/monitor/pgautofailover--1.5--1.6.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pgautofailover" to load this file. \quit

-- remove a possible leftover from pg_auto_failover 1.4 that was not correctly
-- removed in a migration to 1.5
DROP FUNCTION IF EXISTS
pgautofailover.register_node(text,text,int,name,text,bigint,int,
pgautofailover.replication_state,text,
int,bool);

DROP FUNCTION
pgautofailover.register_node(text,text,int,name,text,bigint,int,int,
pgautofailover.replication_state,text,
Expand Down

0 comments on commit 6b91a38

Please sign in to comment.