From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Akshaya Acharya <akshaya.acharya.01@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Too many range table entries error
Date: Mon, 25 Jun 2018 20:37:58 -0400
Message-ID: <21974.1529973478@sss.pgh.pa.us> (raw)
In-Reply-To: <20180625181410.fg5xejq4qsbnryl2@alap3.anarazel.de>
References: <CABPa3Q5VwSJJZLOguSWWvkZh7C5TGXqzW7TVCB76DbYLu3=A7w@mail.gmail.com>
<20180625081006.jnxgmsysq2biacnc@alap3.anarazel.de>
<CABPa3Q72LrJfgtrqr1+W9=-4RNreDyz+7RHOwrnhUjDWY9tD6A@mail.gmail.com>
<20180625181410.fg5xejq4qsbnryl2@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2018-06-25 13:46:06 +0530, Akshaya Acharya wrote:
>> Our entire application-all our business logic-is built as layers of views
>> inside the database. The ref counts sort of multiple at each layer, hence
>> the large number.
> That still doesn't explain how you realistically get to 40k references,
> and how that's a reasonable design.
The short answer here is that even if the system accepted queries with
that many tables, it's really unlikely to perform acceptably --- in fact,
I'm a bit astonished that you even found a way to reach this error without
having waited a few hours beforehand. And we are *not* going to promise
to fix all the performance issues you will hit with a schema design like
this. Redesign. Please.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, akshaya.acharya.01@gmail.com
Subject: Re: Too many range table entries error
In-Reply-To: <21974.1529973478@sss.pgh.pa.us>
References: <CABPa3Q5VwSJJZLOguSWWvkZh7C5TGXqzW7TVCB76DbYLu3=A7w@mail.gmail.com> <20180625081006.jnxgmsysq2biacnc@alap3.anarazel.de> <CABPa3Q72LrJfgtrqr1+W9=-4RNreDyz+7RHOwrnhUjDWY9tD6A@mail.gmail.com> <20180625181410.fg5xejq4qsbnryl2@alap3.anarazel.de> <21974.1529973478@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