mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 17:16:43 +02:00
It cannot be built against older libpq, so we have to build it as the default version right away. ld: ../../../src/fe_utils/libpgfeutils.a(connect_utils.o): in function `disconnectDatabase': connect_utils.c:(.text+0x35d): undefined reference to `PQcancelCreate' ld: connect_utils.c:(.text+0x369): undefined reference to `PQcancelBlocking' ld: connect_utils.c:(.text+0x372): undefined reference to `PQcancelFinish' Co-Authored-By: Jakub Jirutka <jakub@jirutka.cz>
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
Using /tmp for sockets allows everyone to spoof a PostgreSQL server. Thus use
|
|
/run/postgresql/ for "system" clusters which run as 'postgres' (user
|
|
clusters will still use /tmp). Since system cluster are by far the common case,
|
|
set it as default.
|
|
|
|
This is inspired by Fedora and Debian patches.
|
|
|
|
--- a/src/backend/utils/misc/postgresql.conf.sample
|
|
+++ b/src/backend/utils/misc/postgresql.conf.sample
|
|
@@ -65,7 +65,7 @@
|
|
#max_connections = 100 # (change requires restart)
|
|
#reserved_connections = 0 # (change requires restart)
|
|
#superuser_reserved_connections = 3 # (change requires restart)
|
|
-#unix_socket_directories = '/tmp' # comma-separated list of directories
|
|
+unix_socket_directories = '/run/postgresql' # comma-separated list of directories
|
|
# (change requires restart)
|
|
#unix_socket_group = '' # (change requires restart)
|
|
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
|
|
--- a/src/include/pg_config_manual.h
|
|
+++ b/src/include/pg_config_manual.h
|
|
@@ -206,7 +206,7 @@
|
|
* support them yet.
|
|
*/
|
|
#ifndef WIN32
|
|
-#define DEFAULT_PGSOCKET_DIR "/tmp"
|
|
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
|
|
#else
|
|
#define DEFAULT_PGSOCKET_DIR ""
|
|
#endif
|