Re: Reset Postgresql users password

2023-07-12 Thread Gurjeet Singh
On Wed, Jul 12, 2023 at 12:42 PM Mateusz Henicz wrote: > > You can also just write an sql and execute it, like: > > select 'alter user '|| usename ||' with password ''newpassword'';' from > pg_user; > \gexec Note that the above assumes you're using psql. For tools other than psql, you'd have t

Re: BI Reports and Postgres

2023-07-11 Thread Gurjeet Singh
On Tue, Jul 11, 2023 at 1:45 AM KK CHN wrote: > > List, > 1. For generating BI reports, which Databases are more suitable ( RDBMS like > Postgres OR NoSQL like MongoDB ) ? Which is best? Why ? > > 2. Is NoSQL DBs like MongoDB et all useful in which scenarios and > application context ? or NoS

Re: how to return data from insert into ... on conflict ... returning ... into

2023-07-11 Thread Gurjeet Singh
On Tue, Jun 20, 2023 at 1:26 PM Les wrote: > > https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT > > and the only possible actions are "do nothing" and "do update". The "do > nothing" does not update the record, that is clear. But it also does not > return any data, and tha

Re: pgbouncer best practices

2023-07-10 Thread Gurjeet Singh
On Sun, Jul 9, 2023 at 6:28 AM Rita wrote: > > Is there a way to see how many queued connections there are? Looking at the > stats I can't seem to figure that out. pgbouncer exposes quite a few statistics via the SHOW commands [1]. See if any of those help. [1]: https://www.pgbouncer.org/usage.

Re: pgbouncer best practices

2023-07-07 Thread Gurjeet Singh
On Fri, Jul 7, 2023 at 9:24 AM Rita wrote: > > My question are: is there a ratio of max connections and pool i should use in > my pgbouncer config? Short answer: No, there's no recommended ratio for PG max_connections and pgbouncer pool size. In pgbouncer, a client connection is matched (forwar