Re: exceeded MAX_ALLOCATED_DESCS while trying to open file - Mailing list pgsql-admin

From ktm@rice.edu
Subject Re: exceeded MAX_ALLOCATED_DESCS while trying to open file
Date
Msg-id 20130528154837.GQ12507@aart.rice.edu
Whole thread Raw
In response to exceeded MAX_ALLOCATED_DESCS while trying to open file  (Steve.Toutant@inspq.qc.ca)
Responses Re: exceeded MAX_ALLOCATED_DESCS while trying to open file  (Igor Neyman <ineyman@perceptron.com>)
Re: exceeded MAX_ALLOCATED_DESCS while trying to open file  (Steve.Toutant@inspq.qc.ca)
Re: exceeded MAX_ALLOCATED_DESCS while trying to open file  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-admin
On Tue, May 28, 2013 at 11:28:02AM -0400, Steve.Toutant@inspq.qc.ca wrote:
> Hi,
> Using postgres 9.2, I created a FOREIGN TABLE on a csv file. It works.
> But I need to change the structure of the data and I created several sql
> select using union, like
> select .... from .foreign table... where...
> union
> select .... from .foreign table... where...
> union
> ...
> It works for the first 10 select but then I get
> ERROR:  exceeded MAX_ALLOCATED_DESCS while trying to open file
> "/srv/www/data/antidote/registre.csv"
>
> What is it MAX_ALLOCATED_DESCS? and how can I modify it without changing
> the code and re-compile? I tried using postgref.conf but this parameters
> is not recognize.
> thanks
> steve

Hi Steve,

Each SELECT opens your FOREIGN TABLE so you are opening it 10 times. This is
hardcoded by a #define in ./src/backend/storage/file/fd.c during the build so
you would need to recompile the software yourself to change it. Can you re-
write your query using a single SELECT or possibly read the data into a
temporary table for processing?

Regards,
Ken


pgsql-admin by date:

Previous
From: Steve.Toutant@inspq.qc.ca
Date:
Subject: exceeded MAX_ALLOCATED_DESCS while trying to open file
Next
From: Igor Neyman
Date:
Subject: Re: exceeded MAX_ALLOCATED_DESCS while trying to open file