Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]

2024-04-18 Thread Kirk Wolak
On Thu, Feb 22, 2024 at 4:49 PM Michael Banck wrote: > Hi, > > On Wed, Jan 24, 2024 at 02:50:52PM -0500, Kirk Wolak wrote: > > On Mon, Jan 22, 2024 at 1:30 AM Kirk Wolak wrote: > > > On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson > wrote: > > >> > On 19 Jan 2024, at 23:09, Kirk Wolak wrote:

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]

2024-02-22 Thread Michael Banck
Hi, On Wed, Jan 24, 2024 at 02:50:52PM -0500, Kirk Wolak wrote: > On Mon, Jan 22, 2024 at 1:30 AM Kirk Wolak wrote: > > On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson wrote: > >> > On 19 Jan 2024, at 23:09, Kirk Wolak wrote: > > Thank you, that made it possible to build and run... > > UNFORT

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]

2024-01-24 Thread Kirk Wolak
On Wed, Jan 24, 2024 at 4:16 PM Thomas Munro wrote: > On Thu, Jan 25, 2024 at 8:51 AM Kirk Wolak wrote: > > getrusage(RUSAGE_SELF, &usage); > > memory_usage_bytes = usage.ru_maxrss * 1024; > > FWIW log_statement_stats = on shows that in the logs. See ShowUsage() > in postgres.c. > Than

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]

2024-01-24 Thread Thomas Munro
On Thu, Jan 25, 2024 at 8:51 AM Kirk Wolak wrote: > getrusage(RUSAGE_SELF, &usage); > memory_usage_bytes = usage.ru_maxrss * 1024; FWIW log_statement_stats = on shows that in the logs. See ShowUsage() in postgres.c.

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [ NOT Fixed ]

2024-01-24 Thread Kirk Wolak
On Mon, Jan 22, 2024 at 1:30 AM Kirk Wolak wrote: > On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson wrote: > >> > On 19 Jan 2024, at 23:09, Kirk Wolak wrote: >> >> ... >> ./configure --with-llvm >> LLVM_CONFIG=/path/to/llvm-config >> >> -- >> Daniel Gustafsson >> > > Thank you, that made

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-21 Thread Kirk Wolak
On Fri, Jan 19, 2024 at 7:03 PM Daniel Gustafsson wrote: > > On 19 Jan 2024, at 23:09, Kirk Wolak wrote: > > > From a FUTURE email, I noticed pg_jit_available() and it's set to f?? > > Right, then this installation does not contain the necessary library to JIT > compile the query. > > > Okay, s

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Daniel Gustafsson
> On 19 Jan 2024, at 23:09, Kirk Wolak wrote: > From a FUTURE email, I noticed pg_jit_available() and it's set to f?? Right, then this installation does not contain the necessary library to JIT compile the query. > Okay, so does this require a special BUILD command? Yes, it requires that you

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Kirk Wolak
On Fri, Jan 19, 2024 at 4:20 AM Laurenz Albe wrote: > On Thu, 2024-01-18 at 19:50 -0500, Kirk Wolak wrote: > > I did a little more checking and the reason I did not see the link > MIGHT be because EXPLAIN did not show a JIT attempt. > > I tried to use settings that FORCE a JIT... But to no ava

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Daniel Gustafsson
> On 19 Jan 2024, at 11:04, Michael Banck wrote: > > Hi, > > On Fri, Jan 19, 2024 at 10:48:12AM +0100, Daniel Gustafsson wrote: >> This does bring up an interesting point, I don't think there is a way >> for a user to know whether the server is jit enabled or not (apart >> from explaining a quer

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Michael Banck
Hi, On Fri, Jan 19, 2024 at 10:48:12AM +0100, Daniel Gustafsson wrote: > This does bring up an interesting point, I don't think there is a way > for a user to know whether the server is jit enabled or not (apart > from explaining a query with costs adjusted but that's not all that > userfriendly).

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Daniel Gustafsson
> On 19 Jan 2024, at 01:50, Kirk Wolak wrote: > I did a little more checking and the reason I did not see the link MIGHT be > because EXPLAIN did not show a JIT attempt. > I tried to use settings that FORCE a JIT... But to no avail. Are you sure you are running a JIT enabled server? Did you

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-19 Thread Laurenz Albe
On Thu, 2024-01-18 at 19:50 -0500, Kirk Wolak wrote: >   I did a little more checking and the reason I did not see the link MIGHT be > because EXPLAIN did not show a JIT attempt. > I tried to use settings that FORCE a JIT...  But to no avail. > >   I am now concerned that the problem is more hidd

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-18 Thread Kirk Wolak
On Tue, Jan 16, 2024 at 3:43 AM Daniel Gustafsson wrote: > > On 16 Jan 2024, at 02:53, Kirk Wolak wrote: > > > > On Mon, Jan 15, 2024 at 9:03 AM Daniel Gustafsson > wrote: > > > On 15 Jan 2024, at 07:24, Kirk Wolak wol...@gmail.com>> wrote: > >... > > Okay, I took the l

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-16 Thread Daniel Gustafsson
> On 16 Jan 2024, at 02:53, Kirk Wolak wrote: > > On Mon, Jan 15, 2024 at 9:03 AM Daniel Gustafsson > wrote: > > On 15 Jan 2024, at 07:24, Kirk Wolak > > wrote: > > > You have a commit [1] that MIGHT fix this. > > I have a script that recreate

Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]

2024-01-15 Thread Kirk Wolak
On Mon, Jan 15, 2024 at 9:03 AM Daniel Gustafsson wrote: > > On 15 Jan 2024, at 07:24, Kirk Wolak wrote: > > > You have a commit [1] that MIGHT fix this. > > I have a script that recreates the problem, using random data in pg_temp. > > And a nested cursor. > > Running your reproducer script in

Re: Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-15 Thread Daniel Gustafsson
> On 15 Jan 2024, at 16:49, Kirk Wolak wrote: > On Mon, Jan 15, 2024 at 9:03 AM Daniel Gustafsson > wrote: > The script starts by creating 90 Million rows... In my world that part of > the script, plus the indexes, etc. Takes about 8-9 minutes. > And has no memory loss

Re: Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-15 Thread Pavel Stehule
po 15. 1. 2024 v 15:03 odesílatel Daniel Gustafsson napsal: > > On 15 Jan 2024, at 07:24, Kirk Wolak wrote: > > > You have a commit [1] that MIGHT fix this. > > I have a script that recreates the problem, using random data in pg_temp. > > And a nested cursor. > > Running your reproducer script

Re: Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-15 Thread Kirk Wolak
On Mon, Jan 15, 2024 at 9:03 AM Daniel Gustafsson wrote: > > On 15 Jan 2024, at 07:24, Kirk Wolak wrote: > > > You have a commit [1] that MIGHT fix this. > > I have a script that recreates the problem, using random data in pg_temp. > > And a nested cursor. > > Running your reproducer script in

Re: Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-15 Thread Daniel Gustafsson
> On 15 Jan 2024, at 07:24, Kirk Wolak wrote: > You have a commit [1] that MIGHT fix this. > I have a script that recreates the problem, using random data in pg_temp. > And a nested cursor. Running your reproducer script in a tight loop for a fair bit of time on the v16 HEAD I cannot see any m

Re: Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-14 Thread Pavel Stehule
Hi po 15. 1. 2024 v 7:24 odesílatel Kirk Wolak napsal: > Daniel, > You have a commit [1] that MIGHT fix this. > I have a script that recreates the problem, using random data in pg_temp. > And a nested cursor. > > It took me a few days to reduce this from actual code that was > experiencing t

Oom on temp (un-analyzed table caused by JIT) V16.1

2024-01-14 Thread Kirk Wolak
Daniel, You have a commit [1] that MIGHT fix this. I have a script that recreates the problem, using random data in pg_temp. And a nested cursor. It took me a few days to reduce this from actual code that was experiencing this. If I turn off JIT, the problem goes away. (if I don't FETCH the