diff options
Diffstat (limited to 'meta-networking/recipes-support/pgpool2/pgpool2')
4 files changed, 81 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch b/meta-networking/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch new file mode 100644 index 0000000000..52bcc3b7e3 --- /dev/null +++ b/meta-networking/recipes-support/pgpool2/pgpool2/0001-Fix-build-error-when-build-this-file.patch @@ -0,0 +1,32 @@ +From f8ab74a76049f69adeebe92c62593547e05a075d Mon Sep 17 00:00:00 2001 +From: Lei Maohui <leimaohui@fujitsu.com> +Date: Wed, 11 Jan 2023 17:22:41 +0900 +Subject: [PATCH] Fix build error when build this file. + +| snprintf.c:770:64: error: 'PG_STRERROR_R_BUFLEN' undeclared (first use in this function) +| 770 | char errbuf[PG_STRERROR_R_BUFLEN]; +| | ^~~~~~~~~~~~~~~~~~~~ + +PG_STRERROR_R_BUFLEN is defined in postgresql, but pgpool doesn't +include the header of postgresql. + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> +--- + src/parser/snprintf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/parser/snprintf.c b/src/parser/snprintf.c +index 84ebdb2..3387897 100644 +--- a/src/parser/snprintf.c ++++ b/src/parser/snprintf.c +@@ -46,6 +46,7 @@ + #include "pool_parser.h" + #include "stringinfo.h" + #include "utils/palloc.h" ++#include "postgresql/server/port.h" + + /* + * We used to use the platform's NL_ARGMAX here, but that's a bad idea, +-- +2.25.1 diff --git a/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch b/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch new file mode 100644 index 0000000000..3ae9b1bd9a --- /dev/null +++ b/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch @@ -0,0 +1,25 @@ +Define SIGNAL_ARGS if its not defined, this is flagged with +newer C compilers e.g. clang18, where if it is not defined +then it ends up with compiler errors + +/usr/include/postgresql/server/port.h:488:28: error: a parameter l +ist without types is only allowed in a function definition +| 488 | typedef void (*pqsigfunc) (SIGNAL_ARGS); +| | ^ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/src/include/pool_type.h ++++ b/src/include/pool_type.h +@@ -125,7 +125,9 @@ extern void ExceptionalCondition(const c + #define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN)) + #define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN)) + #define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN)) +- ++#ifndef SIGNAL_ARGS ++#define SIGNAL_ARGS int postgres_signal_arg ++#endif + /* + * It seems that sockaddr_storage is now commonly used in place of sockaddr. + * So, define it if it is not define yet, and create new SockAddr structure diff --git a/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.service b/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.service new file mode 100644 index 0000000000..bf2d323639 --- /dev/null +++ b/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.service @@ -0,0 +1,17 @@ +[Unit] +Description=Pgpool-II +After=syslog.target network.target + +[Service] + +User=postgres +Group=postgres + +EnvironmentFile=-/etc/sysconfig/pgpool + +ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS +ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $STOP_OPTS stop +ExecReload=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf reload + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.sysconfig b/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.sysconfig new file mode 100644 index 0000000000..ea13089b7b --- /dev/null +++ b/meta-networking/recipes-support/pgpool2/pgpool2/pgpool.sysconfig @@ -0,0 +1,7 @@ +# Options for pgpool + +# -n: don't run in daemon mode. does not detach control tty +# -d: debug mode. lots of debug information will be printed + +#OPTS=" -d -n" +OPTS=" -n" |