Here is the output from gdb: #0 errfinish (dummy=0) at elog.c:312 #1 0x0827f378 in elog_finish (elevel=20, fmt=0x83586d8 "invalid memory alloc request size %lu") at elog.c:937 #2 0x082983d7 in MemoryContextAlloc (context=0x843a1ac, size=4294967293) at mcxt.c:504 #3 0x0825751d in varcharout (fcinfo=0xbf8a1e7c) at varchar.c:447 #4 0x08281ceb in FunctionCall1 (flinfo=0x8460298, arg1=3052138532) at fmgr.c:1128 #5 0x0807e88f in printtup (slot=0x843d038, self=0x8405df4) at printtup.c:326 #6 0x0816b14f in ExecutorRun (queryDesc=0x8474698, direction=ForwardScanDirection, count=0) at execMain.c:1310 #7 0x0820059b in PortalRunSelect (portal=0x842f1f4, forward=<value optimized out>, count=0, dest=0x8405df4) at pquery.c:831 #8 0x08201799 in PortalRun (portal=0x842f1f4, count=2147483647, dest=0x8405df4, altdest=0x8405df4, completionTag=0xbf8a22e8 "") at pquery.c:684 #9 0x081fd150 in exec_simple_query ( query_string=0x840593c "SELECT * FROM pgsor;") at postgres.c:939 #10 0x081fe761 in PostgresMain (argc=4, argv=<value optimized out>, username=0x83accdc "dj") at postgres.c:3424 #11 0x081d1cb8 in ServerLoop () at postmaster.c:2931 #12 0x081d2aa7 in PostmasterMain (argc=3, argv=0x83a78a8) at postmaster.c:963 #13 0x0818d2f0 in main (argc=3, argv=Cannot access memory at address 0x4 ) at main.c:188 Hope it is verbose for you, but don't help me :) =?ISO-8859-2?Q?Dud=E1s_J=F3zsef?= <dj1999@xxxxxxxxxxx> writes:I know that something doing wrong, but I can't find out what is it.Getting a stack trace from the point of the errfinish call would probably help narrow it down. One thing that's not clear is whether SPI_modifytuple itself is failing (have you checked all the *other* arguments you're passing it?) or whether it happens later. regards, tom lane |