Penguin
Diff: PostgreSQLNotes
EditPageHistoryDiffInfoLikePages

Differences between version 2 and revision by previous author of PostgreSQLNotes.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 2 Last edited on Thursday, September 23, 2004 6:59:21 pm by AristotlePagaltzis Revert
Older page: version 1 Last edited on Tuesday, September 14, 2004 9:46:44 am by DrewBroadley Revert
@@ -1,29 +1,27 @@
-!![PostgreSQL] Notes  
+!! IDENT authentication failed for user  
  
-! IDENT authentication failed for user 
+[PostgreSQL] under [Debian] by default uses [ IDENT] authentication to authenticate a user connecting to the database. In english this means that you can only connect to the database with the same username as your unix login. This can be edited in <tt>/etc/postgres/pg_hba.conf</tt> (Host Based Authentication) by changing <tt>ident sameuser</tt> with <tt>trust</tt> to let anyone connect to the database with any username without a password, or <tt>crypt</tt> etc. The file is well commented, refer to it for more details.  
  
-[PostgreSQL] under [Debian] by default uses [IDENT] authentication to authenticate a user connecting to the database. In english this means that you can only connect to the database with the same username as your unix login. This can be edited in /etc/postgres/pg_hba.conf (Host Based Authentication) by changing "ident sameuser" with "trust" to let anyone connect to the database with any username without a password, or "crypt" etc.. The file is well commented, refer to it for more details.  
-If you change debian 's default setup, then you may get error messages every day from cron, as the postgres user connects to every database and runs some optimisations. 
+If you change [Debian]'s default setup, then you may get error messages every day from cron, as the <tt> postgres</tt> user connects to every database and runs some optimisations. 
  
-The [Unix] root user can "su" to the user named " postgres". This user can then run the shell commands " createdb" and " createuser" - if you create a database user with the same name as a unix account, then that unix account user can connect (when using ident sameuser). If you don't want to use the shell command, the postgres user could run "$ psql template1" to connect via the interactive shell, and then do " > create database < name> ;" or " > create user < name> ;"  
+The [Unix] SuperUser can change to the <tt> postgres</tt> user to run the shell commands <tt> createdb</tt> and <tt> createuser</tt> - - if you create a database user with the same name as a [Unix] account, then that [Unix] account user can connect (when using ident sameuser). If you don't want to use the shell command, the postgres user could run <tt> psql template1</tt> to connect via the interactive shell, and then do <tt >create database '' name'' ;</tt> or <tt >create user '' name'' ;</tt>.  
  
-!Upgrading from 7.2 to 7.3 
+! ! Upgrading from 7.2 to 7.3 
  
-A couple of minor "gotchas". As above, check your pg_hba.conf file. Previously "password" authentication covered all forms of stored password. Now it is strict. If you are using md5 passwords, it MUST be md5.  
-Also, in [SQL ]-land, LIMIT used to be fairly forgiving about its arguments. It would accept [MySQL] format without blinking. Now it's strict - this caught me out on a basic weblog script I use which had been ported from [MySQL].  
-Finally, if you are a [Debian] user, don't believe the instructions in the update README!  
-psql -e <dumpfile will NOT restore your database...you need to do psql template1 -e <dumpfile>
+Check your <tt> pg_hba.conf</tt> file. Previously "password" authentication covered all forms of stored password. Now it is strict. If you are using [MD5] passwords, it __must__ be [MD5 ]. 
  
-!"You should create PGDATA directory first." in Gentoo after a emerge install  
+Also, in [SQL]-land, LIMIT used to be fairly forgiving about its arguments. It would accept [MySQL] format without blinking. Now it's strict.  
  
-If you get the following error:  
+Finally, if you are a [Debian] user, don't believe the instructions in the update README! <tt>psql -e < ''dumpfile''</tt> will __not__ restore your database... you need to do <tt>psql template1 -e ''dumpfile''</tt>.  
  
- # /etc/init.d/postgresql start  
- * directory not found: /var/lib/postgresql/data  
- * You should create PGDATA directory first. 
+!! " You should create PGDATA directory first." in GentooLinux after an emerge install  
  
-Then all you need to do is the following: 
+If you get the following error
  
- # ebuild /var /db /pkg /dev-db /postgresql-<VERSION> /postgresql- <VERSION >.ebuild config  
+<verbatim>  
+ # /etc /init.d /postgresql start  
+ * directory not found: /var /lib /postgresql/data  
+ * You should create PGDATA directory first.  
+ </verbatim
  
-- DrewBroadley  
+then you need to issue <tt>ebuild /var/db/pkg/dev -db/postgresql-<VERSION>/postgresql-<VERSION>.ebuild config</tt>