Too many range table entries error

From: Akshaya Acharya <akshaya(dot)acharya(dot)01(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Too many range table entries error
Date: 2018-06-25 07:32:37
Message-ID: CABPa3Q5VwSJJZLOguSWWvkZh7C5TGXqzW7TVCB76DbYLu3=A7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.

Please could you help debug the error "too many range table entries”?

This error occurs when querying a view that is dependent on many other
views (i.e. a view high up in the pyramid of views that we've constructed).

I get this error when running select * on the view, or when running an
explain analyse on the select.

Views that use a total of more than around 40000 table references (in the
complete tree considering all the dependent views recursively) don't work,
but it works with 20000 table references. What is the maximum number of
table references possible?

Can I increase this number somehow?

Perhaps relevant:

Postgres docs, what is range table
https://www.postgresql.org/docs/current/static/querytree.html

postgres src, error message
https://github.com/postgres/postgres/blob/master/src/backend/optimizer/plan/setrefs.c

Postgres version 10.3 from official docker image.

Thanks

Akshaya

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2018-06-25 08:10:06 Re: Too many range table entries error
Previous Message Christoph Moench-Tegeder 2018-06-25 06:10:45 Re: Using COPY to import large xml file