pg installation for dummies

From: Rick Schumeyer <rschumeyer(at)ieee(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: pg installation for dummies
Date: 2007-03-20 15:27:35
Message-ID: 45FFFD67.5060503@ieee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-20 15:47:01 Re: LISTEN/NOTIFY and python
Previous Message Richard Huxton 2007-03-20 15:24:23 Re: shell script to SQL statement: `pg_dump | psql -U`