Skip to content

Commit

Permalink
Release 1.2 prep (#197)
Browse files Browse the repository at this point in the history
* Bump version to 1.2

* Add extension upgrade script from 1.1 to 1.2

* Update changelog
  • Loading branch information
mtuncer authored Mar 16, 2020
1 parent 4ead87e commit fbe6c57
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 9 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
### pg_auto_failover v1.2 (March 17, 2020) ###

* Feature implement an option to skip editing of HBA rules by pg_autoctl (#169)
* Feature implement support for SSL connections (#171)
* Feature implement an option (--skip-pg-hba) to skip editing of HBA rules by pg_autoctl (#169)
* Feature implement support for SSL connections (--ssl-mode) (#171)
* Feature implement pg_autoctl drop monitor and drop node --nodename --nodeport (#179)
* Feature implement SSL support with self-signed certificates
* Feature make --auth option mandatory when creating nodes
* Fix error out when the pgautofailover is not in shared_preload_libraries
* Fixes for warnings found in static ananlysis
* Fixes for warnings found in static analysis

### pg_auto_failover v1.0.6 (Feb 13, 2020) ###

Expand Down
4 changes: 2 additions & 2 deletions src/bin/pg_autoctl/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#define PG_AUTOCTL_STATE_VERSION 1

/* additional version information for printing version on CLI */
#define PG_AUTOCTL_VERSION "1.0.6"
#define PG_AUTOCTL_VERSION "1.2"

/* version of the extension that we requite to talk to on the monitor */
#define PG_AUTOCTL_EXTENSION_VERSION "1.1"
#define PG_AUTOCTL_EXTENSION_VERSION "1.2"

/* environment variable to use to make DEBUG facilities available */
#define PG_AUTOCTL_DEBUG "PG_AUTOCTL_DEBUG"
Expand Down
4 changes: 2 additions & 2 deletions src/monitor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the PostgreSQL License.

EXTENSION = pgautofailover
EXTVERSION = 1.1
EXTVERSION = 1.2

SRC_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

Expand All @@ -22,5 +22,5 @@ USE_PGXS = 1

include $(PGXS)

$(EXTENSION)--1.1.sql: $(EXTENSION).sql
$(EXTENSION)--1.2.sql: $(EXTENSION).sql
cat $^ > $@
2 changes: 1 addition & 1 deletion src/monitor/metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "storage/lockdefs.h"

#define AUTO_FAILOVER_EXTENSION_VERSION "1.1"
#define AUTO_FAILOVER_EXTENSION_VERSION "1.2"
#define AUTO_FAILOVER_EXTENSION_NAME "pgautofailover"
#define AUTO_FAILOVER_SCHEMA_NAME "pgautofailover"
#define AUTO_FAILOVER_FORMATION_TABLE "pgautofailover.formation"
Expand Down
31 changes: 31 additions & 0 deletions src/monitor/pgautofailover--1.1--1.2.sql
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.
2 changes: 1 addition & 1 deletion src/monitor/pgautofailover.control
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

0 comments on commit fbe6c57

Please sign in to comment.