Re: Determine if a user and database are available

2022-09-02 Thread Tom Lane
Ron writes: > On 9/2/22 17:21, Tom Lane wrote: >> That's a feature actually. The intended use of pg_isready is to >> find out if the server is alive, not whether any particular user >> or database name is correct. > Then what's the point of the --username=USERNAME connection option? That's expl

Re: Determine if a user and database are available

2022-09-02 Thread Adrian Klaver
On 9/2/22 17:33, Ron wrote: On 9/2/22 17:21, Tom Lane wrote: Jeffrey Walton writes: I have another beginner question. I am trying to use pg_isready to determine if a database and user are present. The program seems to always succeed, even when I delete the user or the database. That's a featu

Re: Determine if a user and database are available

2022-09-02 Thread Ron
On 9/2/22 17:21, Tom Lane wrote: Jeffrey Walton writes: I have another beginner question. I am trying to use pg_isready to determine if a database and user are present. The program seems to always succeed, even when I delete the user or the database. That's a feature actually. The intended us

Re: Determine if a user and database are available

2022-09-02 Thread Tom Lane
Jeffrey Walton writes: > I have another beginner question. I am trying to use pg_isready to > determine if a database and user are present. The program seems to > always succeed, even when I delete the user or the database. That's a feature actually. The intended use of pg_isready is to find out

Re: Determine if a user and database are available

2022-09-02 Thread David G. Johnston
On Friday, September 2, 2022, Jeffrey Walton wrote: > > Given the NOTES in the man page, how do we determine if a user and > database are present using the shell? Is there another utility we > should be using? > Literally every other shell program that requires logging into the database will fai

Re: Determine if a user and database are available

2022-09-02 Thread Christophe Pettus
> On Sep 2, 2022, at 14:22, Jeffrey Walton wrote: > Given the NOTES in the man page, how do we determine if a user and > database are present using the shell? Is there another utility we > should be using? pg_isready literally only checks that the server can be reached over the connection pat

Determine if a user and database are available

2022-09-02 Thread Jeffrey Walton
Hi Everyone, I have another beginner question. I am trying to use pg_isready to determine if a database and user are present. The program seems to always succeed, even when I delete the user or the database. This baffles me from the man page. I guess this explains the behavior I am seeing. N

RE: Unable to archive logs in standby server

2022-09-02 Thread Meera Nair
Hi Christophe, If pg_stop_backup is executed in master OR if standby server is restarted, I can see the archiving completing fine. Only issue is while manually executing the pg_stop_backup in standby Regards, Meera -Original Message- From: Christophe Pettus Sent: Friday, September 2,

Re: How to make PostreSQL utilities honor home directories?

2022-09-02 Thread Jeffrey Walton
On Fri, Sep 2, 2022 at 7:34 AM Peter J. Holzer wrote: > > On 2022-09-01 20:49:56 -0400, Jeffrey Walton wrote: > > On Thu, Sep 1, 2022 at 8:23 PM Peter J. Holzer wrote: > > > > > > On 2022-09-01 18:16:14 -0400, Tom Lane wrote: > > > > Jeffrey Walton writes: > > > > > We are having a heck of a tim

Re: Unable to archive logs in standby server

2022-09-02 Thread Christophe Pettus
> On Sep 1, 2022, at 21:41, Meera Nair wrote: > Archival hangs. Is this expected? > postgres=# select pg_start_backup('test', true, false); > pg_start_backup > - > 1/F960 > (1 row) > > postgres=# select pg_stop_backup('f'); > NOTICE: base backup done, waiting for required

RE: Unable to archive logs in standby server

2022-09-02 Thread Meera Nair
Hi, I am still facing issue with executing pg_stop_backup in standby manually. Copying from previous email - Archival hangs. Is this expected? postgres=# select pg_start_backup('test', true, false); pg_start_backup - 1/F960 (1 row) postgres=# select pg_stop_backup('f'); NOTICE

Re: How to make PostreSQL utilities honor home directories?

2022-09-02 Thread Peter J. Holzer
On 2022-09-01 20:49:56 -0400, Jeffrey Walton wrote: > On Thu, Sep 1, 2022 at 8:23 PM Peter J. Holzer wrote: > > > > On 2022-09-01 18:16:14 -0400, Tom Lane wrote: > > > Jeffrey Walton writes: > > > > We are having a heck of a time getting PostreSQL utilities to honor > > > > home directories. For

Re: How to make PostreSQL utilities honor home directories?

2022-09-02 Thread Peter J. Holzer
On 2022-09-01 21:10:44 -0700, Adrian Klaver wrote: > On 9/1/22 6:31 PM, Jeffrey Walton wrote: > > On Thu, Sep 1, 2022 at 8:51 PM Tom Lane wrote: > > > I concur with the other person asking why you want to sudo to postgres > > > at all, though. It's generally safest if the client side isn't runnin

Re: Missing query plan for auto_explain.

2022-09-02 Thread Peter J. Holzer
On 2022-09-02 10:58:58 +0100, Matheus Martin wrote: > Yes, we do see some plans logged by the auto_explain. We couldn't find a > `auto_explain.log_min_duration_statements` setting This is weird as the documentation says: | Note that the default behavior is to do nothing, so you must set at | leas

Re: Missing query plan for auto_explain.

2022-09-02 Thread Matheus Martin
Yes, we do see some plans logged by the auto_explain. We couldn't find a `auto_explain.log_min_duration_statements` setting but `log_min_duration_statement` as in https://www.postgresql.org/docs/current/runtime-config-logging.html is set to 100 ms. Unfortunately, due to the amount of traffic we ha