Re: Need Help On Upgrade

2023-07-11 Thread Johnathan Tiamoh
Thank you very much @Adrian Klaver . On Tue, Jul 11, 2023 at 7:32 PM Adrian Klaver wrote: > On 7/11/23 14:45, Johnathan Tiamoh wrote: > > Hello Adrian > > > > 1) PgBouncer version. > > > > pgbouncer.1.7.2 > > PgBouncer most recent version is from here: > >

Re: psql -af > out, is possible to also have raise notice, raise info part.

2023-07-11 Thread jian he
On Wed, Jul 12, 2023 at 12:06 PM David G. Johnston wrote: > > On Tue, Jul 11, 2023 at 8:52 PM jian he wrote: >> >> hi. >> >> test.sql content: >> -- >> do $$ >> begin >> raise info 'information

Re: psql -af > out, is possible to also have raise notice, raise info part.

2023-07-11 Thread David G. Johnston
On Tue, Jul 11, 2023 at 8:52 PM jian he wrote: > hi. > > test.sql content: > > -- > do $$ > begin > raise info 'information message %', now() ; > raise debug 'debug message %', now(); > raise

psql -af > out, is possible to also have raise notice, raise info part.

2023-07-11 Thread jian he
hi. test.sql content: -- do $$ begin raise info 'information message %', now() ; raise debug 'debug message %', now(); raise notice 'notice message %', now(); end $$;

Re: Need Help On Upgrade

2023-07-11 Thread Benedict Holland
This also sounds like a fairly advanced setup and a corporate environment. Postgresql offers paid support and you probably want that. Thanks, Ben On Tue, Jul 11, 2023, 4:33 PM Adrian Klaver wrote: > On 7/11/23 14:45, Johnathan Tiamoh wrote: > > Hello Adrian > > > > 1) PgBouncer version. > > >

Re: Is anyone using db_user_namespace?

2023-07-11 Thread Nathan Bossart
On Tue, Jul 11, 2023 at 10:24:55AM +0900, Ian Lawrence Barwick wrote: > Never used it myself; funnily enough I stumbled on it a few weeks back > and wondered if it was some nifty feature I'd overlooked, then I realized > I've stumbled across it before several times and each time promptly >

Re: Need Help On Upgrade

2023-07-11 Thread Adrian Klaver
On 7/11/23 14:45, Johnathan Tiamoh wrote: Hello Adrian 1) PgBouncer version. pgbouncer.1.7.2 PgBouncer most recent version is from here: http://www.pgbouncer.org/changelog.html PgBouncer 1.19.x 2023-05-31 - PgBouncer 1.19.1 - “Sunny Spring” And since 1.7.x there have been these

Re: Need Help On Upgrade

2023-07-11 Thread Johnathan Tiamoh
Hello Adrian 1) PgBouncer version. pgbouncer.1.7.2 2) Did you change the settings when going from 9.5 to 14.8? No. I did not do any configuration changes on the bouncers 3) Does the PgBouncer log show anything relevant? No. It does not show anything 4) Does '...through the pgbouncers...'

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread David G. Johnston
On Sat, Jul 8, 2023 at 10:00 AM Lorusso Domenico wrote: > Hello Adrian, > I've created a schema to handle some specific features. > In the schema there are a couple of tables used by many functions (more > than 20). > In other words, I've created a schema as a package (as suggested in many >

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Adrian Klaver
On 7/11/23 12:47, Lorusso Domenico wrote: Adrian I have read your suggestions, but: 1) I need to change path inside a group of function (like a package) not for any connection 2) Yes inside function is clear I can do that 3) some like 1 and, moreover, I can't be sure to create my own role,

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Lorusso Domenico
Adrian I have read your suggestions, but: 1) I need to change path inside a group of function (like a package) not for any connection 2) Yes inside function is clear I can do that 3) some like 1 and, moreover, I can't be sure to create my own role, because the target db will be cloud sql My

Re: Trigger Function question

2023-07-11 Thread Lorusso Domenico
I've just finish to do the same thing. For my needs, I decided to create a table with the information I need for each view (yes I set trigger on view not on table). anyway, hstore is more performant rather than jsonb but both of them could treat NEW and OLD as hashmap (or associative array) Il

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Adrian Klaver
On 7/11/23 12:35, Lorusso Domenico wrote: yes, but this is a code inside each function.  having 20 functions I've to start executing this instruction 20 times, one per function. I know it could work, I looking for something of more smart :-) Here:

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Lorusso Domenico
yes, but this is a code inside each function. having 20 functions I've to start executing this instruction 20 times, one per function. I know it could work, I looking for something of more smart :-) Il giorno dom 9 lug 2023 alle ore 23:21 Adrian Klaver < adrian.kla...@aklaver.com> ha scritto: >

Re: Moving data from huge table slow, min() query on indexed column taking 38s

2023-07-11 Thread Lorusso Domenico
Hello Dimitry, at the end, a table is a file with many other functionalities, these functionalities consume resources. If the DBMS (like oracle or db2) allow us to disable the functionalities so we can perform a copy between tables, otherwise (and often also for oracle and db2) the best approach

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

Re: Need Help On Upgrade

2023-07-11 Thread Adrian Klaver
On 7/11/23 08:53, Johnathan Tiamoh wrote: I can connect. All applications and other users that connect from to the databases through the  pgbouncers can't connect. That would have been a good thing to have mentioned in your first post. I don't use PgBouncer so I am not going to be of much

Re: Need Help On Upgrade

2023-07-11 Thread Johnathan Tiamoh
I can connect. All applications and other users that connect from to the databases through the pgbouncers can't connect. On Tue, Jul 11, 2023 at 11:46 AM Adrian Klaver wrote: > On 7/10/23 20:45, Laurenz Albe wrote: > > On Mon, 2023-07-10 at 20:38 -0400, Johnathan Tiamoh wrote: > >> Below is

Re: Need Help On Upgrade

2023-07-11 Thread Adrian Klaver
On 7/10/23 20:45, Laurenz Albe wrote: On Mon, 2023-07-10 at 20:38 -0400, Johnathan Tiamoh wrote: Below is the full error message. 2023-06-27 05:01:27.385 CDT| XXX (60930)| APPNAME=[unknown]| DB=postgres| USER=grafana| PID=9061| 1| authentication| PGE-28P01: FATAL: 

Re: Need Help On Upgrade

2023-07-11 Thread Johnathan Tiamoh
Hello KK, In the beginning, it was a little challenging, but as the process went on it became easy. No, it was not a multistage upgrade. It was possible to upgrade straight from 9.5 to 14. We did not change anything on the schema. For data type, we alter all tables that were created with OIDs to

Re: search_path for replica-mode

2023-07-11 Thread André Kutepow
Thanks David G. Johnston Am 10.07.2023 um 15:11 schrieb David G. Johnston: On Monday, July 10, 2023, André Kutepow wrote: There is a trigger in the database SET search_path TO "$user", public; CREATE OR REPLACE FUNCTION art__a_iu_func() BEGIN   INSERT

BI Reports and Postgres

2023-07-11 Thread KK CHN
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 NoSQLs are losing the initial hype ? 3. Could someone point out

Re: Problematic enforcement of "ERROR: functions in index predicate must be marked IMMUTABLE"

2023-07-11 Thread Kyotaro Horiguchi
At Mon, 10 Jul 2023 21:28:12 -0400, Tom Lane wrote in > In the end, adding such restrictions would just give a false sense > of security, because there would always be gaps in whatever we did. > As you quote from the documentation, volatility markings are a promise > by the user to the system,

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

Re: pgbouncer best practices

2023-07-11 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]: