118ed postgresql - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old December 10th, 2008, 23:41
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default postgresql

I am interested in trying out postgresql.

What is the latest stable release version for a production server.

What is considered the best practice for setting it up with freebsd. The current howto's and quickstart guides online seem a bit dated.
Reply With Quote
  #2  
Old December 11th, 2008, 01:00
brd@'s Avatar
brd@ brd@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Denver, CO, USA
Posts: 277
Thanks: 0
Thanked 50 Times in 29 Posts
Default

I would go for the 8.3 branch. I have been running a few small PostgreSQL servers and haven't had any worries about running the newer code. I would just install from ports as normal and follow the docs for configuring it starting here: http://www.postgresql.org/docs/8.3/i...me-config.html
Reply With Quote
  #3  
Old December 11th, 2008, 20:30
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

I do get an error when running the command postgres. something about the -D option.

I also don't think the daemon is launching when I start it.

I get no output and nothing in ps or top

I am not on my machine right now. I will post the error when I'm on my bsd box later.

Last edited by danger@; October 2nd, 2009 at 11:30. Reason: delete spam from other user in the quote
Reply With Quote
  #4  
Old December 11th, 2008, 20:33
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

Quote:
Originally Posted by UNIXgod View Post
I don't know what this has to do with postgres
It's spam, either ignore it or report it. The mods will delete it eventually
Reply With Quote
  #5  
Old December 12th, 2008, 23:32
X-Istence X-Istence is offline
Junior Member
 
Join Date: Nov 2008
Location: ::1
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I wrote a guide a long time ago: http://www.bsdguides.org/guides/free...postgresql.php which helps install PostgreSQL with sane defaults.

Is this what you are looking for?

What are you planning on doing with an SQL database? It may be simpler and require less work on your part to take a look at MySQL instead. PostgreSQL has always required more tuning and is harder to learn right off the bat.
Reply With Quote
  #6  
Old December 19th, 2008, 07:54
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

Nice guide. I can't get the daemon to start. I get no output when running:
Quote:
/usr/local/etc/rc.d/postgresql start
I have nothing in ps or top after the command is run as well.

I have used mysql over the years for various php cms's. I am starting to teach myself ruby on rails and wanted to experiment with postgres.
Reply With Quote
  #7  
Old December 19th, 2008, 18:38
jpaetzel@ jpaetzel@ is offline
FreeBSD Developer
 
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After adding postgresql_enable="YES" to /etc/rc.conf run /usr/local/etc/rc.d/postgresql initdb

You can the edit /usr/local/pgsql/data/pg_hba.conf and /usr/local/pgsql/data/postgresql.conf to taste, then run /usr/local/etc/rc.d/postgresql start
Reply With Quote
  #8  
Old December 19th, 2008, 18:39
brd@'s Avatar
brd@ brd@ is offline
FreeBSD Developer
 
Join Date: Oct 2007
Location: Denver, CO, USA
Posts: 277
Thanks: 0
Thanked 50 Times in 29 Posts
Default

Did you enable it in /etc/rc.conf? Did you look at the log?
Reply With Quote
  #9  
Old December 20th, 2008, 02:34
sim's Avatar
sim sim is offline
Member
 
Join Date: Nov 2008
Location: The Spacetime Continuum
Posts: 154
Thanks: 34
Thanked 5 Times in 3 Posts
Default

Quote:
Originally Posted by X-Istence View Post
What are you planning on doing with an SQL database? It may be simpler and require less work on your part to take a look at MySQL instead. PostgreSQL has always required more tuning and is harder to learn right off the bat.
It's true that Postgres installation can be troublesome on occasions. BUT... stick with it! In my experience the few hours you might spend getting it working properly will *easily* pay back many times over once it's running, compared to MySQL. I've never understood the argument that MySQL is just "so easy". Yes installation is simple, but I've wasted so much time fighting its poor SQL compliance and use-free syntax error messages. On top of that, if your DB needs are advanced, then you'll find that Postgres will let you easily accomplish things that MySQL simply can't.

I didn't mean this to turn into a religous battle, I just don't want you to give up at step 1!

My brain is fried right now but if you're still having trouble let me know.

/sim
Reply With Quote
  #10  
Old December 20th, 2008, 02:39
sim's Avatar
sim sim is offline
Member
 
Join Date: Nov 2008
Location: The Spacetime Continuum
Posts: 154
Thanks: 34
Thanked 5 Times in 3 Posts
Default

Oh, and in answer to your question, and as everyone has said, 8.3[.5] is the one to go for right now. You can be very confident that each Release is stable and of a very high quality. I've been running all the latest releases since 8.0.0 in production, with never a problem. The PostgreSQL release process has a very good reputation, being based on code quality instead of release schedules and marketing. In that way it very much reminds me of FreeBSD...

/sim
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you think to use PostgreSQL in the FreeBSD? linux-fox Web & Network Services 11 December 16th, 2008 20:48
Postgresql starts message Markand Web & Network Services 2 December 9th, 2008 12:37
postgresql-client-8.3.3 build error Ghirai Installation and Maintenance of FreeBSD Ports or Packages 15 November 30th, 2008 18:59


All times are GMT +1. The time now is 20:03.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0