pgpool2: Added a new recipe.

Pgpool-II is a middleware that works between PostgreSQL servers and a PostgreSQL database client. It is distributed under a license similar to BSD and MIT. It provides the  following features.

Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Lei Maohui authored and Khem Raj committed 2023-03-22 09:10:39 -07:00
1 parent a4b6e3ee89
commit 25ef3eec88
5 files changed
+142

No files matched your search

@@ -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
@@ -0,0 +1,33 @@
From 5d335b5ddd052f047759cae0e9b94ec49f9f3884 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@fujitsu.com>
Date: Mon, 20 Mar 2023 02:03:04 +0000
Subject: [PATCH] pgpool2: Fix unknown type name 'fd_set' error with musl.
| read.c: In function 'read_until_ready_for_query':
| read.c:53:24: error: storage size of 'timeoutval' isn't known
| 53 | struct timeval timeoutval;
| | ^~~~~~~~~~
| read.c:54:9: error: unknown type name 'fd_set'
| 54 | fd_set readmask;
| | ^~~~~~
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
---
src/tools/pgproto/read.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tools/pgproto/read.c b/src/tools/pgproto/read.c
index c7fb548..4efe641 100644
--- a/src/tools/pgproto/read.c
+++ b/src/tools/pgproto/read.c
@@ -19,6 +19,7 @@
#include "../../include/config.h"
#include "pgproto/pgproto.h"
#include <unistd.h>
+#include <sys/select.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
--
2.34.1
@@ -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
@@ -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"