Skip to content
Postgres PITR, PostGIS, and Networking Questions
hxkhan
OP

4 days ago

Hi everyone,

We're evaluating Railway for a production app: a Next.js web service, a separate worker service, and Postgres, deployed in the Southeast Asia (Singapore) region. The data is business-critical, so backups and restores are our main concern. We have a few questions before we commit and would love to hear from anyone with experience running similar setups here.

Postgres version and extensions

  1. Can we run Postgres 18 with PostGIS 3.6 on Railway? We also need the btree_gist extension (we use an exclusion constraint). Is that available through the standard PostGIS template, or should we bring our own image (postgis/postgis:18-3.6)?

Point-in-time recovery

  1. Does Railway's PITR (pgBackRest WAL archiving) work with the PostGIS template, or with a custom Postgres image, or only with the standard Postgres image?
  2. What is the recovery point objective in practice: how often is WAL archived (per segment, or also on a timer such as archive_timeout), and how much data could we lose in the worst case?
  3. How long are base backups and WAL retained, and can we change the retention?
  4. Where is the PITR bucket stored? Can it be in the same region as the database (Singapore), and is it stored separately from the database volume, so that losing the volume or the service doesn't lose the backups?
  5. How does a restore work: is it in place, or into a new service/volume that we then switch to? Roughly how long does it take for a database of a few GB, and can we restore to a separate service to test without touching production?
  6. If a project or service is deleted by mistake, what can still be recovered, and for how long?

Availability and operations

  1. Is Postgres a single container on a single volume, or is there any replication or automatic failover? If a host fails, what happens and how quickly is the database back?
  2. Does Railway ever move a service or volume to another region or host without the owner's action? We saw a forum report of a database being moved to Southeast Asia. If they do, how are we notified, and is there downtime?
  3. How are Postgres minor and major version upgrades handled?
  4. Can we set max_connections and other postgresql.conf settings?

Networking for the app

  1. Do long-lived connections work? Our app keeps a Postgres connection open with LISTEN/NOTIFY, and serves Server-Sent Events (HTTP responses held open for many minutes, with a heartbeat every 25 seconds). Is there a maximum duration or idle timeout on HTTP responses through the Railway proxy?
  2. When a service is redeployed or scaled down, how long is the grace period after SIGTERM before SIGKILL?

Support and cost

  1. For those on the Pro plan, what support response times have you actually experienced, and is there a higher tier for production databases?
  2. How is PITR storage billed (per GB of WAL and base backups)?

Thanks in advance for any insights!

$20 Bounty

1 Reply

Status changed to Awaiting Railway Response Railway • 4 days ago


Railway
BOT

4 days ago

PostGIS runs today through the standalone PostGIS template; it is not in our official Postgres image and cannot be converted to HA. We have not verified btree_gist or Postgres 18 with PostGIS 3.6 in that template, so test it first.

PITR is built into our Postgres image. When enabled, it archives every WAL segment to a separate storage bucket with archive_timeout=60, takes a weekly full and daily differential base backup, and keeps the last 4 fulls, roughly 4 weeks. A restore never touches the source: it creates a new service from the archive, and you cut over manually, so testing restores is safe. PITR is billed as bucket storage plus upload egress on compressed data; restores are free. See Point-in-Time Recovery.

A project deleted from the dashboard can be restored for 48 hours. A deleted service is removed immediately, and a deleted bucket stays restorable for about two days. Beyond those windows, we do not perform data restoration.

Standalone Postgres is one container on one volume. If its host fails, the workload is rescheduled once the host is recovered, so for mission-critical databases we advise HA, which does not support PostGIS.

Server-Sent Events stream through our edge without buffering. After SIGTERM, the old deployment gets a configurable draining time before SIGKILL, set in service settings or RAILWAY_DEPLOYMENT_DRAINING_SECONDS (docs).

We could not confirm HTTP idle limits, Railway-initiated host or region moves, version upgrades, or postgresql.conf access for this setup.


Status changed to Awaiting User Response Railway • 4 days ago


Railway
BOT

4 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 4 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...