Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PostgreSQL Guide Feedback
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ChrisWhite
Retired Dev
Retired Dev


Joined: 08 Jul 2004
Posts: 399
Location: Stockton, CA

PostPosted: Thu Mar 16, 2006 6:35 pm    Post subject: PostgreSQL Guide Feedback Reply with quote

Hey all,

I did a guide on PostgreSQL setup located here:

http://www.gentoo.org/doc/en/postgres-howto.xml

and would like feedback on it. As with everything else, I can't guarantee I'll accept everyone's sugestions,
but I'll sure be appreciative :).

Anyways, I'm mainly doing this as it's a draft, and I need to see how people expect to use it.

Thanks to everyone!

Mod edit: Stuck for a while, --kallamej
Unstuck. -- desultory
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Thu Mar 16, 2006 8:30 pm    Post subject: Reply with quote

Wow, I wish this had been available a few months ago when I was getting into Postgres for the first time on Gentoo. Anyway, thanks!

One nitpick:
In the USE flag section this line:
Quote:
nls If this option is enabled, PostgreSQL can utilized translated strings for non-English speaking users.


Should be:
Quote:
nls If this option is enabled, PostgreSQL can utilize translated strings for non-English speaking users.

_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
ChrisWhite
Retired Dev
Retired Dev


Joined: 08 Jul 2004
Posts: 399
Location: Stockton, CA

PostPosted: Thu Mar 16, 2006 8:43 pm    Post subject: Reply with quote

ack, thanks for catching that, I'll toss it to the next docs person I see.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Wed Mar 22, 2006 8:06 am    Post subject: Reply with quote

The guide works well. Thanks!!
Back to top
View user's profile Send private message
giant
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2002
Posts: 107

PostPosted: Wed Mar 29, 2006 7:00 am    Post subject: Reply with quote

Nice overview :-)

Had no problem installing a nice little postgres server with it !

Thanks a lot for the guide !
Back to top
View user's profile Send private message
PaveQ
Apprentice
Apprentice


Joined: 11 Feb 2005
Posts: 225
Location: Finland

PostPosted: Wed Mar 29, 2006 10:50 am    Post subject: Reply with quote

Thanks, thats great! :D
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Mon Apr 17, 2006 5:44 am    Post subject: Reply with quote

Just a couple of things.

First off, I wouldnt start off the introduction with a comparison / rip on MySQL. I agree with you 100% of course, but I'd take a line from this instead.

Another thing, I would change this:

"To start out, let's create a test database by using the createdb command. We'll also pass along the -U option to set the user (it defaults to the current user name if you don't), ..."

I'd change "the current user name" part to something like "the current user logged in (root, for example)." Something along those lines to distinguish that you're talking about system users, not psql users.

Last thing, it might be kind of nice to throw in some environment variables that can be set, such as PG_USER, so I don't have to pass -U each time. :)

Looking good, though.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Tue Apr 18, 2006 3:19 am    Post subject: Reply with quote

You've got the exact same issues as your Mysql How-to, near total lack of Gentoo specific info.

Things that would actually fix user probems before they have them:

1. Discussion of config files. /var/lib/postgressql/pg_hba.conf and /etc/conf.d/postgresql should be mentioned and the user might need to touch these to get what they want.

2. Bound to localhost by default. Gentoo default is to bind database to localhost by default. THe guide should explain that and how to change. If you're feeling like an overachiever you can even discuss IP and username ACL's

3. How to delete the database and start from scratch. Every user screws up their db and want to start from scratch or at least from a point where they can get back into their database.

There are a thousand plus places I can go to learn how to insert into Postgres and hardly any that has reliable Gentoo specific info about how Postgres was installed, where the config files are, and some of the default settings. The Gentoo docs should cover the Gentoo specific cases before doing anything else.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Tue May 16, 2006 11:05 pm    Post subject: Reply with quote

Foreign keys have been supported in MySQL for InnoDB tables since version 3.23. Some things that were added in MySQL 5 were views, stored procedures and triggers.

You're free to bash MySQL if you want to, but please get your facts straight. See here: http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-foreign-keys.html
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
castaway
n00b
n00b


Joined: 18 Feb 2005
Posts: 23
Location: Swindon, UK

PostPosted: Tue May 23, 2006 9:04 am    Post subject: libpq ? Reply with quote

You might want to mention the library-only package, "libpq" in there somewhere..

This is what I went there looking for, and ended up asking on #gentoo instead ;)

C.
Back to top
View user's profile Send private message
mkb137
n00b
n00b


Joined: 13 May 2002
Posts: 33
Location: Calgary, Canada

PostPosted: Sat Jun 10, 2006 5:46 pm    Post subject: Reply with quote

I followed the guide and liked it.

After setting up all those users and passwords, I was suprised to find that the database would accept my connections and changes no matter what password I gave. After some other research I found out why : the "trust" option in pg_hba.conf. I don't know if want to mention that in your guide or not.
Back to top
View user's profile Send private message
Wicked Wesley
n00b
n00b


Joined: 20 May 2004
Posts: 70
Location: Here

PostPosted: Tue Jun 13, 2006 9:25 pm    Post subject: Reply with quote

The guide looks good!

Maybe you should add a note about PGAdmin, in my opinion a nice PostgreSQL application, which is available in Portage, dev-db/pgadmin3.

Keep up the good work,
Wesley
_________________
The Jester!
Linux user 357122!
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Thu Jun 22, 2006 8:27 pm    Post subject: Reply with quote

Code Listing 2.7: Setting up the superuser:
$ createuser -a -d -P -E -U postgres -W chris

Should be:
Code:
$ createuser -s -d -P -E -U postgres -W chris


Code Listing 2.8: Setting up the standard user:
$ createuser -A -D -P -E -U postgres -W chris

Should be:
Code:
$ createuser -S -d -P -E -U postgres -W chris


Quote:
shadow ~ # createuser --help |grep superuser
-s, --superuser role will be superuser
-S, --no-superuser role will not be superuser
Back to top
View user's profile Send private message
dec
n00b
n00b


Joined: 18 Jul 2003
Posts: 63

PostPosted: Sat Jul 08, 2006 6:15 am    Post subject: Reply with quote

Ideas/suggestions:

  • Backups - briefly mention pgdump and online/PITR backups - having a great database is useless without backups!
  • More postgresql.org references - the documentation on postgresql.org is fantastic and should be mentioned more often than just the very last sentence.
  • Performance - out of the box postgres can be a little sluggish on a large DB, point everyone to the performance guide on powerpostgresql.com



Tom
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Fri Jul 14, 2006 3:35 pm    Post subject: Reply with quote

Note that the 'Oracle Reference Guide' link in the description of the 'pg-hier' USE flag is broken, you seem to have inserted spaces into it.
The correct link is http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/queries4a.htm
Back to top
View user's profile Send private message
GoofballJM1
Guru
Guru


Joined: 22 Mar 2004
Posts: 392
Location: Denver, CO USA

PostPosted: Thu Jan 11, 2007 4:09 pm    Post subject: Reply with quote

Although it's not as severe as with MySQL, but an upgrade guide for Postgres would be very helpful. Having information regarding that will save many of us novice Postgres users a little time from scrounging through the forums and on google. :wink:
_________________
"Great spirits have often encountered violent opposition from weak minds." - Albert Einstein
Back to top
View user's profile Send private message
jmanko
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2005
Posts: 139
Location: NEPA, USA

PostPosted: Mon Jan 15, 2007 10:00 pm    Post subject: Reply with quote

I started to follow this tutorial, but I get:
Code:

createuser: could not connect to database postgres: FATAL:  could not open file "global/pg_database": No such file or directory

I also notice I keep getting a *.pid message when restarting Postgresql

Code:
# /etc/init.d/postgresql restart
 * Stopping PostgreSQL ...
No process in pidfile `/var/lib/postgresql/data/postmaster.pid' found running; none killed.                                                         [ ok ]
 * Starting PostgreSQL ... 


Any ideas?
_________________
"What stands in the way becomes the way." -- Marcus Aurelius
Back to top
View user's profile Send private message
_pF_
Apprentice
Apprentice


Joined: 22 Apr 2004
Posts: 195
Location: Central London

PostPosted: Mon Jan 22, 2007 10:58 am    Post subject: Reply with quote

The emerge --config creates by default b0rked databases that don't support utf8. I know it's not yet supported, but the 8.2 ebuild doesn't have an emerge --config at all.
Back to top
View user's profile Send private message
Frelon
Tux's lil' helper
Tux's lil' helper


Joined: 10 Oct 2004
Posts: 149
Location: France

PostPosted: Sat Feb 17, 2007 9:28 am    Post subject: Reply with quote

Hi,
I have also the error when trying to create a db (sorry for french output) :


Code:

stan@hermes ~/Bommings/bommings-dev $ createdb -U postgres -W test
Mot de passe :
createdb: échec lors de la connexion à la base de données postgres: FATAL:  n'a pas pu ouvrir le fichier «global/pg_database» : Aucun fichier ou répertoire de ce type


I followed the howto, change postgres user passwd etc.

Thx !

EDIT : I fixed that in killing -9 the postgres process rather than /etc/init.d/postgresql restart which restart nothing !!!
_________________
http://stan.openmod.org
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Mon Feb 26, 2007 11:10 pm    Post subject: Reply with quote

GoofballJM1 wrote:
Although it's not as severe as with MySQL, but an upgrade guide for Postgres would be very helpful. Having information regarding that will save many of us novice Postgres users a little time from scrounging through the forums and on google. :wink:


heh. Obviously you've never tried to update from Postgres 7.2 to 7.4. Or from 7.4 to 8.0. Bloody nightmare if you've got databases of any complexity. On top of all that Postgres can not replicate between different versions so database updates of Postgres always require extensive downtime rather than the Mysql way of updating a slave and then promoting it to master. Some downtime is required, but you're not waiting for 40 minute imports of your database dumps to finish.

I'd say there definitely needs to be a Postgres update guide even though things have been relatively calm in the 8.0+ versions.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sun Mar 11, 2007 2:23 am    Post subject: Reply with quote

Maybe somebody can help me here.
After upgrading several perl scripts yesterda, when I try to log-in to sql-ledger I get an error:
apache log:
Code:
/usr/local/sql-ledger/login.pl: symbol lookup error: /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/DBD/Pg/Pg.so: undefined symbol: PQserverVersion
[client 127.0.0.1] Premature end of script headers: login.pl

Can anybody point me in the right direction?
Back to top
View user's profile Send private message
Highlands
Guru
Guru


Joined: 22 Apr 2003
Posts: 366
Location: Sundsvall, Sweden

PostPosted: Mon Mar 26, 2007 2:07 pm    Post subject: Reply with quote

how about adding a guide on doing backup and/or doing a upgrade?
_________________
If Windows is the answer, you don't understand the question!
http://counter.li.org/cgi-bin/certificate.cgi/339446
Back to top
View user's profile Send private message
lomom
n00b
n00b


Joined: 27 Mar 2007
Posts: 3
Location: dfasfda

PostPosted: Tue Mar 27, 2007 2:12 pm    Post subject: Reply with quote

wow nice !
Back to top
View user's profile Send private message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 208
Location: Saint-Petersburg, Russia

PostPosted: Fri May 04, 2007 10:58 am    Post subject: Reply with quote

After updating to postgresql-8.2.4-r1 I try to do
Code:

createdb -U postgres -W test

and receive the same error
Quote:

createdb: could not connect to database postgres: FATAL: could not open file "global/pg_database"

Thanks for attention in advance.
_________________
Best regards,
Yuriy Rusinov.
Back to top
View user's profile Send private message
mudrii
l33t
l33t


Joined: 26 Jun 2003
Posts: 789
Location: Singapore

PostPosted: Fri May 04, 2007 3:03 pm    Post subject: Reply with quote

Big thank for Postgresql documentation I rely needed
_________________
www.gentoo.ro
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum