diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-08-10 17:26:44 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-08-10 17:27:15 -0400 |
commit | c9b0cbe98bd783e24a8c4d8d8ac472a494b81292 (patch) | |
tree | 1d4459d614fe104efa5c8d6881b5ef347a523b11 /src/include/miscadmin.h | |
parent | 85642ec00b5e0c58d2504b10c079693b8fb28cc5 (diff) | |
download | postgresql-c9b0cbe98bd783e24a8c4d8d8ac472a494b81292.tar.gz postgresql-c9b0cbe98bd783e24a8c4d8d8ac472a494b81292.zip |
Support having multiple Unix-domain sockets per postmaster.
Replace unix_socket_directory with unix_socket_directories, which is a list
of socket directories, and adjust postmaster's code to allow zero or more
Unix-domain sockets to be created.
This is mostly a straightforward change, but since the Unix sockets ought
to be created after the TCP/IP sockets for safety reasons (better chance
of detecting a port number conflict), AddToDataDirLockFile needs to be
fixed to support out-of-order updates of data directory lockfile lines.
That's a change that had been foreseen to be necessary someday anyway.
Honza Horak, reviewed and revised by Tom Lane
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r-- | src/include/miscadmin.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 8df2a28126a..9f57989f805 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -411,7 +411,7 @@ extern char *local_preload_libraries_string; * 2 data directory path * 3 postmaster start timestamp (time_t representation) * 4 port number - * 5 socket directory path (empty on Windows) + * 5 first Unix socket directory path (empty if none) * 6 first listen_address (IP address or "*"; empty if no TCP port) * 7 shared memory key (not present on Windows) * @@ -429,8 +429,9 @@ extern char *local_preload_libraries_string; #define LOCK_FILE_LINE_SHMEM_KEY 7 extern void CreateDataDirLockFile(bool amPostmaster); -extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster); -extern void TouchSocketLockFile(void); +extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster, + const char *socketDir); +extern void TouchSocketLockFiles(void); extern void AddToDataDirLockFile(int target_line, const char *str); extern void ValidatePgVersion(const char *path); extern void process_shared_preload_libraries(void); |