473,508 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invalid memory alloc request size

Linux 2.4.23 on AMD 450MHz.
pgsql 7.4.1
configure --enable-multibyte=UNICODE
locale is zh_TW.Big5

IIRC, when I did "initdb -E UNICODE" or "createdb db1", I
saw the following message from pgsql:
....locale "C"...

The problem:

db1=# select distinct * from t53 where f1='J200312014' order
by 1;
f0 | f1 | f3 | f4 | f5 | f6 | f7 | f8
| f9 | f10 | f11 | f12 | f99
----+------------+-----------+----+-----+-------+-------+---
-+----+----------+-----+-----+-----
1 | J200312014 | 1101 | D | USD | 200 | 6930 | 1
| A | | | | rps
1 | J200312014 | 1101-1 | D | USD | 100 | 3500 | 1
| D | | | | rps
1 | J200312014 | 1102-A012 | D | TWD | 10000 | 10000 | 1
| B | savings1 | | | rps
1 | J200312014 | 1108 | D | TWD | 100 | 100 | 1
| C | bill2 | | | rps
1 | J200312014 | 1110 | C | USD | 600 | 20790 | 1
| r | s1 | | | rps
1 | J200312014 | 2210-1 | C | USD | 500 | 17325 | 1
| T | | | | rps
(6 rows)

db1=# select distinct * into x53 from t53 where
f1='J200312014' order by 1;
SELECT
db1=# show client_encoding;
client_encoding
-----------------
unicode
(1 row)

db1=# select * from x53;
f0 | f1 | f3 | f4 | f5 | f6 | f7 | f8
| f9 | f10 | f11 | f12 | f99
----+------------+-----------+----+-----+-------+-------+---
-+----+----------+-----+-------+-----
1 | J200312014 | 1101 | D | USD | 200 | 6930 | 1
| | rps | | |
1 | J200312014 | 1101 | D | USD | 200 | 6930 | 1
| A | rps | | |
1 | J200312014 | 1101-1 | D | USD | 100 | 3500 | 1
| | | rps | |
1 | J200312014 | 1101-1 | D | USD | 100 | 3500 | 1
| D | | rps | |
1 | J200312014 | 1102-A012 | D | TWD | 10000 | 10000 | 1
| | savings1 | rps | |
1 | J200312014 | 1102-A012 | D | TWD | 10000 | 10000 | 1
| B | savings1 | rps | |
1 | J200312014 | 1108 | D | TWD | 100 | 100 | 1
| | | | bill2 |
1 | J200312014 | 1108 | D | TWD | 100 | 100 | 1
| C | | | bill2 |
1 | J200312014 | 1110 | C | USD | 600 | 20790 | 1
| | s1 | | rps |
1 | J200312014 | 2210-1 | C | USD | 500 | 17325 | 1
| T | rps | | |
1 | J200312014 | 2210-1 | C | USD | 500 | 17325 | 1
| | | rps | |
(11 rows)

db1=# drop table x53;
DROP TABLE
db1=# select distinct * into x53 from t53 where
f1='J200312014' order by 1;
SELECT
db1=# select * from x53;
ERROR: invalid memory alloc request size 4294967293
db1=# select 4294967293>>16;
?column?
----------
65535
(1 row)

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
2 4431
"cnliou" <cn****@so-net.net.tw> writes:
Linux 2.4.23 on AMD 450MHz.
pgsql 7.4.1
configure --enable-multibyte=UNICODE
locale is zh_TW.Big5 IIRC, when I did "initdb -E UNICODE" or "createdb db1", I
saw the following message from pgsql:
...locale "C"...


Uh ... you're being self-contradictory about the locale setting.
Please show us the result of "show lc_collate" and "show lc_ctype"
just to remove doubt.

Also, it's hard to reproduce your example when we don't know the
data types of the table columns...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #2
"cnliou" <cn****@so-net.net.tw> writes:
[ bizarre results from SELECT INTO ]


I had an idea: was the original table (t53) created WITHOUT OIDS?
There's a post-7.4.1 bug fix involving doing SELECT INTO from a table
without oids. I'm not certain this explains your problem, but I'm
not having any luck reproducing the behavior on my current 7.4 build.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
22745
by: hvaisane | last post by:
Valgrind says ==11604== Invalid read of size 4 ==11604== at 0x8048ABB: main (foo.cc:36) ==11604== Address 0x1B92415C is 4 bytes inside a block of size 8 free'd ==11604== at 0x1B90514F:...
7
2344
by: serikas | last post by:
Is there a way to get aligned dynamically allocated memory? (provided that the requested memory size is a power of 2.) For example, if I request 128 bytes of memory, can I implement an allocator...
10
2312
by: Ryan Wang | last post by:
Hi, here is the function: int sum(int a,int b) { int c; c = a + b; return c; }
1
2924
by: John Hagstrand | last post by:
Hello, I'm getting the following error when I try to update or insert into a table. This just started happening today. The table has been working fine up to now. The table has 27,000 rows and...
5
5557
by: Janning Vygen | last post by:
Hi, tonight my database got corruppted. before it worked fine. since two days i do the following tasks every night psql -c 'CLUSTER;' $DBNAME psql -c 'VACUUM FULL ANALYZE;' $DBNAME ...
0
1672
by: Le Minh | last post by:
I used this class to dynamic memory allocation: using System; using System.Runtime.InteropServices; public unsafe class Memory { // Handle for the process heap. This handle is used in all calls...
11
2620
by: mast2as | last post by:
This question has been posted to this forum before and I read the thread but found that the answers were perhaps imcomplete, so I am trying again. Whenever I am creating objects I would like to...
11
7193
by: Grey Alien | last post by:
Any one know of an open source memory pool library?. I can't seem to find any implemented in C (many available in C++ e.g. Boost). Google is not turning up anything useful ...
11
2794
by: Grey Alien | last post by:
I am looking to write a very simple memory pool library to store only one data type at a time - i.e. to provide a contiguous block of memory to be alloc'd free'd by the calling program. I am I...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.