Re: Check Postgres DB open mode - Mailing list pgsql-admin

From Holger Jakobs
Subject Re: Check Postgres DB open mode
Date
Msg-id 2646aa97-c183-59e5-fa69-43532da700a2@jakobs.com
Whole thread Raw
In response to Check Postgres DB open mode  (Goti <aryan.goti@gmail.com>)
List pgsql-admin
Am 14.07.22 um 06:13 schrieb Goti:
Hi Listers,

I am new to postgres and would like to know how to check whether the DB is opened in read write mode or read-only mode.

Thanks,

Goti

Hi Goti,

The PostgreSQL database isn't "opened", but the clients connect to it.

Whether the connection is read-only can be found out by executing the command

    show transaction_read_only

Unless you are connected to a standby server, connections will be read-write.

Regards,

Holger


-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Attachment

pgsql-admin by date:

Previous
From: Goti
Date:
Subject: Check Postgres DB open mode
Next
From: Ron
Date:
Subject: Re: Check Postgres DB open mode