Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9F221B5D91F for ; Wed, 15 Jun 2011 16:22:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 51292-01 for ; Wed, 15 Jun 2011 19:22:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id DDBE8B5D8BD for ; Wed, 15 Jun 2011 16:22:16 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p5FJMG56044732 for ; Wed, 15 Jun 2011 19:22:16 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p5FJMGue044731; Wed, 15 Jun 2011 19:22:16 GMT (envelope-from www) Date: Wed, 15 Jun 2011 19:22:16 GMT Message-Id: <201106151922.p5FJMGue044731@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6062: psql terminates on auto-complete From: "Sebastian" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201106/118 X-Sequence-Number: 30497 The following bug has been logged online: Bug reference: 6062 Logged by: Sebastian Email address: skurscheid@gmail.com PostgreSQL version: 9.0.1 Operating system: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 Description: psql terminates on auto-complete Details: I have encountered a peculiar psql behavior which I can consistently replicate: When using the auto-complete function (TAB) to complete the name of a particular set of tables when writing a SELECT statement, psql crashes with following error: "malloc: *** error for object 0x2: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap" I will make the assumption that this error is not caused by the actual table definition, but is rather caused by some psql behavior associated with the auto-complete feature. The names of the tables are: postgres=# \dt temp.a* List of relations Schema | Name | Type | Owner --------+-------------------------------+-------+------------ temp | assoc_rel | table | skurscheid temp | association | table | skurscheid temp | association_isoform | table | skurscheid temp | association_property | table | skurscheid temp | association_qualifier | table | skurscheid temp | association_species_qualifier | table | skurscheid (6 rows) This also occurs when the tables are stored under a different schema (such as "go" - this is a local copy of the Gene Ontology database, which otherwise works without any problems) This error does not occur when using e.g. \dt in psql. Also, after some more testing I have determined that this error only occurs following this sequence: postgres=# select * from go.assoc (TAB, TAB) [- this will bring up the list of all matching objects] postgres=# select * from go.associpsql(87623) malloc: *** error for object 0x7: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap I would hazard the guess that the "_" character in some of the objects names might have something to do with it, because: postgres=# select * from go.assoc_(TAB)rel; id | from_id | to_id | relationship_type_id ----+---------+-------+---------------------- (0 rows) works fine. I hope the supplied information is sufficient to address this bug.