Re: [EXT] YNT: Need help tuning a query

2023-09-30 Thread Amn Ojee Uw
Wow!! This is what I call cryptic!! On 9/29/23 2:46 a.m., Vladimir Sitnikov wrote: Oh, I misplaced the added where conditions. It should have been as follows, however, the overall idea is the same --- orignial.sql +++ tuned_v2.sql @@ -83,6 +83,7 @@                                 AND

Re: cache lookup failed for function 0

2023-09-30 Thread Adrian Klaver
On 9/30/23 11:32, p...@pfortin.com wrote: On Sat, 30 Sep 2023 13:20:14 -0400 Tom Lane wrote: As vanilla as it gets... Standard locale (C). The only odd thing that happened: a system update the other day installed and started something called tracker-miners which I was not happy with:

Re: cache lookup failed for function 0

2023-09-30 Thread pf
On Fri, 29 Sep 2023 18:21:02 -0400 Tom Lane wrote: >p...@pfortin.com writes: >> As a test, rather than use INSERT, I recently wrote a python test script >> to import some 8M & 33M record files with COPY instead. These worked with >> last weekend's data dump. Next, I wanted to look into

Re: cache lookup failed for function 0

2023-09-30 Thread Tom Lane
p...@pfortin.com writes: > Python script and sample file attached... This runs fine for me, both in HEAD and 15.4. (Well, it fails at the last GRANT, seemingly because you wrote "{table}" not "{TABLE}". But the COPY goes through fine.) Assuming that you verified that this specific test case

Re: Gradual migration from integer to bigint?

2023-09-30 Thread grimy . outshine830
On Sat, Sep 30, 2023 at 03:55:20PM +1000, James Healy wrote: > It did make me curious though: would it be possible for postgres to > support gradual migration from integer to bigint in a more > transparent way, where new and updated tuples are written as bigint, > but existing tuples can be read

Re: cache lookup failed for function 0

2023-09-30 Thread pf
On Sat, 30 Sep 2023 08:50:45 -0700 Adrian Klaver wrote: >On 9/30/23 07:01, p...@pfortin.com wrote: >> Hi Adrian,On Fri, 29 Sep 2023 14:27:48 -0700 Adrian Klaver wrote: >> >>> On 9/29/23 1:37 PM, p...@pfortin.com wrote: Hi, > >>> I'm going to say it is the >>> >>> ( -- import only a

Re: cache lookup failed for function 0

2023-09-30 Thread pf
On Sat, 30 Sep 2023 13:40:37 -0700 Adrian Klaver wrote: >On 9/30/23 11:32, p...@pfortin.com wrote: >> On Sat, 30 Sep 2023 13:20:14 -0400 Tom Lane wrote: >> > >> As vanilla as it gets... Standard locale (C). The only odd thing that >> happened: a system update the other day installed and

Re: Gradual migration from integer to bigint?

2023-09-30 Thread Bruce Momjian
On Sat, Sep 30, 2023 at 03:55:20PM +1000, James Healy wrote: > My organization has a number of very large tables (most 100s of GB, a > couple over a Tb) that were created many years ago by a tool that > defaulted to integer PKs rather than bigint. Those PKs have a number > of integer FKs in

Re: cache lookup failed for function 0

2023-09-30 Thread pf
On Sat, 30 Sep 2023 13:20:14 -0400 Tom Lane wrote: >p...@pfortin.com writes: >> Python script and sample file attached... > >This runs fine for me, both in HEAD and 15.4. > >(Well, it fails at the last GRANT, seemingly because you wrote >"{table}" not "{TABLE}". But the COPY goes through

Re: Right version of jdbc

2023-09-30 Thread postgresql439848
Am 30.09.23 um 08:33 schrieb Raivo Rebane: Hi, sometimes I am lucky and don't get the old error, but sometime not. I tried to use PreparedStatement, but I got error - org.postgresql.util.PSQLException: Can't use query methods that take a query string on a PreparedStatement. at

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
It seems so, that if my WEB-INF/lib contains postgres driver then Tomcat gives - No suitable driver found Raivo On Sat, Sep 30, 2023 at 10:18 AM Raivo Rebane wrote: > I fix previous error what was my bad knowledge, > But new error occur which is related to postgres postgis jars. > If You are

Re: cache lookup failed for function 0

2023-09-30 Thread Adrian Klaver
On 9/30/23 07:01, p...@pfortin.com wrote: Hi Adrian,On Fri, 29 Sep 2023 14:27:48 -0700 Adrian Klaver wrote: On 9/29/23 1:37 PM, p...@pfortin.com wrote: Hi, I'm going to say it is the ( -- import only a subset of columns I suspect the -- comment is the issue. I wish it was that easy.

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
Thanks for very much for help. It seems that I can do the test project for new job. In future I use help of chat.gpt Regards Raivo On Sat, Sep 30, 2023 at 11:15 AM wrote: > Am 30.09.23 um 08:33 schrieb Raivo Rebane: > > Hi, > > sometimes I am lucky and don't get the old error, but sometime

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
I fix previous error what was my bad knowledge, But new error occur which is related to postgres postgis jars. If You are kind to answer me more; Java code is : public static boolean CheckIsNewInMushrooms(Connection connection, Point AddLocation, String AddDescription) { boolean IsNew = true;

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
I have put it to github in the old place - https://github.com/raaivore/APIexperiment.git Raivo On Sat, Sep 30, 2023 at 1:53 PM Dave Cramer wrote: > Again, can you please post the solution so others can learn as well ? > > Dave Cramer > www.postgres.rocks > > > On Sat, 30 Sept 2023 at 06:49,

Re: cache lookup failed for function 0

2023-09-30 Thread Pierre Fortin
Ignore this message; I wondered where it went to -- Looks like I accidentally hit Ctrl+Enter; just did that to another... SIGH... On Sat, 30 Sep 2023 09:30:08 -0400 p...@pfortin.com wrote: >On Fri, 29 Sep 2023 14:27:48 -0700 Adrian Klaver wrote:

Re: Right version of jdbc

2023-09-30 Thread Dave Cramer
Again, can you please post the solution so others can learn as well ? Dave Cramer www.postgres.rocks On Sat, 30 Sept 2023 at 06:49, Raivo Rebane wrote: > Thanks for very much for help. > It seems that I can do the test project for new job. > In future I use help of chat.gpt > > Regards >

Re: cache lookup failed for function 0

2023-09-30 Thread pf
Hi Adrian,On Fri, 29 Sep 2023 14:27:48 -0700 Adrian Klaver wrote: >On 9/29/23 1:37 PM, p...@pfortin.com wrote: >> Hi, >> >> select version(); >> PostgreSQL 15.4 on x86_64-mageia-linux-gnu, >> compiled by gcc (Mageia 12.3.0-3.mga9) 12.3.0, 64-bit >> >> As a test, rather than use INSERT, I recently

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
Hi, sometimes I am lucky and don't get the old error, but sometime not. I tried to use PreparedStatement, but I got error - org.postgresql.util.PSQLException: Can't use query methods that take a query string on a PreparedStatement. at

Re: cache lookup failed for function 0

2023-09-30 Thread Adrian Klaver
On 9/30/23 14:54, p...@pfortin.com wrote: On Sat, 30 Sep 2023 13:40:37 -0700 Adrian Klaver wrote: On 9/30/23 11:32, p...@pfortin.com wrote: As I told Tom, the "test" DB has this issue; the production and test1 DBs are fine; I should have thought to check those first... Sorry for the noise.

Re: cache lookup failed for function 0

2023-09-30 Thread Tom Lane
Adrian Klaver writes: > On 9/30/23 14:54, p...@pfortin.com wrote: >> As I told Tom, the "test" DB has this issue; the production and test1 DBs >> are fine; I should have thought to check those first... Sorry for the >> noise. > Still there was an issue with a database. Did you track down what

Re: Gradual migration from integer to bigint?

2023-09-30 Thread Ron
On 9/30/23 22:37, Tom Lane wrote: [snip] especially not a break that adds more per-row overhead. So really the only way forward for this would be to provide more automation for the existing conversion processes involving table rewrites. When altering an unindexed INT to BIGINT, do all of the

Re: Gradual migration from integer to bigint?

2023-09-30 Thread James Healy
On Sun, 1 Oct 2023 at 04:35, Bruce Momjian wrote: > I think this talk will help you: > > https://www.youtube.com/watch?v=XYRgTazYuZ4 Thanks, I hadn't seen that talk and it's a good summary of the issue and available solutions. However it doesn't really address the question of a gradual

Re: Gradual migration from integer to bigint?

2023-09-30 Thread Tom Lane
James Healy writes: > However it doesn't really address the question of a gradual migration > process that can read 32bit ints but insert/update as 64bit bigints. I > remain curious about whether the postgres architecture just makes that > implausible, or if it could be done and just hasn't

Re: cache lookup failed for function 0

2023-09-30 Thread pf
Hi Adrian & Tom, On Sat, 30 Sep 2023 15:57:32 -0700 Adrian Klaver wrote: >On 9/30/23 14:54, p...@pfortin.com wrote: >> On Sat, 30 Sep 2023 13:40:37 -0700 Adrian Klaver wrote: >> >>> On 9/30/23 11:32, p...@pfortin.com wrote: > >> >> As I told Tom, the "test" DB has this issue; the