Skip site navigation (1) Skip section navigation (2)

BUG #2580: Analyze table cause invalid memory alloc error in "start with xx" select statement

From: "Alex Zhang" <zhangxuehu(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2580: Analyze table cause invalid memory alloc error in "start with xx" select statement
Date: 2006-08-17 09:57:58
Message-ID: 200608170957.k7H9vwUj079156@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2580
Logged by:          Alex Zhang
Email address:      zhangxuehu(at)gmail(dot)com
PostgreSQL version: 8.1.4-1
Operating system:   Windows XP sp2 and Windows 2003 Server
Description:        Analyze table cause invalid memory alloc error in "start
with xx" select statement
Details: 

When installing postgresql with China-PRC locale and UTF8 Encoding, it
causes the following problem:

After running "analyze", or "vacuum with analyze" commands on a table or
database, select statements with "like 'a%'" kind of clause report "invalid
memory alloc request size" error 2147483648" and yields no results.

There is 43 rows in my table and it worked fine before with mysql.

I have exported a database dump that can reliably recreate this problem. I
can send it if you give me an email address. 

Just restore the data (with some foreign key errors that can be ignored) and
run 

select * from element where name like 'a%';

you get 0 records, which is correct.

then run

analyze element;

select * from element where name like 'a%';

you get: ERROR:  invalid memory alloc request size 2147483648.

Note that this error does not occur if I install the postgresql with locale
set to "C". I can also avoid this problem by setting the particular database
encoding to EUC_CN (when installed with China-PRC locale).

pgsql-bugs by date

Next:From: tomasDate: 2006-08-17 19:08:37
Subject: Re: BUG #2579: initcap should not capitalize letter after apostrophe
Previous:From: Dan FranklinDate: 2006-08-16 21:03:08
Subject: BUG #2579: initcap should not capitalize letter after apostrophe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group