Re: Check Postgres DB open mode

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Check Postgres DB open mode
Date: 2022-07-14 05:41:28
Message-ID: 2646aa97-c183-59e5-fa69-43532da700a2@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2022-07-14 12:01:07 Re: Check Postgres DB open mode
Previous Message Goti 2022-07-14 04:13:46 Check Postgres DB open mode