11 days ago
Setup: Project with two persistent environments, production and staging. A Postgres service (Postgres) exists in both — staging was created via Duplicate Environment, so it inherited an instance of Postgres.
In production, Postgres is the live database (active use).
In staging, that Postgres instance is unused/asleep, while staging's real DB is a separate service (Postgres-Aesd). So, staging's Postgres is an orphaned leftover from the duplication. I want to remove only staging's instance of the shared Postgres service, without affecting the production instance or its data/volume.
Questions:
Does Delete Service (in the service's settings) remove the service from all environments? As in, would it also delete the production Postgres instance and its volume? Or is it scoped to the current environment?
Is there a supported way to remove/detach a service from a single environment only, leaving its instances in other environments untouched?
Could removing the staging instance affect the production instance's volume/data in any way?
I want to be certain before acting, the production instance is a live database I can't lose. Thanks in advance!
1 Replies
Status changed to Awaiting Railway Response Railway • 11 days ago
11 days ago
"Delete Service" in the service's own settings (the danger zone) removes it from the environment you're currently viewing only, so your production Postgres and its volume will be untouched if you do this while viewing staging. However, the "Manage Services" section in project settings deletes the service from all environments, so avoid that path. To safely remove only the staging instance, open the Postgres service while viewing the staging environment, go to its Settings, and use the delete option there. Each environment's volume is independent, so removing the staging instance has no effect on production's data.
Status changed to Awaiting User Response Railway • 11 days ago
Status changed to Solved sam-a • 11 days ago