pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: PegoraroF10 <marcos@f10.com.br>
Cc: pgsql-general@postgresql.org
Subject: Re: Server goes to Recovery Mode when run a SQL
Date: Wed, 12 Aug 2020 18:09:02 -0400
Message-ID: <323345.1597270142@sss.pgh.pa.us> (raw)
In-Reply-To: <1597265258319-0.post@n3.nabble.com>
References: <1549209182255-0.post@n3.nabble.com>
	<37bc715f-12e2-84ac-6492-88d7b6306777@aklaver.com>
	<1549211574297-0.post@n3.nabble.com>
	<cfcb3858-d169-652c-71a7-5d77f295085a@aklaver.com>
	<20190204010709.GC1881@paquier.xyz>
	<1597265258319-0.post@n3.nabble.com>

PegoraroF10 <marcos@f10.com.br> writes:
> Hi Michael, so sorry for the delay. I did never had that problem again, so
> tougth it was solved, but seems not. We have two different SQL which pushs
> server to recovery mode. This SQL is the hardest one, because you´ll have to
> wait some time to get the error. Just runs this SQL, opens your HTOP and
> wait, you´ll see your memory growing and growing until ... 

Are you sure this query ever terminates?  It looks to me like it just
keeps producing tuples indefinitely until you kill it or something runs
out of memory.

If the response to "out of memory" is a server crash rather than something
nicer, you probably need to corral your OOM killer.  See

https://www.postgresql.org/docs/current/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT

			regards, tom lane





view thread (36+ messages)  latest in thread

Message-ID: <323345.1597270142@sss.pgh.pa.us>
Permalink:  ../323345.1597270142@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/323345.1597270142@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marcos@f10.com.br
  Subject: Re: Server goes to Recovery Mode when run a SQL
  In-Reply-To: <323345.1597270142@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox