-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump version to 1.2 * Add extension upgrade script from 1.1 to 1.2 * Update changelog
- Loading branch information
Showing
7 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- | ||
-- extension update file from 1.1 to 1.2 | ||
-- | ||
-- complain if script is sourced in psql, rather than via CREATE EXTENSION | ||
\echo Use "ALTER EXTENSION pgautofailover UPDATE TO 1.2" to load this file. \quit | ||
|
||
|
||
DROP FUNCTION IF EXISTS pgautofailover.formation_uri(text); | ||
|
||
CREATE FUNCTION pgautofailover.formation_uri | ||
( | ||
IN formation_id text DEFAULT 'default', | ||
IN sslmode text DEFAULT 'prefer' | ||
) | ||
RETURNS text LANGUAGE SQL STRICT | ||
AS $$ | ||
select case | ||
when string_agg(format('%s:%s', nodename, nodeport),',') is not null | ||
then format('postgres://%s/%s?target_session_attrs=read-write&sslmode=%s', | ||
string_agg(format('%s:%s', nodename, nodeport),','), | ||
-- as we join formation on node we get the same dbname for all | ||
-- entries, pick one. | ||
min(dbname), | ||
min(sslmode) | ||
) | ||
end as uri | ||
from pgautofailover.node as node | ||
join pgautofailover.formation using(formationid) | ||
where formationid = formation_id | ||
and groupid = 0; | ||
$$; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
comment = 'pg_auto_failover' | ||
default_version = '1.1' | ||
default_version = '1.2' | ||
module_pathname = '$libdir/pgautofailover' | ||
relocatable = false |