X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 11785D1B471 for ; Mon, 15 Dec 2003 15:57:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 66864-04 for ; Mon, 15 Dec 2003 11:56:58 -0400 (AST) Received: from mail.tpi.pl (mail.tpi.pl [193.110.121.18]) by svr1.postgresql.org (Postfix) with ESMTP id BB5EED1B507 for ; Mon, 15 Dec 2003 11:56:53 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.tpi.pl (Postfix) with ESMTP id 1E28A46F9E; Mon, 15 Dec 2003 16:56:41 +0100 (CET) Received: from mail.tpi.pl ([127.0.0.1]) by localhost (silver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22522-10; Mon, 15 Dec 2003 16:56:40 +0100 (CET) Received: from -allhosts (lan-out [193.110.121.17]) by mail.tpi.pl (Postfix) with ESMTP id 3B91646FAA; Mon, 15 Dec 2003 16:56:26 +0100 (CET) Subject: Re: Moving a database AND changing the superuser From: Marek Florianczyk To: Rich Cullingford Cc: pgsql-admin@postgresql.org In-Reply-To: <3FDDD39D.1060101@sysd.com> References: <3FDDD39D.1060101@sysd.com> Content-Type: text/plain; charset=iso-8859-2 Message-Id: <1071503784.1315.135.camel@franki-laptop.tpi.pl> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 15 Dec 2003 16:56:24 +0100 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at TP Internet X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/190 X-Sequence-Number: 11697 W li¶cie z pon, 15-12-2003, godz. 16:30, Rich Cullingford pisze: > All, > I did a pg_dumpall in preparation for moving one of our databases from > PG7.3 to PG7.4, but I just realized I have another problem: that DB > (which has served us faithfully for some time) was created for superuser > 'postgres,' whilst our new DBs use a superuser name that's aligned with > our product. I'm expecting conflicts when I try to restore the data into > a 'new' DB. Am I right, and if so, what can I do? (I know I could just > try it, but the old database machine will be disappearing soon, and if I > need to do a different kind of dump -- per DB, for example -- I need to > know that soonest.) Well can't you just change all appearance of 'postgres' word to some other eg. cat dump.sql|sed -e 's/postgres/new_admin/g' > new_dump.sql of course you must check first if word 'postgres' is used in any other context, and maybe do some correction by hand. greetings Marek