Hi
Currently pg_create_physical_replication_slot() may refer to
the deprecated wal_level setting "archive":
postgres=# SHOW wal_level ;
wal_level
-----------
minimal
(1 row)
postgres=# SELECT pg_create_physical_replication_slot('some_slot');
ERROR: replication slots can only be used if wal_level is >= archive
Patch changes the error message to:
ERROR: replication slots can only be used if wal_level is "replica" or
"logical"
Explicitly naming the valid WAL levels matches the wording in the wal_level
error hint used in a couple of places, i.e.
"wal_level must be set to "replica" or "logical" at server start."
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
new file mode 100644
index c13be75..82f6e65
*** a/src/backend/replication/slot.c
--- b/src/backend/replication/slot.c
*************** CheckSlotRequirements(void)
*** 763,769 ****
if (wal_level < WAL_LEVEL_REPLICA)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
! errmsg("replication slots can only be used if wal_level >= archive")));
}
/*
--- 763,769 ----
if (wal_level < WAL_LEVEL_REPLICA)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
! errmsg("replication slots can only be used if wal_level is \"replica\" or \"logical\"")));
}
/*
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers