PostgreSQL on OS X

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

PostgreSQL on OS X

Postby paulewlnuts » Tue Dec 29, 2009 6:20 pm

Are there major differences between the windows and mac versions as to where the FAQ/tutorials for windows user wouldn't be helpful for those on OS X? I'm trying to figure out how to configure my data base a bit to help speed it up a bit but am lost looking through the FAQs/Tutorials on how to do so.

I'm in PGAdmin and can't find where it is I go to change up the configs as noted in the PostgreSQL wiki. Another thing I'm running into is this screen when connecting to my data base:

Database encoding
The database PT3 DB is created to store data using the SQL_ASCII encoding. This encoding is defined for 7 bit characters only; the meaning of characters with the 8th bit set (non-ASCII characters 127-255) is not defined. Consequently, it is not possible for the server to convert the data to other encodings.

If you're storing non-ASCII data in the database, you're strongly encouraged to use a proper database encoding representing your locale character set to take benefit from the automatic conversion to different client encodings when needed. If you store non-ASCII data in an SQL_ASCII database, you may encounter weird characters written to or read from the database, caused by code conversion problems. This may cause you a lot of headache when accessing the database using different client programs and drivers.
For most installations, Unicode (UTF8) encoding will provide the most flexible capabilities.
paulewlnuts
 
Posts: 20
Joined: Fri Dec 25, 2009 1:13 am

Re: PostgreSQL on OS X

Postby kraada » Tue Dec 29, 2009 11:18 pm

Most of the configurations should be identical. Exactly which ones were giving you trouble?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL on OS X

Postby paulewlnuts » Tue Dec 29, 2009 11:27 pm

kraada wrote:Most of the configurations should be identical. Exactly which ones were giving you trouble?


Actually, sorry if I wasn't clear, but the configurations themselves weren't the problem, accessing them were. I'm not sure where I'm able to edit settings such as "shared buffer", "effective cache size", "maximum connections", etc.

I read that it was in postgresqlconfig file but I'm not able to locate such a file on my system. I tried looking through PGAdmin as well but couldn't find anything.
paulewlnuts
 
Posts: 20
Joined: Fri Dec 25, 2009 1:13 am

Re: PostgreSQL on OS X

Postby kraada » Tue Dec 29, 2009 11:39 pm

The file you're looking for is postgresql.conf and I believe it's in /Library/PostgreSQL/8.4/data/
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL on OS X

Postby paulewlnuts » Wed Dec 30, 2009 12:43 am

I'm not allowed to access this folder even though I'm the administrative user.
paulewlnuts
 
Posts: 20
Joined: Fri Dec 25, 2009 1:13 am

Re: PostgreSQL on OS X

Postby kraada » Wed Dec 30, 2009 10:09 am

Open a terminal (it's in Utilities) and run this command:
sudo nano /etc/PostgreSQL/8.4/data/postgresql.conf
type in your user password and it should dump you into the nano text editor editing the file you want to edit. Once you've edited it to be what you want press ctrl+x and say yes to save changes. Then restart your PostgreSQL server normally and the changes should take effect.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PostgreSQL on OS X

Postby paulewlnuts » Wed Dec 30, 2009 3:14 pm

Thanks kraada, that worked. I would mention that increasing the amount of memory for shared buffers won't work (at least on my system) unless you first reconfigure your kernel's settings. The wiki does a pretty good job at walking you through what specific settings one might want to tweak a bit.

The obvious concern for me is my 5500 rpm sata drive. Need to get a 7500 soon, just bought a new NEC display though, so the bankroll can't take another dent just yet... :|
paulewlnuts
 
Posts: 20
Joined: Fri Dec 25, 2009 1:13 am

Re: PostgreSQL on OS X

Postby kraada » Wed Dec 30, 2009 3:32 pm

We've been discussing working out a more standard set of tunings for OS X given that most Macs come with (relatively) crappy hard drives. I don't know when we'd roll out such things but I'm hoping we can get that done sooner rather than later.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 36 guests

cron
highfalutin