X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B6DD0D1B19F for ; Wed, 21 Jul 2004 06:15:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12759-07 for ; Wed, 21 Jul 2004 09:15:14 +0000 (GMT) Received: from my.mu.edu.ph (unknown [203.177.157.4]) by svr1.postgresql.org (Postfix) with ESMTP id 102A8D1B16A for ; Wed, 21 Jul 2004 06:15:08 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by my.mu.edu.ph (Postfix) with ESMTP id EFD0373798 for ; Wed, 21 Jul 2004 17:28:20 +0800 (PHT) Received: from my.mu.edu.ph ([127.0.0.1]) by localhost (my.mu.edu.ph [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07384-08 for ; Wed, 21 Jul 2004 17:28:15 +0800 (PHT) Received: from localhost (my.mu.edu.ph [203.177.157.4]) by my.mu.edu.ph (Postfix) with ESMTP id 6186B73797 for ; Wed, 21 Jul 2004 17:28:15 +0800 (PHT) Received: from 203.177.157.7 ([203.177.157.7]) by sulat.mu.edu.ph (IMP) with HTTP for ; Wed, 21 Jul 2004 17:28:15 +0800 Message-ID: <1090402095.40fe372f2ab14@sulat.mu.edu.ph> Date: Wed, 21 Jul 2004 17:28:15 +0800 From: Howard Bagcat To: pgsql-admin@postgresql.org Subject: Re: execute user-defined BKI References: <1090374725.40fdcc458ece6@sulat.mu.edu.ph> <200407210929.42398.peter_e@gmx.net> In-Reply-To: <200407210929.42398.peter_e@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Virus-Scanned: by amavisd-new at my.mu.edu.ph X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/236 X-Sequence-Number: 14304 Quoting Peter Eisentraut : > > How can I execute my BKI script? > > I suggest that you don't, and you explain us your problem from in more > general terms. Thanks for the reply. My problem was I can not get into any of my local databases, including template1. Postmaster keeps on saying, "Fatal: Invalid User ID:0". The error was really surprising to me since I've been connecting to this sql server last day using the same username without errors. It seems to me that postmaster bar me from getting into any of the database and template1 because possibly there were no username in pg_shadow to authenticate to. Another strange thing, if indeed my analysis that pg_shadow was corrupted then why is it that postmaster started without problems. That's the story why I end up thinking of using BKI in order to possibly manipulate pg_shadow. As of writing this, I tried running postgres in stand-alone mode using the following: $ postgres -D /usr/share/postgresql/data template1 And successfully, I get in. Now I tried executing "SELECT * FROM pg_shadow", and my analysis was right what I have was a row field with empty values. I just added a new user called "postgres". So what I have in pg_shadow are: template1=# SELECT * FROM pg_shadow; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig -------------+-----------+--------------+------------+-----------+----------+----------------+----------- | | | | | | | postgres | 1 | t | t | t | | 00:00:00+08 | (2 rows) Now, my problem pg_dump and pg_dumpall displayed a lot of WARNING messages, like: "pg_dump: WARNING: owner of table "triggers" appears to be invalid." For your information, Please do share your ideas. Thank You. Kumusta, Howard E-Sulat v.0.0.1 ( Manna ) ....................................................................................... An extended module for MUWeb4 Project Powered by Horde, Postfix, PostgreSQL & Courier-IMAP