Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- 15
- 16
- 17
- 18
TEST:
- multi
- single
Expand Down
20 changes: 6 additions & 14 deletions src/bin/lib/pg/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,16 +550,12 @@ dopr(PrintfTarget *target, const char *format, va_list args)
longflag = 1;
goto nextch2;
case 'z':
#if SIZEOF_SIZE_T == 8
#ifdef HAVE_LONG_INT_64
#if SIZEOF_SIZE_T == SIZEOF_LONG
longflag = 1;
#elif defined(HAVE_LONG_LONG_INT_64)
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
longlongflag = 1;
#else
#error "Don't know how to print 64bit integers"
#endif
#else
/* assume size_t is same size as int */
#error "cannot find integer type of the same size as size_t"
#endif
goto nextch2;
case 'h':
Expand Down Expand Up @@ -817,16 +813,12 @@ find_arguments(const char *format, va_list args,
longflag = 1;
goto nextch1;
case 'z':
#if SIZEOF_SIZE_T == 8
#ifdef HAVE_LONG_INT_64
#if SIZEOF_SIZE_T == SIZEOF_LONG
longflag = 1;
#elif defined(HAVE_LONG_LONG_INT_64)
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
longlongflag = 1;
#else
#error "Don't know how to print 64bit integers"
#endif
#else
/* assume size_t is same size as int */
#error "cannot find integer type of the same size as size_t"
#endif
goto nextch1;
case 'h':
Expand Down
35 changes: 35 additions & 0 deletions src/monitor/expected/upgrade_1.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- Copyright (c) Microsoft Corporation. All rights reserved.
-- Licensed under the PostgreSQL License.
CREATE EXTENSION pgautofailover VERSION '1.0';
\dx pgautofailover
List of installed extensions
Name | Version | Default version | Schema | Description
----------------+---------+-----------------+--------+------------------
pgautofailover | 1.0 | 2.2 | public | pg_auto_failover
(1 row)

ALTER EXTENSION pgautofailover UPDATE TO '1.1';
\dx pgautofailover
List of installed extensions
Name | Version | Default version | Schema | Description
----------------+---------+-----------------+--------+------------------
pgautofailover | 1.1 | 2.2 | public | pg_auto_failover
(1 row)

ALTER EXTENSION pgautofailover UPDATE TO '1.2';
\dx pgautofailover
List of installed extensions
Name | Version | Default version | Schema | Description
----------------+---------+-----------------+--------+------------------
pgautofailover | 1.2 | 2.2 | public | pg_auto_failover
(1 row)

ALTER EXTENSION pgautofailover UPDATE TO '1.3';
\dx pgautofailover
List of installed extensions
Name | Version | Default version | Schema | Description
----------------+---------+-----------------+--------+------------------
pgautofailover | 1.3 | 2.2 | public | pg_auto_failover
(1 row)

DROP EXTENSION pgautofailover;
1 change: 1 addition & 0 deletions src/monitor/node_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/* list_qsort is only in Postgres 11 and 12 */
#include "version_compat.h"

#include "group_state_machine.h"
#include "health_check.h"
#include "metadata.h"
#include "node_metadata.h"
Expand Down
2 changes: 1 addition & 1 deletion src/monitor/pg_auto_failover.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "tcop/utility.h"


ProcessUtility_hook_type PreviousProcessUtility_hook = NULL;
static ProcessUtility_hook_type PreviousProcessUtility_hook = NULL;


#if PG_VERSION_NUM >= 150000
Expand Down
4 changes: 2 additions & 2 deletions src/monitor/version_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "postgres.h"

/* we support Postgres versions 10, 11, 12, 13, 14, 15, 16, and 17. */
#if (PG_VERSION_NUM < 100000 || PG_VERSION_NUM >= 180000)
/* we support Postgres versions 10, 11, 12, 13, 14, 15, 16, 17, 18. */
#if (PG_VERSION_NUM < 100000 || PG_VERSION_NUM >= 190000)
#error "Unknown or unsupported postgresql version"
#endif

Expand Down
Loading