# postgresql



## UNIXgod (Dec 10, 2008)

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.


----------



## brd@ (Dec 11, 2008)

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/interactive/runtime-config.html


----------



## aliangshisb81743 (Dec 11, 2008)

*aoc*

is aoc power leveling and age of conan power leveling the same mean??


----------



## UNIXgod (Dec 11, 2008)

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.


----------



## SirDice (Dec 11, 2008)

UNIXgod said:
			
		

> 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 :e


----------



## X-Istence (Dec 12, 2008)

I wrote a guide a long time ago: http://www.bsdguides.org/guides/freebsd/databases/install_secure_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.


----------



## UNIXgod (Dec 19, 2008)

Nice guide. I can't get the daemon to start. I get no output when running:


> /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.


----------



## jpaetzel@ (Dec 19, 2008)

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


----------



## brd@ (Dec 19, 2008)

Did you enable it in /etc/rc.conf? Did you look at the log?


----------



## sim (Dec 20, 2008)

X-Istence said:
			
		

> 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! :e

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

/sim


----------



## sim (Dec 20, 2008)

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


----------

