Deploying TimescaleDB over PSQL instance

I am trying to deploy a timescale db according to flyio docs, so I am basically executing the following routine:

$ fly postgres create --name tsql-ll --org ORG --volume-size 200 --vm-size “shared-cpu-1x” --initial-cluster-size 1
$ fly ips allocate-v4 --app tsql-ll

Here, I am able to access the database from my personal laptop.

$ fly pg config update --shared-preload-libraries timescaledb --app tsql-ll

After the configuration update, the psql instance reboots and never works again. Not sure what I am doing wrong here…

After several trials of create/delete psql instances, I am no longer able to create instances, since all apps get into “pending” state after running fly psql create. Maybe there is some maintenance underway that I am not aware of.

Thank you.

@solid I need to update the documentation. I’m sorry about that.

Here’s how you can enable timescaledb on the new flex implementation: GitHub - fly-apps/postgres-flex: Postgres HA setup using repmgr

The image specified in the README will have timescaledb installed and the library will be enabled for you by default.

1 Like

Thank you for your swift answer!

I changed my creation command to :

$ fly postgres create --name tsql-ll --org ORG --volume-size 200 --vm-size "shared-cpu-1x" --initial-cluster-size 1 --image-ref flyio/postgres-flex-timescaledb:15

After running the sql query bellow everything started to work:


But I noticed something odd with the logging that might be an issue on end:

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | [2023-02-28 17:41:42] [NOTICE] repmgrd (repmgrd 5.3.3) starting up

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | [2023-02-28 17:41:42] [INFO] connecting to database “host=XXXX:7289:2 port=5433 user=repmgr dbname=repmgr connect_timeout=10”

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | [2023-02-28 17:41:42] [ERROR] connection to database failed

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | [2023-02-28 17:41:42] [DETAIL]

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | connection to server at “XXXX:7289:2”, port 5433 failed: Connection refused

2023-02-28T17:41:42.801 app[XXX] lhr [info] repmgrd | Is the server running on that host and accepting TCP/IP connections?

28T17:44:59.794 app[XXX] lhr [info] failed post-init: failed to establish connection to local node: failed to connect to host=XXXX:7289:2 user=postgres database=postgres: dial error (dial tcp [XXXX:7289:2]:5433: connect: connection refused). Retrying…

Let me take a look

1 Like

So it looks like you created a new app with the same name as your old app. Generally this is not a problem, but there was an issue that prevented one of your old machines from getting cleaned up properly. Your new machine came up perfectly, but the old Machine will still cropping up in your logs given the Machine resides within the same org and the apps share the same name.

I went a head and cleaned up your old Machine and you should be good to go.

1 Like

Everything looks perfect. Thank you for your time, excellent support.

1 Like