pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Steve.Toutant@inspq.qc.ca
Cc: pgsql-admin@postgresql.org
Subject: Re: exceeded MAX_ALLOCATED_DESCS while trying to open file
Date: Tue, 28 May 2013 10:48:37 -0500
Message-ID: <20130528154837.GQ12507@aart.rice.edu> (raw)
In-Reply-To: <OF419B5767.8A3C9ADB-ON85257B79.005491E9-85257B79.0054F6F1@isn.rtss.qc.ca>
References: <OF419B5767.8A3C9ADB-ON85257B79.005491E9-85257B79.0054F6F1@isn.rtss.qc.ca>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (7+ messages)  latest in thread

Message-ID: <20130528154837.GQ12507@aart.rice.edu>
Permalink:  ../20130528154837.GQ12507@aart.rice.edu/
Also on:    postgresql.org/message-id/20130528154837.GQ12507@aart.rice.edu

 · 

reply

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-admin@postgresql.org
  Cc: ktm@rice.edu, Steve.Toutant@inspq.qc.ca
  Subject: Re: exceeded MAX_ALLOCATED_DESCS while trying to open file
  In-Reply-To: <20130528154837.GQ12507@aart.rice.edu>

* 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