Error in dbConnect(): linux socket location moved
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 343
- Forks
- 82
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 9
Description
I'm running Postgres 15 and the current CRAN RPostgres on debian 12.
When I do:
> con <- dbConnect(Postgres())
I get the following:
Error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I confirmed via psql that the database is running and accessible with current user.
Some poking around:
$ netstat -nlp | grep 5432
shows the socket at /var/run/postgresql/.s.PGSQL.5432
I was able to get a successful dbConnect() after doing:
$ ln -s /var/run/postgresql/.s.PGSQL.5432 /tmp
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dbConnect(Postgres()) entry point and inspect how the default PostgreSQL Unix-socket location is selected on Debian 12. Reproduce with PostgreSQL 15 and compare the configured socket path with /var/run/postgresql; done means dbConnect(Postgres()) succeeds without creating a /tmp symlink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, postgresql, r
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100