BUGS!!! - Mailing list pgsql-ports
From | vitaliy |
---|---|
Subject | BUGS!!! |
Date | |
Msg-id | Pine.LNX.4.10.KSI2.9907152100480.4664-100000@snail.gu.net Whole thread Raw |
List | pgsql-ports |
If PostgreSQL failed to compile on your computer or you found a bug that is likely to be specific to one platform then please fill out this form and e-mail it to pgsql-ports@postgresql.org. To report any other bug, fill out the form below and e-mail it to pgsql-bugs@postgresql.org. If you not only found the problem but solved it and generated a patch then e-mail it to pgsql-patches@postgresql.org instead. Please use the command "diff -c" to generate the patch. You may also enter a bug report at http://www.postgresql.org/ instead of e-mail-ing this form. ============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name :Vitaliy Romanets Your email address :vitaliy@gu.net System Configuration --------------------- Architecture (example: Intel Pentium) :Intel Pentium Operating System (example: Linux 2.0.26 ELF) :redhat PostgreSQL version (example: PostgreSQL-6.5) : PostgreSQL-6.5 Compiler used (example: gcc 2.8.0) : Please enter a FULL description of your problem: ------------------------------------------------ Situation: if add functions to the DB the result is adding error. There are some cases where were detected bugs: In sequential functions adding to the DB the result is adding error on 1st or 2nd or 3rd function.Though later the function has already been added successfully. In second (sequential) adding the same function. Sometimes in sequential function adding VACUUM helped after every successful adding. Maximum quantity of added function such a way is 3. In adding of "empty" function were being entered any quantity and any sequence! I thought that the error in my function but after adding the same function i'got error in the second addig.That's why i think that it is bug. Why working: kill process; vacuum analyze;!-in most cases the process does'not catch the signals /***** vacuum verbose analyze; NOTICE: --Relation pg_proc-- NOTICE: Pages 22: Changed 0, Reapped 2, Empty 0, New 0; Tup 1031: Vac 1, Keep/VTL 0/0, Crash 1, UnUsed 10, MinLen 145, MaxLen 4277; Re-using: Free/Avail. Space 6584/3612; EndEmpty/Avail. Pages 0/1. Elapsed 0/0 sec. /***** more relible way: kill process; kill daemon DB process; ipcclean; start daemon DB; vacuum analyze; In sometimes the process does not catch the signals and in this case helped only DESTROYDB/ CREATEDB!!! /***** NOTICE: --Relation pg_proc-- NOTICE: Pages 23: Changed 0, Reapped 3, Empty 0, New 0; Tup 1030: Vac 3, Keep/VTL 0/0, Crash 1, UnUsed 11, MinLen 145, MaxLen 4277; Re-using: Free/Avail. Space 17920/6772; EndEmpty/Avail. Pages 1/1. Elapsed 0/0 sec. NOTICE: Index pg_proc_prosrc_index: Pages 18; Tuples 1031: Deleted 1. Elapsed 0/0 sec. NOTICE: Index pg_proc_prosrc_index: NUMBER OF INDEX' TUPLES (1031) IS NOT THE SAME AS HEAP' (1030) NOTICE: Index pg_proc_proname_narg_type_index: Pages 18; Tuples 1030: Deleted 3. Elapsed 0/0 sec. NOTICE: Index pg_proc_oid_index: Pages 5; Tuples 1030: Deleted 3. Elapsed 0/0 sec. pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. We have lost the connection to the backend, so further processing is impossible. Terminating. /***** Log record: /***** tail server.log NOTICE: Index pg_proc_prosrc_index: Pages 18; Tuples 1031: Deleted 1. Elapsed 0/0 sec. NOTICE: Index pg_proc_prosrc_index: NUMBER OF INDEX' TUPLES (1031) IS NOT THE SAME AS HEAP' (1030) NOTICE: Index pg_proc_proname_narg_type_index: Pages 18; Tuples 1030: Deleted 3. Elapsed 0/0 sec. NOTICE: Index pg_proc_oid_index: Pages 5; Tuples 1030: Deleted 3. Elapsed 0/0 sec. FATAL 1: my bits moved right off the end of the world! proc_exit(0) [#0] shmem_exit(0) [#0] exit(0) /home/postgres/bin/postmaster: reaping dead processes... /home/postgres/bin/postmaster: CleanupProc: pid 14778 exited with status 0 /***** After success next VACUUM next triel adding function. Run POSTMASTER with key '-d 9' and get next log about error of adding function: /***** ERROR: RemoveFunction: function 'func_log()' does not exist FATAL 1: btree: failed to add item to the page /***** Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- Next step: psql 'nameDB' < /tmp/name_function function1: /***** drop function func_gr(); create function func_gr() returns opaque as ' declare msg text; msg1 text; flag int2; begin if tg_op = ''INSERT'' then msg := ''Группа'' || new.name; insert into history values(''now''::datetime, new.name, current_user, msg,1); return new; end if; if tg_op = ''DELETE'' then msg := ''Группа'' || old.name; insert into history values (''now''::datetime,old.name,current_user, msg,3); return new; end if; if tg_op = ''UPDATE'' then flag := 0; msg:= '' ''; if new.postmadr != old.postmadr then msg1:= ''Email постмастера'' || new.postmadr; msg:= msg || msg1; flag:=1; end if; if new.fio != old.fio then msg1:= ''Ответственный'' || new.fio; msg:=msg || msg1; flag:=1; end if; if new.ndog != old.ndog then msg1:= new.ndog; msg1:= ''Номер договора'' || msg1; msg:= msg || msg1; flag:=1; end if; if new.orgname != old.orgname then msg1:=''Организация'' || new.orgname; msg:=msg || msg1; flag:=1; end if; if new.phone != old.phone then msg1:=''Telephone'' || new.phone; msg:=msg || msg1; flag:=1; end if; if new.fax != old.fax then msg1:=''Fax'' || new.fax; msg:=msg || msg1; flag:=1; end if; if new.adr != old.adr then msg1:=''Adress'' || new.adr; msg:=msg || msg1; flag:=1; end if; if new.dltmon != old.dltmon then msg1:=''Pred_zadol'' || new.dltmon; msg:=msg || msg1; flag:=1; end if; if new.msglang != old.msglang then msg1:=''Язык'' || new.msglang; msg:=msg || msg1; flag:=1; end if; if new.fl != old.fl then msg1:=''Fl'' || new.fl; msg:=msg || msg1; flag:=1; end if; if new.nnalog != old.nnalog then msg1:=''Nnalog'' || new.nnalog; msg:=msg || msg1; flag:=1; end if; if new.nregist != old.nregist then msg1:=''Nregist'' || new.nregist; msg:=msg || msg1; flag:=1; end if; if new.freehour != old.freehour then msg1:=''FreeHours'' || new.freehour; msg:=msg || msg1; flag:=1; end if; if new.hourtype != old.hourtype then msg1:=''Hourtype'' || new.hourtype; msg:=msg || msg1; flag:=1; end if; if new.tarifhld != old.tarifhld then msg1:=''Tarifhld'' || new.tarifhld; msg:=msg || msg1; flag:=1; end if; if new.tplan != old.tplan then msg1:=''Tplan'' || new.tplan; msg:=msg || msg1; flag:=1; end if; if new.prim != old.prim then msg:=msg || ''Примечания''; msg1:=new.prim; msg:=msg || msg1; flag:=1; end if; if flag <> 0 then insert into history values (''now''::datetime,old.name, current_user, msg,5); end if; return new; end if; end; ' language 'plpgsql'; /***** function2: /***** drop function func_log(); create function func_log() returns opaque as ' declare flag int2; msg text; msg1 text; begin if tg_op = ''INSERT'' then msg:= ''Логин '' || new.login; insert into history values(''now''::datetime,new.name,current_user,msg,2); return new; end if; if tg_op = ''DELETE'' then msg:= ''Логин '' || old.login; insert into history values(''now''::datetime,old.name,current_user,msg,4); return new; end if; if tg_op = ''UPDATE'' then flag:=0; msg:= ''Логин '' || old.login; if old.name != new.name then msg1:= ''переведен в группу '' || new.name; msg:= msg || msg1; flag:=1; end if; if old.abpl != new.abpl then msg1:= ''Абон.плата '' || new.abpl; msg:= msg || msg1; flag:=1; end if; if old.tarif != new.tarif then msg1:= ''Тариф '' || new.tarif; msg:= msg || msg1; flag:=1; end if; if old.date != new.date then msg1:= ''Дата '' || new.date; msg:= msg || msg1; flag:=1; end if; if old.nodename != new.nodename then msg1:= ''Nodename '' || new.nodename; msg:= msg || msg1; flag:=1; end if; if old.domen != new.domen then msg1:= ''Домен '' || new.domen; msg:= msg || msg1; flag:=1; end if; if old.prim != new.prim then msg1:= ''Примечание '' || new.prim; msg:= msg || msg1; flag:=1; end if; if old.fl != new.fl then msg1:= new.fl; msg:= msg || ''Fl''; msg:= msg || msg1; flag:=1; end if; if old.tarif1 != new.tarif1 then msg1:= ''Тариф1 '' || new.tarif1; msg:= msg || msg1; flag:=1; end if; if old.dfltservise != new.dfltservise then msg1:= ''Dfltservise '' || new.dfltservise; msg:= msg || msg1; flag:=1; end if; if old.ipadr != new.ipadr then msg1:= ''IPadr '' || new.ipadr; msg:= msg || msg1; flag:=1; end if; if old.pop != new.pop then msg1:= ''Pop '' || new.pop; msg:= msg || msg1; flag:=1; end if; if old.news != new.news then msg1:= ''News '' || new.news; msg:= msg || msg1; flag:=1; end if; if old.newsserv != new.newsserv then msg1:= ''Newsserv '' || new.newsserv; msg:= msg || msg1; flag:=1; end if; if old.passwd != new.passwd then msg1:= ''Пароль '' || new.passwd; msg:= msg || msg1; flag:=1; end if; if old.shell != new.shell then msg1:= ''Shell '' || new.shell; msg:= msg || msg1; flag:=1; end if; if old.diskquota != new.diskquota then msg1:= ''Disk quota '' || new.diskquota; msg:= msg || msg1; flag:=1; end if; if old.expdate != new.expdate then msg1:= ''Дата откл '' || new.expdate; msg:= msg || msg1; flag:=1; end if; if old.touch != new.touch then msg1:= new.touch; msg:= msg || ''Touch''; msg:= msg || msg1; flag:=1; end if; if old.passwdmail != new.passwdmail then msg1:= ''Mailpasswd '' || new.passwdmail; msg:= msg || msg1; flag:=1; end if; if old.tarifhld != new.tarifhld then msg1:= ''Tarifhld '' || new.tarifhld; msg:= msg || msg1; flag:=1; end if; if flag <> 0 then insert into history values(''now''::datetime,old.name,current_user,msg,6); end if; return new; end if; end; ' language 'plpgsql'; /***** function3: /***** drop function func_lsch(); create function func_lsch() returns opaque as ' declare flag int2; msg text; msg1 text; begin if tg_op = ''INSERT'' then msg:= ''Сумма '' || new.kredusd; insert into history values (''now''::datetime,new.name,current_user,msg,7); return new; end if; if tg_op = ''DELETE'' then msg:= ''Сумма '' || old.kredusd; insert into history values (''now''::datetime,old.name,current_user,msg,8); return old; end if; if tg_op = ''UPDATE'' then flag:=0; msg:='' ''; if old.name != new.name then msg1:= ''Группа '' || new.name; msg:=msg || msg1; flag:=1; end if; if old.date != new.date then msg1:= ''Date '' || new.date; msg:= msg || msg1; flag:=1; end if; if old.kredit != new.kredit then msg1:= ''Kredit '' || new.kredit; msg:= msg || msg1; flag:=1; end if; if old.payform != new.payform then msg1:= ''Вид платежа '' || new.payform; msg:= msg || msg1; flag:=1; end if; if old.npltz != new.npltz then msg1:= ''Npltz '' || new.npltz; msg:= msg || msg1; flag:=1; end if; if old.kredusd != new.kredusd then msg1:= ''Кредит USD '' || new.kredusd; msg:= msg || msg1; flag:=1; end if; if old.prim != new.prim then msg1:= ''Примеч. '' || new.prim; msg:= msg || msg1; flag:=1; end if; if old.daten != new.daten then msg1:= ''Daten '' || new.daten; msg:= msg || msg1; flag:=1; end if; if old.nsf != new.nsf then msg1:= ''Ном с/ф '' || new.nsf; msg:= msg || msg1; flag:=1; end if; if old.akt != new.akt then msg1:= ''Акт '' || new.akt; msg:= msg || msg1; flag:=1; end if; if old.nnal != new.nnal then msg1:= ''Ном налогов '' || new.nnal; msg:= msg || msg1; flag:=1; end if; if old.setnalog != new.setnalog then msg1:= ''Налог '' || new.setnalog; msg:= msg || msg1; flag:=1; end if; if flag <> 0 then insert into history values (''now''::datetime,old.name,current_user,msg,9); end if; return new; end if; end; ' language 'plpgsql'; /***** function4: /***** drop function func_platext(); create function func_platext() returns opaque as ' declare flag int2; msg text; msg1 text; begin if tg_op = ''INSERT'' then msg:= ''Сумма ''|| new.plat; insert into history values (''now''::datetime,new.name,current_user,msg,10); return new; end if; if tg_op = ''DELETE'' then msg:= ''Сумма '' || old.plat; insert into history values (''now''::datetime,old.name,current_user,msg,11); return old; end if; if tg_op = ''UPDATE'' then flag:=0; msg:= '' ''; if old.name != new.name then msg1:= ''Перенос пл.на группу '' || new.name; msg:= msg || msg1; flag:=1; end if; if old.plat != new.plat then msg1:= ''Сумма '' || new.plat; msg:= msg || msg1; flag:=1; end if; if old.date != new.date then msg1:= ''Дата '' || new.date; msg:= msg || msg1; flag:=1; end if; if old.prim != new.prim then msg1:= ''Прим '' || new.prim; msg:= msg || msg1; flag:=1; end if; if flag <> 0 then insert into history values(''now''::datetime,old.name,current_user,msg,12); end if; return new; end if; end; ' language 'plpgsql'; /***** If you know how this problem might be fixed, list the solution below: --------------------------------------------------------------------- I don't know. Best regards, Vitaliy.
pgsql-ports by date: