How to verify a running Development API’s database connection

Hi everyone,

I’m looking for a supported way to verify two database relationships in a Replit project using managed PostgreSQL:

1. Whether the already-running Development API connects to the same database targeted by Agent’s Development database queries.

2. Whether that database is separate from the database used by the published application.

I understand the documented Development/Production separation. I’m asking how to obtain project-specific evidence of the actual running connection, rather than infer it from source code or matching connection strings.

Can existing platform information or diagnostics establish these relationships? If not, is there a supported approach for safely establishing a verified new Development runtime?

Please describe the method, limitations, and any required access, queries or changes first. I’m seeking guidance only, not authorizing application access or execution.

Technical Support has already received an escalation, but I’d appreciate suggestions for a specific supported method.

Thank you!

The strongest evidence I know of is a marker row, because it tests the live connection and needs no restart. It needs one write to Development.

  1. Pick an existing API endpoint that returns rows from a low-risk table users never see.
  2. Have the Agent insert one labeled row into that table through its Development database query.
  3. Call that endpoint on the running Development API. If the row comes back, the API and the Agent share a database.
  4. Call the same endpoint on the published app. If the row is absent, production is a separate database.

There is one risk. If the two are crossed, the row shows up in the published app until you delete it.

A second, separate approach for zero writes: compare a read-only query from each side, like select current_database(), pg_postmaster_start_time();, but the running API needs a code change and a restart to run it (so it is a new process).

I do not know of a Replit screen that shows which database a running process is attached to, so I would ask support that.

Thank you, this is helpful, especially the distinction between testing the existing connection and verifying a replacement process. I’m reconsidering whether additional runtime verification is necessary under our managed setup, so I’ll retain these options rather than perform any writes or Production requests at this stage.