pg installation for dummies - Mailing list pgsql-general

From Rick Schumeyer
Subject pg installation for dummies
Date
Msg-id 45FFFD67.5060503@ieee.org
Whole thread Raw
Responses Re: pg installation for dummies  (Ron Johnson <ron.l.johnson@cox.net>)
Re: pg installation for dummies  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm writing an article based on my experience setting up a ruby-on-rails
server for a web apps class I'm teaching.  My target audience is people
who have a clue,
but are not gurus at the wide collection of software necessary to get a
server running.

The in-work article is at http://www.schumeyer.com/content/view/16/29/

I have a section describing pg installation.  I would like to be sure
that I  did not inadvertently do something stupid with my pg setup.
So a couple of questions:

1) People often ask about the memory settings in postgresql.conf.  My
assumption is that if you are running small databases (like a class
project) then you
don't need to change these settings.  But if you need to change them,
then the question is, change them to what?  Are these reasonable for a
system with 2GB memory:
       shared_buffers       = 5000
       work_mem             = 20000
       maintenance_work_mem = 20000
I'm not looking for optimal settings.  If someone want optimal, they
should find someone who knows what they are doing to install pg.  I'm
just looking for
"reasonable" settings.

2) I created accounts and databases for each student, where the database
name and account name are the same.  I did not realize that by default,
all users can
access all databases!?  (Unless I did something stupid).  I now believe
that the "right" thing to do is this (in pg_hba.conf)
     # "local" is for Unix domain socket connections only
     local   sameuser    all                               md5
     local   all         postgres                          md5
This seems to prevent a student from logging into anything other that
his own database.  Is this the best way?

I certainly appreciate comments and feedback.



pgsql-general by date:

Previous
From: "filippo"
Date:
Subject: shell script to SQL statement: `pg_dump | psql -U`
Next
From: Tom Lane
Date:
Subject: Re: LISTEN/NOTIFY and python