Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EBB1AB5DBE7 for ; Tue, 5 Jul 2011 14:08:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 83996-05 for ; Tue, 5 Jul 2011 17:07:55 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id C3338B5DBE6 for ; Tue, 5 Jul 2011 14:07:55 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p65H7stx010865 for ; Tue, 5 Jul 2011 14:07:54 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p65GiT9X077397 for pgsql-admin@postgresql.org; Tue, 5 Jul 2011 13:44:29 -0300 (ADT) (envelope-from news) From: jtkells@verizon.net X-Newsgroups: pgsql.admin Subject: Problem retrieving large records (bytea) data from a table Message-ID: X-Newsreader: Forte Agent 6.00/32.1186 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 46 X-Complaints-To: abuse@easynews.com Organization: Forte Inc. http://www.forteinc.com/apn/ X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Tue, 05 Jul 2011 12:44:24 -0400 To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DOS_RCVD_IP_TWICE_B=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/23 X-Sequence-Number: 37802 I am having a hang condition every time I try to retrieve a large records (bytea) data from a table The OS is a 5.11 snv_134 i86pc i386 i86pc Solaris with 4GB memory running Postgresql 8.4.3 with a standard postgresql.conf file (nothing has been changed) I have the following table called doc_table Column | Type | Modifiers | Storage | Description ------------------------+--------------------------------+--------------------------------------- id | numeric | not null | main | file_n | character varying(4000) | | extended | create_date | timestamp(6) without time zone | not null default (clock_timestamp()) ::timestamp(0)without time zone | plain | desc | character varying(4000) | | extended | doc_cc | character varying(120) | not null | extended | by | numeric | not null | main | doc_data | bytea | | extended | mime_type_id | character varying(16) | not null | extended | doc_src | text | | extended | doc_stat | character varying(512) | not null default 'ACTIVE'::character varying | extended | Indexes: "documents_pk" PRIMARY KEY, btree (document_id) A while ago the some developers inserted several records with a document (stored in doc_Data) that was around 400 - 450 MB each. Now when you do a select * (all) from this table you get a hang and the system becomes unresponsive. Prior to these inserts, a select * (all, no where clause) worked. I'm also told a select * from doc_table where id = xxx still works. I haven't seen any error message in the postgresql log files. So I'm not sure how to find these bad records and why I am getting a hang. Since this postgresql is running with the default config files could I be running out of a resource? If so I'm not sure how to or how much to add to these resources to fix this problem since I have very little memory on this system. Does anyone have any ideas why I am getting a hang. Thanks