Subject: a strange bug of database integrity

From: Sternberg Ori <[email-masked]>
Date: Sun, 19 Dec 93 21:57:08 +0200

Hi,

I wonder if you have an idea to solve my problem...

after creating database:
  createdb test1

and running the following shell script:

#!/bin/csh
monitor -c 'create Persons(id=int4,name=char16,address=char16,byear=int2)' $1
monitor -c 'create Books(serial=int4,title=char16,section=char16)' $1
monitor -c 'create Authors(id=int4,title=char16)' $1
monitor -c 'retrieve into tmp (p.name,year=p.byear)\
                from p in Persons,a in Authors,b in Books\
                where p.id=a.id and\
                        a.title=b.title and b.section="AI"' $1
monitor -c 'retrieve into tmp2 (year=int2max{tmp.year})' $1

I get the message :

   WARN:Dec 19 21:47:12:ExecAgg: no initial value given and no valid tuples found

which is logical since tmp is empty,but when I try to use the database again for let say :

   monitor -c 'retrieve (pg_class.all)' test1

I get :

   WARN:Dec 19 21:49:42:OperatorObjectIdFillScanKeyEntry: unknown operator 609

and it repeat it self for every query I try on that database.

even stranger, I cannot destroy the database with
   destroydb test1

because it hangs the postmaster which I have to kill and run again to successfully destroy the database.

I will be glad to get a quick reply since we give here a DataBase course and 
exercises will be given on the postgres system.

p.s. please add me to your mailing list.

Ori.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sternberg Ori,
C.S. System Group, Hebrew University,
Jerusalem 91904, ISRAEL.
[email-masked]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 20 Dec 1993 19:00:00 -0800

> I wonder if you have an idea to solve my problem...

this sounds like a known intermittent bug where destroydb immediately
followed by createdb causes problems (old buffers for the old database
seem to hang around).  kristin wright (kristin@postgres) was working on 
it but wasn't able to reproduce it in a debuggable way.  if you have
a series of actions that reproduce it consistently, please send her
mail..
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 20 Dec 1993 19:04:05 -0800

btw, when i said "series of events to reproduce it consistently"
i did mean consistently.. we have several scripts that produced
the problem *at least once* but it seems to have something to do
with the phase of the moon, the alignment of the planets and the
number of cans of coke consumed in 608-3 evans over the last week..
:-(
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki