Date: Mon, 30 Oct 1995 14:01:36 -0500 (EST) From: "Marc G. Fournier" <scrappy@reptiles.org> To: postgres95@postgres.berkeley.edu Cc: questions@freebsd.org Subject: PostGres95: Odd behaviour under FreeBSD 2.0 ... Message-ID: <Pine.BSF.3.91.951030133643.2103A-100000@rainbow-jr.dreaming.org>
next in thread | raw e-mail | index | archive | help
Hi... Well, finally got Postgres95 compiled under FreeBSD 2.0 (the OS doesn't have Shared Memory enabled in the kernel by default :< )...but now when trying to work with it, I'm getting some pretty odd behaviour. First off, it is a fully patched (official patches, that is) version of 1.0. Now, the odd behaviour: I created a "postgres" user on the system, to run things, so that it isn't keyed to anyone in particular. I installed it *as* postgres, not as root, so all the files are owned by postgres. After starting up postgres, with the postgres user, I tried to do a "psql template1", since the database is there, but I get a "Connection Failed" and "Is postmaster running at port XXXX", which it is, since I can connect to any of the other db's I've created. Now, I also did a createuser, so that I could work on a database from my own account, which worked fine. From my account, I proceeded to do a createdb, which also worked. But...destroydb is telling me I can't wipe it out, due to "no such class or insufficient privilege" (which was why I was going over to check out template1, which I believe is where that sort of info is kept?)...if I try to do it from the postgres account, I get the connection failed error about template1, and then it can't destory the database with the same error message. Without restarting the server, I tried to do a createdb on another database, and it created fine. If I try to connect to that, using psql, it gets the same error as when I tried to connect to template1 from the postgres account... ...now, I just restarted the server, and can not connect to new database again, but same thing happens if I try to connect to template1. If anyone has any ideas from the information I've given, as well as a possible fix, that would be greatly appreciated. If there is insufficient data to use, using script I've generated a file of the output of postmaster -d 3... Oh, new data. If I do "psql <database>", and it fails, if I try it again right after, it works... Well, don't know if this all helps much, but its, oddly enough, almost as if it needs the first invocation to "wake up" the daemon, and then its ready for the second invocation to connect...but its not consistent either. About the only consistent error that I can find is on "destroydb <database>"...it just doesn't work, period. Since it doesn't take up much space, I'm including my script-out for when trying to do a destroydb. The script-out for trying to connect and failing won't help much...nothing is getting recorded on the failed attempts. When you look at the included file, you will notice that there was only one attempt to destroydb made, as recorded...I actually made two, the first one failed on connect. ---- destroydb.scr ---- Script started on Mon Oct 30 13:56:56 1995 > postmaster -d3[K 3 FindBackend: searching PATH ... ValidateBackend: can't stat "/usr/local/bin/postgres" ValidateBackend: can't stat "/usr/bin/postgres" ValidateBackend: can't stat "/bin/postgres" ValidateBackend: can't stat "/sbin/postgres" ValidateBackend: can't stat "/usr/sbin/postgres" FindBackend: found "/usr/local/lib/pg95/bin/postgres" using PATH binding ShmemCreate(key=9428cec, size=754912) postmaster: ServerLoop: 1 sockets pending postmaster: ServerLoop: connect on 4 postmaster: ServerLoop: nSelected=0 postmaster: ServerLoop: port 4 pending postmaster: ServerLoop: 1 sockets pending postmaster: ServerLoop: nSelected=1 postmaster: ServerLoop: port 4 pending postmaster: ServerLoop: handling 4 postmaster: BackendStartup: environ dump: ----------------------------------------- TERM=cons25 HOME=/usr/local/lib/pg95 SHELL=/bin/tcsh LOGNAME=postgres USER=postgres PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/lib/pg95/bin:/usr/local/lib/pg95/bin HOSTTYPE=FreeBSD VENDOR=intel OSTYPE=FreeBSD MACHTYPE=i386 SHLVL=2 PWD=/usr/local/lib/pg95 HOST=rainbow-jr.dreaming.org BLOCKSIZE=K POSTPORT=5432 POSTID=2147483647 PG_USER=scrappy PGDATA=/usr/local/lib/pg95/data ----------------------------------------- postmaster child[2289]: execv(/usr/local/lib/pg95/bin/postgres, -p, -d2, -P4, template1, ) postmaster: BackendStartup: pid 2289 user scrappy db template1 socket 4 postmaster: ServerLoop: done with 4 FindBackend: found "/usr/local/lib/pg95/bin/postgres" using argv[0] ---debug info--- Quiet = f Noversion = f stable = f timings = f bufsize = 64 query echo = f multiplexed backend? = f DatabaseName = [template1] ---------------- InitPostgres().. StartTransactionCommand() at Mon Oct 30 13:57:11 1995 ================= After Rewriting ================= {QUERY :command 6 :utility "" :resrel 0 :rtable nil :unique "" :targetlist nil :qual nil} ProcessUtility() at Mon Oct 30 13:57:11 1995 input string is "delete from pg_database where pg_database.oid = '20736'::oid" ---- parser outputs : {QUERY :command 4 :utility "" :resrel 1 :rtable ({RTE :relname "pg_database" :inh 0 :refname "pg_database" :relid 88 }) :unique "" :targetlist nil :qual {EXPR :typeOid 16 :opType op :oper {OPER :opno 607 :opid 0 :opresulttype 16} :args ({VAR :varno 1 :va rattno -2 :vartype 26 :varnoold 1 :varoattno -2} {CONST :consttype 26 :constlen 4 :constisnull nil :constvalue 4 [ 0 81 0 0 ] :constbyval true})}} ================= After Rewriting ================= {QUERY :command 4 :utility "" :resrel 1 :rtable ({RTE :relname "pg_database" :inh 0 :refname "pg_database" :relid 88 }) :unique "" :targetlist nil :qual {EXPR :typeOid 16 :opType op :oper {OPER :opno 607 :opid 0 :opresulttype 16} :args ({VAR :varno 1 :va rattno -2 :vartype 26 :varnoold 1 :varoattno -2} {CONST :consttype 26 :constlen 4 :constisnull nil :constvalue 4 [ 0 81 0 0 ] :constbyval true})}} Plan is : {SEQSCAN :cost 1.065 :size 1 :width 6 :state nil :qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 27 :reslen 6 :resname "ctid" :reskey 0 :reskeyop 0 :resjunk 1} :expr {VAR :varno 1 :varattno -1 :vartype 27 :varnoold 1 :varoattno -1}}) :qpqual ({EXPR :typeOid 0 :opType op :oper {OPER :opno 607 :opid 184 :opresulttype 16} :args ({VAR :varno 1 :varattno -2 :vartype 26 :varnoold 1 :varoattno -2} {CONST :consttype 26 :constlen 4 :constisnull nil :constvalue 4 [ 0 81 0 0 ] :constbyval true})}) :lefttree nil :righttree nil :scanrelid 1} ProcessQuery() at Mon Oct 30 13:57:13 1995 WARN:pg_database Either no such class or insufficient privilege AbortCurrentTransaction() at Mon Oct 30 13:57:13 1995 DEBUG:Input descriptor is null postmaster: reaping dead processes... postmaster: CleanupProc: pid 2289 exited with status 0 ^C> ^D Script done on Mon Oct 30 13:57:42 1995
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.951030133643.2103A-100000>