Re: Check Postgres DB open mode

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Check Postgres DB open mode
Date: 2022-07-14 12:01:07
Message-ID: 9c1a0cca-c078-6261-5b21-a9fc1009d1c0@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 7/13/22 23:13, Goti wrote:
> 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.

Pedantically, /databases/ are not opened; the /postmaster/ is running or
not.  We of course colloquially /say/ that "the database is open" when the
postmaster is running.

Locally, you can run the command "pg_ctl status", and systemctl probably
also has a status option.

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message flatley 2022-07-14 13:39:44 truncate issue , possibly
Previous Message Holger Jakobs 2022-07-14 05:41:28 Re: Check Postgres DB open mode