View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000787 | Pgpool-II | Bug | public | 2023-02-22 11:19 | 2023-03-02 14:27 |
| Reporter | dbxpert | Assigned To | pengbo | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | open | ||
| Product Version | 4.4.1 | ||||
| Summary | 0000787: PCP unix socket path does not match the configuration | ||||
| Description | Hi, I'm having an issue with using pcp frontend clients when I don't give host value as input. For example, when I use pcp_node_info without providing host info as input, it shows the following error: dbxpert@tmaxtibero:~/pgpool/etc$ pcp_node_info -U postgres Password: ERROR: connection to socket "/tmp/.s.PGSQL.9898" failed with error "No such file or directory" Whereas, if I provide host info as input, it works fine: dbxpert@tmaxtibero:~/pgpool/etc$ pcp_node_info -U postgres -h localhost Password: localhost 5432 1 -nan waiting unknown main main 0 none none 2023-02-22 01:48:16 In pgpool.conf, I changed the value of pcp_socket_dir to '/var/run/pgpool' so it's obviously looking for the socket in the wrong directory '/tmp'. When I attached debugger, it looks like when host is not provided, the path is defined as UNIX_DOMAIN_PATH macro, which is '/tmp'. I think it needs to sync with the config value. | ||||
| Steps To Reproduce | (1) change pcp_socket_dir to something other than '/tmp' (2) start pgpool (3) try to connect to pcp without providing host info as input, i.e. pcp_node_info -U postgres (4) the client returns error saying there is no socket file in '/tmp' directory | ||||
| Tags | pcp | ||||
|
|
Forgot to mention that I'm actually using pgpool-II version 4.4.2. Please note that there wasn't a tag for 4.4.2 so I just chose 4.4.1. |
|
|
I think you are installing pgpool from source code. In source code the path is defined: ----------------- #define UNIX_DOMAIN_PATH "/tmp" ----------------- If "-h" option isn't specified, Pgpool-II will be looking for the socket file under the path, which is defined in "UNIX_DOMAIN_PATH". pcp_socket_dir is just the place where the socket file will be created. |
|
|
Yes I saw the source code. If I configured the pcp socket file to be created in a different place than '/tmp', then isn't it natural for me to expect pcp clients to connect to that socket file? If I cannot use the socket file, why is the parameter open so the users can change the directory? |
|
|
Because pcp_* command is complied with "UNIX_DOMAIN_PATH", pcp_* command will be looking for the socket under UNIX_DOMAIN_PATH. This path can only be configured when compiling. This is same as PostgreSQL's "unix_socket_directories". You can set unix_socket_directories to an arbitrary directory, but PostgreSQL will be looking for socket in "/var/run/postgresql" if you are installing PostgreSQL using RPM. |
|
|
Ok it seems like that's just the consensus in postgresql community. Thanks for the reponses |
|
|
I am going to close this one. If you have further questions, you can open another ticket. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-02-22 11:19 | dbxpert | New Issue | |
| 2023-02-22 11:19 | dbxpert | Tag Attached: pcp | |
| 2023-02-22 11:21 | dbxpert | Note Added: 0004284 | |
| 2023-02-22 11:36 | pengbo | Note Added: 0004285 | |
| 2023-02-22 11:38 | pengbo | Assigned To | => pengbo |
| 2023-02-22 11:38 | pengbo | Status | new => feedback |
| 2023-02-22 14:46 | dbxpert | Note Added: 0004286 | |
| 2023-02-22 14:46 | dbxpert | Status | feedback => assigned |
| 2023-02-22 17:17 | pengbo | Note Added: 0004288 | |
| 2023-02-22 17:17 | pengbo | Status | assigned => feedback |
| 2023-02-23 10:31 | dbxpert | Note Added: 0004295 | |
| 2023-02-23 10:31 | dbxpert | Status | feedback => assigned |
| 2023-03-02 14:26 | pengbo | Note Added: 0004301 | |
| 2023-03-02 14:27 | pengbo | Status | assigned => closed |