pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCheck Postgres DB open mode
3+ messages / 3 participants
[nested] [flat]
* Check Postgres DB open mode
@ 2022-07-14 04:13 Goti <aryan.goti@gmail.com>
2022-07-14 05:41 ` Re: Check Postgres DB open mode Holger Jakobs <holger@jakobs.com>
2022-07-14 12:01 ` Re: Check Postgres DB open mode Ron <ronljohnsonjr@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Goti @ 2022-07-14 04:13 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Check Postgres DB open mode
2022-07-14 04:13 Check Postgres DB open mode Goti <aryan.goti@gmail.com>
@ 2022-07-14 05:41 ` Holger Jakobs <holger@jakobs.com>
1 sibling, 0 replies; 3+ messages in thread
From: Holger Jakobs @ 2022-07-14 05:41 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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
Attachments:
OpenPGP_signature (application/pgp-signature, 202B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Check Postgres DB open mode
2022-07-14 04:13 Check Postgres DB open mode Goti <aryan.goti@gmail.com>
@ 2022-07-14 12:01 ` Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ron @ 2022-07-14 12:01 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-07-14 12:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 04:13 Check Postgres DB open mode Goti <aryan.goti@gmail.com>
2022-07-14 05:41 ` Holger Jakobs <holger@jakobs.com>
2022-07-14 12:01 ` Ron <ronljohnsonjr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox