Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Sergey E. Koposov
On Wed, 20 Feb 2008, Gregory Stark wrote: Ah, that's not going to work in 8.3 any longer. You have to change this to: SET_VARSIZE(im, out_len+VARHDRSZ) Phew. You had me scared there. Thank you. Sorry for scaring :) I hope that everything will work fine now. Regards, Sergey

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Gregory Stark
"Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > typedef struct > { > int4 length; > unsigned char data[1]; > } image; > > image *im = (image *) palloc(VARHDRSZ + out_len); > memset(im, 0, VARHDRSZ + out_len); > im->length = out_len + VARHDRSZ; Ah, that's n

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Sergey E. Koposov
On Wed, 20 Feb 2008, Gregory Stark wrote: Could you send select * from pg_attribute where attrelid = 'sdssdr5.frame'::regclass and attname = 'img'; cas=# select * from pg_attribute where attrelid = 'sdssdr5.frame'::regclass and attname = 'img'; attrelid | attname | atttypid | attsta

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Sergey E. Koposov
On Wed, 20 Feb 2008, Gregory Stark wrote: You aren't doing anything funny in the image_in function to generate compressed varlenas manually are you? No, I don't. The only thing I do there is unsigned char *in = PG_GETARG_CSTRING(0);//"AABBCCDDEE1122";// and return the pointer to the pa

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: >> CREATE TYPE image ( >> INPUT = image_in, >> OUTPUT = image_out, >> INTERNALLENGTH = -1, >> STORAGE = external >> ); > > ALTER column SET STORAGE EXTERNAL Hum. I just noticed that you had set STORAGE = external in you

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Gregory Stark
"Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > Hello -hackers, > > In the process of converting a multi-Tb datadabe from 8.2 to 8.3, Postgres 8.3 > died at the failed assertion: > > TRAP: FailedAssertion("!(((toast_pointer).va_extsize < > (toast_pointer).va_rawsize - ((int32) sizeof(int32"

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Teodor Sigaev
Does anyone have ideas what could be the reason for the bug ? Compression of varlena's header, introduced in 8.3. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ --

Re: [HACKERS] failed assertion in toasting code

2008-02-20 Thread Gregory Stark
"Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > In the process of converting a multi-Tb datadabe from 8.2 to 8.3, Postgres 8.3 > died at the failed assertion: > > TRAP: FailedAssertion("!(((toast_pointer).va_extsize < > (toast_pointer).va_rawsize - ((int32) sizeof(int32", File: > "tuptoast

[HACKERS] failed assertion in toasting code

2008-02-20 Thread Sergey E. Koposov
Hello -hackers, In the process of converting a multi-Tb datadabe from 8.2 to 8.3, Postgres 8.3 died at the failed assertion: TRAP: FailedAssertion("!(((toast_pointer).va_extsize < (toast_pointer).va_rawsize - ((int32) sizeof(int32", File: "tuptoaster.c", Line: 1134) LOG: server process (