FATAL: could not access file "timescaledb": No such file or directory

I had left my installation for a few weeks and could not remember how I set it up or get it started! So I decided to start again. As you do.

However, my PostgreSQL logs are filled with entires like this:

2023-07-07 07:16:50.214 BST [34596] FATAL:  could not access file "timescaledb": No such file or directory
2023-07-07 07:16:50.214 BST [34596] LOG:  database system is shut down
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.

For one thing, I am not starting it as root, but as my own account. So I don’t know why it’s complaining about that.

More importantly, why can’t it find the installation? I installed PostgreSQL@14 using brew, but then it seemingly did that as part of the installation of TimescaleDB anyway.

So I ran the standard commands:

brew tap timescale/tap
brew install timescaledb
timescaledb-tune --quiet --yes
cd /opt/homebrew/Cellar/timescaledb/2.11.1/bin/
./timescaledb_move.sh
brew services restart postgresql@14

What’s going on with this? I had to specify the conf path when running timescaledb-tune, since it could not find it.

Hi Mark, I remember I fall into something similar a few days ago because I have multiple versions of postgresql and for some reason I need to relink postgres again.

When I read your post, my first action was double check the actual version and it seems 14 so you’re good to go with your actual version. If you for some reason got like postgresql 15 then probably you’ll need to brew relink postgresql@14 to use it.

I remember I struggled a lot and that was a very confusing process because of my multiple installations. AFAIR the timescaledb_tune uses the pg_config, so you can also double check if pg_config path is using the right path for pg 14.