'too many range table entries' error with partitioned tables and aggregations

2019-06-21 Thread Floris Van Nee
Hi all, Recently we hit a strange 'too many range table entries' error for some particular queries in our database. Some googling revealed that it's an uncommon error usually occurring due to strange database design [1]. However, I feel like the case in which it occurs this

Re: Too many range table entries error

2018-06-27 Thread Akshaya Acharya
Thank you very much for your guidance on this. I was speaking with a friend about this, and he said something to the effect of "keep it aside and do it later" and then a solution hit me. Since we can allow this data to be stale in our case, replacing some key views in the hierarchy of views with

Re: Too many range table entries error

2018-06-25 Thread Tom Lane
Andres Freund 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 realisti

Re: Too many range table entries error

2018-06-25 Thread Andres Freund
On 2018-06-25 13:46:06 +0530, Akshaya Acharya wrote: > On Mon, 25 Jun 2018 at 13:40, Andres Freund wrote: > > > Hi, > > > > On 2018-06-25 13:02:37 +0530, Akshaya Acharya wrote: > > > Hello. > > > > > > > > > Please could you help debug the error "too many range table entries”? > > > > > > > > > T

Re: Too many range table entries error

2018-06-25 Thread Akshaya Acharya
On Mon, 25 Jun 2018 at 13:40, Andres Freund wrote: > Hi, > > On 2018-06-25 13:02:37 +0530, Akshaya Acharya wrote: > > 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 > > vie

Re: Too many range table entries error

2018-06-25 Thread Andres Freund
Hi, On 2018-06-25 13:02:37 +0530, Akshaya Acharya wrote: > 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

Too many range table entries error

2018-06-25 Thread Akshaya Acharya
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 a