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/
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.

Same here FATAL: could not access file "timescaledb": No such file or directory but because I inadvertently started a Postgres v16 whereas all my apps were on v15, but now I can’t seem to start v15 because of this error.

Postgres.app from download
PGAdmin via Homebrew.

Welcome MtnBiker,

If you want to have your data, you’ll need to relink your Postgres.app as brew link postgresql@16 overrides it.

The app recommends you to remove the brew to not collide service ports and so on.

@ jonatasdp Thanks. Since I posted I realize I’m stuck in v16. I’m trying to get back to v15. I have two databases there that I don’t have recent backups of. Once I get back to v15 I’ll export and bring into v16. I was and am getting Postgres via the macOS app, not Homebrew (although I had in the past). I need to get to v15 or find some other way to get those databases back.

Log when I try to start v15 server:

2023-12-12 13:33:18.811 PST [43001] FATAL:  could not access file "timescaledb": No such file or directory
2023-12-12 13:33:18.811 PST [43001] LOG:  database system is shut down

I was working on a db with Timescale in v15 before.

Do you have Timescale running on PG 15?
Edit the postgres.conf file and remove the timescaledb reference as preloaded extension. This line can be removed in case you were not using it before and it will start.