From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bob Jolliffe <bobjolliffe@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: does max_connections affect the query planner
Date: Tue, 17 Sep 2019 10:13:40 -0400
Message-ID: <560.1568729620@sss.pgh.pa.us> (raw)
In-Reply-To: <CACd=f9fE5k6FNc=zovUY0ohEJcYhqasdW+=bm2_6Y-H9UDTvGQ@mail.gmail.com>
References: <CACd=f9fE5k6FNc=zovUY0ohEJcYhqasdW+=bm2_6Y-H9UDTvGQ@mail.gmail.com>
Bob Jolliffe <bobjolliffe@gmail.com> writes:
> We do know that max_connections is set quite high (600) when we don't
> really expect more than 100. I wonder does the planner take
> max_connections x work_mem into account when considering the memory it
> has potentially available?
No. There have been discussions to the effect that it ought to have
a more holistic view about available memory; but nothing's been done
about that, and certainly no existing release does so.
Usually the proximate cause of bad plan choices is bad rowcount
estimates --- you can spot that by comparing estimated and actual
rowcounts in EXPLAIN ANALYZE results.
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, bobjolliffe@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: does max_connections affect the query planner
In-Reply-To: <560.1568729620@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