databases/postgresql-wal2json: Add new port

Add postgresql-wal2json, an output plugin for logical decoding.

WWW:		https://github.com/eulerto/wal2json

PR:		257904
This commit is contained in:
Daniel Morante 2023-08-22 10:13:29 +02:00 committed by Juraj Lutter
parent 0f386067b1
commit ad47ed371c
5 changed files with 49 additions and 0 deletions

View file

@ -672,6 +672,7 @@
SUBDIR += postgresql-rum
SUBDIR += postgresql-semver
SUBDIR += postgresql-tds_fdw
SUBDIR += postgresql-wal2json
SUBDIR += postgresql-zhparser
SUBDIR += postgresql11-client
SUBDIR += postgresql11-contrib

View file

@ -0,0 +1,23 @@
PORTNAME= wal2json
PORTVERSION= 2.5
CATEGORIES= databases
PKGNAMEPREFIX= postgresql${PGSQL_VER:S/.//}-
MAINTAINER= daniel@morante.net
COMMENT= JSON output plugin for changeset extraction for PostgreSQL databases
WWW= https://github.com/getsentry/wal2json/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake pgsql:11-14
WANT_PGSQL= server
USE_GITHUB= yes
GH_ACCOUNT= eulerto
GH_TAGNAME= ${PORTNAME}_${PORTVERSION:S/./_/}
MAKE_ARGS= PG_CONFIG=${LOCALBASE}/bin/pg_config
PLIST_FILES= lib/postgresql/wal2json.so
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1692687620
SHA256 (eulerto-wal2json-2.5-wal2json_2_5_GH0.tar.gz) = b516653575541cf221b99cf3f8be9b6821f6dbcfc125675c85f35090f824f00e
SIZE (eulerto-wal2json-2.5-wal2json_2_5_GH0.tar.gz) = 91040

View file

@ -0,0 +1,5 @@
wal2json is an output plugin for logical decoding. It means that the plugin have
access to tuples produced by INSERT and UPDATE. Also, UPDATE/DELETE old row
versions can be accessed depending on the configured replica identity.
Changes can be consumed using the streaming protocol (logical replication slots)
or by a special SQL API.

View file

@ -0,0 +1,17 @@
[
{ type: install
message: <<EOM
You need to set up at least two parameters in postgresql.conf:
wal_level = logical
#
# these parameters only need to set in versions 9.4, 9.5 and 9.6
# default values are ok in version 10 or later
#
max_replication_slots = 10
max_wal_senders = 10
After changing these parameters, a restart is needed.
EOM
}
]