pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Debug messages in beta5
3+ messages / 3 participants
[nested] [flat]

* Debug messages in beta5
@ 2001-02-27 16:47 Kyle <kyle@actarg.com>
  2001-02-27 17:22 ` Re: [SQL] Debug messages in beta5 Tom Lane <tgl@sss.pgh.pa.us>
  2001-02-28 17:05 ` Re: Debug messages in beta5 Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Kyle @ 2001-02-27 16:47 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; pgsql-sql

Maybe this will help in evaluating beta5.  Here is some debug output
from serverlog while the system was doing a restore to 7.1b5 from a
pg_dump file created on a 7.0.3 box:

DEBUG:  MoveOfflineLogs: remove 000000000000003D
DEBUG:  MoveOfflineLogs: remove 000000000000003E
DEBUG:  MoveOfflineLogs: remove 000000000000003F
DEBUG:  MoveOfflineLogs: remove 0000000000000040
DEBUG:  MoveOfflineLogs: remove 0000000000000041
DEBUG:  MoveOfflineLogs: remove 0000000000000036
DEBUG:  MoveOfflineLogs: remove 0000000000000037
DEBUG:  MoveOfflineLogs: remove 0000000000000038
DEBUG:  MoveOfflineLogs: remove 0000000000000039
DEBUG:  MoveOfflineLogs: remove 000000000000003A
DEBUG:  MoveOfflineLogs: remove 000000000000003B
DEBUG:  MoveOfflineLogs: remove 000000000000003C
DEBUG:  copy: line 25300, XLogWrite: new log file created - try to
increase WAL_FILES
DEBUG:  copy: line 57362, XLogWrite: new log file created - try to
increase WAL_FILES
DEBUG:  copy: line 27109, XLogWrite: new log file created - try to
increase WAL_FILES
DEBUG:  copy: line 2978, XLogWrite: new log file created - try to
increase WAL_FILES
DEBUG:  MoveOfflineLogs: remove 0000000000000044
DEBUG:  MoveOfflineLogs: remove 0000000000000045
DEBUG:  MoveOfflineLogs: remove 0000000000000046
DEBUG:  MoveOfflineLogs: remove 0000000000000042
DEBUG:  MoveOfflineLogs: remove 0000000000000043

I'm not sure where/how to change WAL_FILES.  Is that a compiled in
default or a configuration setting?  Is the MoveOfflineLogs anything to
worry about?

These were interesting too:  I'm not sure what to make of them:

NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"
ERROR:  Rule WHERE condition may not contain references to other
relations
NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"

Here's what the original schema definition for cont_group_link looks
like:

create table cont_group_link (
-------------------------------------
-- Primary Keys:        org_id, cont_id, group_owner, group_name
-- Foreign Keys:        org_id, cont_id into cont_cont

   org_id int,
   cont_id int,
   crt_by int4,
   group_name varchar,
   unique (org_id, cont_id, crt_by, group_name),

   foreign key (org_id)
        references cont_org
        on update cascade
        on delete cascade,

   foreign key (org_id, cont_id)
        references cont_cont
        on update cascade
        on delete cascade,

   foreign key (crt_by, group_name)
        references cont_group
        on update cascade
        on delete cascade
);

And here's a view definition that the messages are probably related to:

drop view cont_group_v;
drop view cont_group_link_v;
--CV:
create view cont_group_v as select *, oid as _oid from cont_group where
not (access = 'none' and crt_by != getpguid());

create rule cont_group_v_insert as on insert to cont_group_v
    do instead
    insert into cont_group
   (crt_by, group_name, group_type, descr, access)
    values
       (getpguid(), new.group_name, new.group_type, new.descr,
new.access);

create rule cont_group_v_delete as on delete to cont_group_v
    do instead
    delete from cont_group
    where crt_by = old.crt_by
    and group_name = old.group_name;

create rule cont_group_v_update as on update to cont_group_v
    do instead
        update cont_group
        set group_name = new.group_name, group_type = new.group_type,
descr = new.descr, access = new.access
        where crt_by = old.crt_by
        and group_name = old.group_name;

create view cont_group_link_v as select *, oid as _oid from
cont_group_link where cont_group_priv(crt_by,group_name,'r');

create rule cont_group_link_v_innull as on insert to cont_group_link_v
do instead nothing;
create rule cont_group_link_v_insert as on insert to cont_group_link_v
where cont_group_priv(crt_by,group_name,'w')
    do instead
    insert into cont_group_link
    (org_id, cont_id, crt_by, group_name)
    values (new.org_id, new.cont_id, getpguid(), new.group_name);

create rule cont_group_v_link_denull as on delete to cont_group_link_v
do instead nothing;
create rule cont_group_v_link_delete as on delete to cont_group_link_v
where cont_group_priv(crt_by,group_name,'w')
    do instead
    delete from cont_group_link
        where org_id = old.org_id
        and cont_id = old.cont_id
        and crt_by = old.crt_by
        and group_name = old.group_name;



This seems to lack sufficient context to find exactly where they came
from:
ERROR:  Rule WHERE condition may not contain references to other
relations

ERROR:  select rule's target entry 27 has different type from attribute
lquant

However, based on the field name, I can tell the last one is coming from
this view:

create view mtr_reg_v_unpackaged as
   select m.*, (select coalesce(sum(l.quant),0)
                from pak_lnk l
                where m.ttype = l.ttype
                and m.ropnum = l.ropnum
                and m.inum = l.inum
                and m.minum = l.minum
                and m.bminum = l.bminum) as lquant,
          (select p.base||'('||p.parm||')' from prd_part_v_base p where
p.pnum = m.pnum) as pname,
          (select p.descr from prd_part_v_base p where p.pnum = m.pnum)
as descr
   from mtr_reg_v_or m, ord_hdr o
   where m.status = 'open'
   and m.ropnum = o.ordnum
   and o.type = 'ord'
   and m.rquant >
   (select coalesce(sum(l.quant),0) from pak_lnk l
      where m.ttype = l.ttype
      and m.ropnum = l.ropnum
      and m.inum = l.inum
      and m.minum = l.minum
      and m.bminum = l.bminum);

Attachments:

kyle.vcf (text/x-vcard, 184B) download begin:vcard n:Bateman;Kyle x-mozilla-html:FALSE org:Action Target Inc. adr:;;;;;; version:2.1 email;internet:kyle@actarg.com title:President x-mozilla-cpt:;0 fn:Kyle Bateman end:vcard
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: [SQL] Debug messages in beta5
  2001-02-27 16:47 Debug messages in beta5 Kyle <kyle@actarg.com>
@ 2001-02-27 17:22 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2001-02-27 17:22 UTC (permalink / raw)
  To: Kyle <kyle@actarg.com>; +Cc: pgsql-general@postgresql.org; pgsql-sql

Kyle <kyle@actarg.com> writes:
> These were interesting too:  I'm not sure what to make of them:

> NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"
> ERROR:  Rule WHERE condition may not contain references to other
> relations
> NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"

These are fishy --- I would not have expected pg_dump output to trigger
such messages.  Could you redo the load with PGOPTIONS="-d2" so that the
queries appear in the log along with the notices/errors?  That way we
could see just what's triggering the messages.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Debug messages in beta5
  2001-02-27 16:47 Debug messages in beta5 Kyle <kyle@actarg.com>
@ 2001-02-28 17:05 ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2001-02-28 17:05 UTC (permalink / raw)
  To: Kyle <kyle@actarg.com>; +Cc: pgsql-general@postgresql.org; pgsql-sql

I am adding the DEBUG messages to the open items list.


> Maybe this will help in evaluating beta5.  Here is some debug output
> from serverlog while the system was doing a restore to 7.1b5 from a
> pg_dump file created on a 7.0.3 box:
> 
> DEBUG:  MoveOfflineLogs: remove 000000000000003D
> DEBUG:  MoveOfflineLogs: remove 000000000000003E
> DEBUG:  MoveOfflineLogs: remove 000000000000003F
> DEBUG:  MoveOfflineLogs: remove 0000000000000040
> DEBUG:  MoveOfflineLogs: remove 0000000000000041
> DEBUG:  MoveOfflineLogs: remove 0000000000000036
> DEBUG:  MoveOfflineLogs: remove 0000000000000037
> DEBUG:  MoveOfflineLogs: remove 0000000000000038
> DEBUG:  MoveOfflineLogs: remove 0000000000000039
> DEBUG:  MoveOfflineLogs: remove 000000000000003A
> DEBUG:  MoveOfflineLogs: remove 000000000000003B
> DEBUG:  MoveOfflineLogs: remove 000000000000003C
> DEBUG:  copy: line 25300, XLogWrite: new log file created - try to
> increase WAL_FILES
> DEBUG:  copy: line 57362, XLogWrite: new log file created - try to
> increase WAL_FILES
> DEBUG:  copy: line 27109, XLogWrite: new log file created - try to
> increase WAL_FILES
> DEBUG:  copy: line 2978, XLogWrite: new log file created - try to
> increase WAL_FILES
> DEBUG:  MoveOfflineLogs: remove 0000000000000044
> DEBUG:  MoveOfflineLogs: remove 0000000000000045
> DEBUG:  MoveOfflineLogs: remove 0000000000000046
> DEBUG:  MoveOfflineLogs: remove 0000000000000042
> DEBUG:  MoveOfflineLogs: remove 0000000000000043
> 
> I'm not sure where/how to change WAL_FILES.  Is that a compiled in
> default or a configuration setting?  Is the MoveOfflineLogs anything to
> worry about?
> 
> These were interesting too:  I'm not sure what to make of them:
> 
> NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"
> ERROR:  Rule WHERE condition may not contain references to other
> relations
> NOTICE:  Adding missing FROM-clause entry for table "cont_group_link"
> 
> Here's what the original schema definition for cont_group_link looks
> like:
> 
> create table cont_group_link (
> -------------------------------------
> -- Primary Keys:        org_id, cont_id, group_owner, group_name
> -- Foreign Keys:        org_id, cont_id into cont_cont
> 
>    org_id int,
>    cont_id int,
>    crt_by int4,
>    group_name varchar,
>    unique (org_id, cont_id, crt_by, group_name),
> 
>    foreign key (org_id)
>         references cont_org
>         on update cascade
>         on delete cascade,
> 
>    foreign key (org_id, cont_id)
>         references cont_cont
>         on update cascade
>         on delete cascade,
> 
>    foreign key (crt_by, group_name)
>         references cont_group
>         on update cascade
>         on delete cascade
> );
> 
> And here's a view definition that the messages are probably related to:
> 
> drop view cont_group_v;
> drop view cont_group_link_v;
> --CV:
> create view cont_group_v as select *, oid as _oid from cont_group where
> not (access = 'none' and crt_by != getpguid());
> 
> create rule cont_group_v_insert as on insert to cont_group_v
>     do instead
>     insert into cont_group
>    (crt_by, group_name, group_type, descr, access)
>     values
>        (getpguid(), new.group_name, new.group_type, new.descr,
> new.access);
> 
> create rule cont_group_v_delete as on delete to cont_group_v
>     do instead
>     delete from cont_group
>     where crt_by = old.crt_by
>     and group_name = old.group_name;
> 
> create rule cont_group_v_update as on update to cont_group_v
>     do instead
>         update cont_group
>         set group_name = new.group_name, group_type = new.group_type,
> descr = new.descr, access = new.access
>         where crt_by = old.crt_by
>         and group_name = old.group_name;
> 
> create view cont_group_link_v as select *, oid as _oid from
> cont_group_link where cont_group_priv(crt_by,group_name,'r');
> 
> create rule cont_group_link_v_innull as on insert to cont_group_link_v
> do instead nothing;
> create rule cont_group_link_v_insert as on insert to cont_group_link_v
> where cont_group_priv(crt_by,group_name,'w')
>     do instead
>     insert into cont_group_link
>     (org_id, cont_id, crt_by, group_name)
>     values (new.org_id, new.cont_id, getpguid(), new.group_name);
> 
> create rule cont_group_v_link_denull as on delete to cont_group_link_v
> do instead nothing;
> create rule cont_group_v_link_delete as on delete to cont_group_link_v
> where cont_group_priv(crt_by,group_name,'w')
>     do instead
>     delete from cont_group_link
>         where org_id = old.org_id
>         and cont_id = old.cont_id
>         and crt_by = old.crt_by
>         and group_name = old.group_name;
> 
> 
> 
> This seems to lack sufficient context to find exactly where they came
> from:
> ERROR:  Rule WHERE condition may not contain references to other
> relations
> 
> ERROR:  select rule's target entry 27 has different type from attribute
> lquant
> 
> However, based on the field name, I can tell the last one is coming from
> this view:
> 
> create view mtr_reg_v_unpackaged as
>    select m.*, (select coalesce(sum(l.quant),0)
>                 from pak_lnk l
>                 where m.ttype = l.ttype
>                 and m.ropnum = l.ropnum
>                 and m.inum = l.inum
>                 and m.minum = l.minum
>                 and m.bminum = l.bminum) as lquant,
>           (select p.base||'('||p.parm||')' from prd_part_v_base p where
> p.pnum = m.pnum) as pname,
>           (select p.descr from prd_part_v_base p where p.pnum = m.pnum)
> as descr
>    from mtr_reg_v_or m, ord_hdr o
>    where m.status = 'open'
>    and m.ropnum = o.ordnum
>    and o.type = 'ord'
>    and m.rquant >
>    (select coalesce(sum(l.quant),0) from pak_lnk l
>       where m.ttype = l.ttype
>       and m.ropnum = l.ropnum
>       and m.inum = l.inum
>       and m.minum = l.minum
>       and m.bminum = l.bminum);
> 
Content-Description: Card for Kyle

[ Attachment, skipping... ]


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-02-28 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27 16:47 Debug messages in beta5 Kyle <kyle@actarg.com>
2001-02-27 17:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-02-28 17:05 ` Bruce Momjian <pgman@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox