postgresql13/postgresql-var-run-socket.patch
Reinhard Max 4d1e55ad06 - Upgrade to 13.18:
* Restore functionality of ALTER {ROLE|DATABASE} SET role.
  * Fix cases where a logical replication slot's restart_lsn could
    go backwards.
  * Count index scans in contrib/bloom indexes in the statistics
    views, such as the pg_stat_user_indexes.idx_scan counter.
  * Fix crash when checking to see if an index's opclass options
    have changed.
  * https://www.postgresql.org/about/news/p-2965/
  * https://www.postgresql.org/docs/release/13.18/

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=95
2024-11-21 17:45:12 +00:00

49 lines
1.7 KiB
Diff

Change the built-in default socket directory to be /run/postgresql.
For backwards compatibility with (probably non-libpq-based) clients that
might still expect to find the socket in /tmp, also create a socket in
/tmp. This is to resolve communication problems with clients operating
under systemd's PrivateTmp environment, which won't be using the same
global /tmp directory as the server; see bug #825448.
Note that we apply the socket directory change at the level of the
hard-wired defaults in the C code, not by just twiddling the setting in
postgresql.conf.sample; this is so that the change will take effect on
server package update, without requiring any existing postgresql.conf
to be updated. (Of course, a user who dislikes this behavior can still
override it via postgresql.conf.)
--- src/backend/utils/misc/guc.c.orig
+++ src/backend/utils/misc/guc.c
@@ -4159,7 +4159,7 @@ static struct config_string ConfigureNam
},
&Unix_socket_directories,
#ifdef HAVE_UNIX_SOCKETS
- DEFAULT_PGSOCKET_DIR,
+ DEFAULT_PGSOCKET_DIR ", /tmp",
#else
"",
#endif
--- src/bin/initdb/initdb.c.orig
+++ src/bin/initdb/initdb.c
@@ -1091,7 +1091,7 @@ setup_config(void)
#ifdef HAVE_UNIX_SOCKETS
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'",
- DEFAULT_PGSOCKET_DIR);
+ DEFAULT_PGSOCKET_DIR ", /tmp");
#else
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''");
#endif
--- src/include/pg_config_manual.h.orig
+++ src/include/pg_config_manual.h
@@ -201,7 +201,7 @@
* support them yet.
*/
#ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR "/tmp"
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
#else
#define DEFAULT_PGSOCKET_DIR ""
#endif