Re: Postgres 12.1 : UPPER() in WHERE clause restarts server

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nick Renders <postgres(at)arcict(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres 12.1 : UPPER() in WHERE clause restarts server
Date: 2020-02-10 02:04:53
Message-ID: CA+hUKGLahj5T5+GMCCKSZcRVqrH-fQWb4A0e2dNxx+9gEkC4Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Feb 9, 2020 at 11:46 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Nick Renders" <postgres(at)arcict(dot)com> writes:
> > When we do the following statement:
> > SELECT * FROM f_gsxws_schedule WHERE UPPER(gwsc_dossier) = 'TEST'
> > the Postgres service restarts.
>
> Hm.
>
> > Here is what is logged:
> > 2020-02-08 20:21:19.942 CET [83892] LOG: server process (PID 85456) was
> > terminated by signal 9: Killed: 9
> > 2020-02-08 20:21:19.942 CET [83892] DETAIL: Failed process was running:
> > SELECT * FROM f_gsxws_schedule WHERE UPPER(gwsc_dossier) = 'TEST'
>
> That's mighty interesting, because signal 9 is an external SIGKILL,
> not an internal-to-Postgres software fault.
>
> If you were running on Linux I would hypothesize that your process
> was getting killed by the infamous OOM killer, in which case we could
> guess that for some reason this query is consuming an unreasonable
> amount of memory and thereby attracting the wrath of the OOM killer.
> However, I'm not aware that any such mechanism exists on macOS.

macOS's thing like that appears as "kernel[0]: memorystatus_thread:
idle exiting pid XXX [some program]" in system.log, which seems like a
bit of an understatement to me but that's what they call it. Some
details here:

http://newosxbook.com/articles/MemoryPressure.html

Nick, did you see that?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ayub M 2020-02-10 08:03:55 work_mem and shared_buffers question
Previous Message Colin Adler 2020-02-09 20:50:02 Re: Query returns no results until REINDEX