PostgreSQL Issues

Post Reply
NassauBoy
Posts: 39
Joined: 24 Jan 16 19:20

PostgreSQL Issues

Post by NassauBoy » 01 Feb 16 0:27

I have been testing out the server and single user version of the program for a few days to determine which route I wish to take.

During this time have encountered several issues with PostgreSQL itself on OSX. Granted this is after messing about quite a bit. Here is what I have done and then position I have put myself in at this point. As all of this is testing, there is nothing disastrous, except me wanting to get a good feel for PostgreSQL and right now Im not feeling the love. I have 30 years experience in development in the PC world and some Oracle and mainly MSSql servers so I admit a lot of this could be my ignorance of PstgreSQL.

First:
I ran the postgresql install, let it setup all on my locally on my internal SSD OS X boot drive (program and data folders). I then installed PSu and created a db for PSu. I then followed the instructions for configuring PostgreSql from PSu web site. I rebooted, and all was working great. I imported, played and was happy.

I then decided that I wanted to go back to the single user version of PSu.

Second:
So I used the PostgreSQL uninstall program, and then when it was done, I deleted the Data area also of PostgreSQL. I then ran the single user version of PSu, played with it. All was good.

I then decided that I wanted to retry the PostgreSQL version again with a larger load of images. So I installed the PostgreSQL again as before, configured, and then installed the PSu Server version. This time though I opted to have the DATA on my external thunderbolt Promise Raid system. This would be where everything would really be if I chose to go the server version. This drive is attached to the iMac. After this I installed the server version of PSu, and played and all was good. (2 differences this time. One the DATA was not in the default area and second I did not need to reboot after the PostgreSQL install) That said all was great.

The Issue

So I now decided its time to reboot the iMac. Right after this it seems PostgreSQL will not start up. I get the can't connect to PostgreSQL. Basically all research indicates the PostgreSQL server is not running, and thus nothing can connect. Its the constant message asking if localhost is configured or listening to 127.0.0.1 or the right port configured. When I look at the .confg files they are fine.

So I have uninstalled PostgreSql, and tried to re-install again, and point to the DATA folder, but this did not help.

I have now uninstalled PostgreSQL, and deleted the DATA folder ... and gone back to the single user version.


I would still like to give the PostgreSQL version a good run. Im going to try another install and let the DATA also install in the default folder, just to see what happens.

Am I missing something incredibly obvious here?

Any help appreciated.
Late 2012 27" iMac 3.4Ghz i7: 32GB Ram: Internal SSD: External Promise R4 Thunderbolt 16TB Raid 5 (all Data)

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: PostgreSQL Issues

Post by acertain » 01 Feb 16 16:26

If the server is really not running (did you try running a ps from the shell to verify?), then there are two possibilities: it never tried to start or it died during startup. For the first, are you sure that it's configured to start on boot? It has been a long time since I've done much with OSX, so I don't remember where that is configured. For the second, if it's dying during startup there should be some log messages. Again, I'm not sure where they are in OSX (here is the first Google result: http://stackoverflow.com/questions/2563 ... n-mac-os-x).

Andrew

NassauBoy
Posts: 39
Joined: 24 Jan 16 19:20

Re: PostgreSQL Issues

Post by NassauBoy » 02 Feb 16 2:33

Yep used ps to verify not running.

Im not sure if its set to startup on boot or not. I would say it was at one point. Not sure if it changed at some point.

I looked at the logs but was not really sure what I was looking for other than failed to start, then try to spend time determining why. If I did not find it trying to start at all then maybe thats the issue.

I was trying to find a quick and dirty way to start it from the terminal or something and Im sure could eventually figure it out, but just started taking some much time ... and .... the original goal was to test out PSu LOL.

Im on the stand alone for now. Going to see how that works out for now .... unless someone posts some great words of wisdom, that include a one step way to make the server run lol.
Late 2012 27" iMac 3.4Ghz i7: 32GB Ram: Internal SSD: External Promise R4 Thunderbolt 16TB Raid 5 (all Data)

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: PostgreSQL Issues

Post by acertain » 02 Feb 16 18:14

Presumably you already googled around, but, if not, here's some info: http://stackoverflow.com/questions/7975 ... n-mac-os-x

Andrew

HCS
Posts: 153
Joined: 19 Feb 14 22:08

Re: PostgreSQL Issues

Post by HCS » 02 Feb 16 21:23

I don't know what went wrong, but i know that when you manipulate the settings files for the postgres server, you need to use the included examples. I've had problems with typing in TextEdit, the server wouldn't recognize the characters, for example quotes. Drove me crazy.

May have nothing to do with your issues, but something to keep in mind.

By the way, it's totally fine to start out in the single user version and build up your catalog and later convert to the server version (there is a script).

NassauBoy
Posts: 39
Joined: 24 Jan 16 19:20

Re: PostgreSQL Issues

Post by NassauBoy » 03 Feb 16 2:55

Acetain and HCS,

Yep I spent far too long googling the possibilities.

For my satisfaction Im going to install PostgreSQL again and say make the DATA area on the default. I just have to K N O W what is happening. Its a bit of fun also, frustrating, but I want to understand whats happened.

In the google searches I also found a Postgre APP that apparently smooths out some of the process. Going to give it a whirl also.

I saw the script that will let me move from single to the server mode so I don't feel locked in ... just would have rather started the way I want to run in the longer term.

I will have about 80K+ photos to start so we will see how well the single user version holds up.
Late 2012 27" iMac 3.4Ghz i7: 32GB Ram: Internal SSD: External Promise R4 Thunderbolt 16TB Raid 5 (all Data)

NassauBoy
Posts: 39
Joined: 24 Jan 16 19:20

Re: PostgreSQL Issues

Post by NassauBoy » 03 Feb 16 6:13

Just wanted to post a followup.

POSTGRES.APP (A God Send) http://postgresapp.com

Love this app. Basically D/L it, install it and your Postgres is ready to go. I have experimented moving the DATA file around, restarting the OSX and just about every other iteration I can think of. I have tested with pgAdmin III and all seems to work very nicely.

By far the best way to install and run Postgres. Nice part is there is a icon in the menu bar. You can just exit Postgres when you not using it, or dbl-click the app to turn the server on. Love it.

Going to experiment a bit with this for a few days to see if still happy.
Late 2012 27" iMac 3.4Ghz i7: 32GB Ram: Internal SSD: External Promise R4 Thunderbolt 16TB Raid 5 (all Data)

HCS
Posts: 153
Joined: 19 Feb 14 22:08

Re: PostgreSQL Issues

Post by HCS » 03 Feb 16 16:52

NassauBoy wrote:Just wanted to post a followup.

POSTGRES.APP (A God Send) http://postgresapp.com

Love this app. Basically D/L it, install it and your Postgres is ready to go. I have experimented moving the DATA file around, restarting the OSX and just about every other iteration I can think of. I have tested with pgAdmin III and all seems to work very nicely.

By far the best way to install and run Postgres. Nice part is there is a icon in the menu bar. You can just exit Postgres when you not using it, or dbl-click the app to turn the server on. Love it.

Going to experiment a bit with this for a few days to see if still happy.
I am using postgres app as well. Works a treat for me.

I'm interested in moving DATA to another drive, so if you have a recipe or pointers to a web site that explains it, i'd appreciate it. Thanks

NassauBoy
Posts: 39
Joined: 24 Jan 16 19:20

Re: PostgreSQL Issues

Post by NassauBoy » 04 Feb 16 2:59

I am using postgres app as well. Works a treat for me.

I'm interested in moving DATA to another drive, so if you have a recipe or pointers to a web site that explains it, i'd appreciate it. Thanks
Its SUPER EASY. I Did this test also because I wanted to try out all the things that might screw me later, but do them NOW. LOL

1. Basically Look at the Elephant in your menu bar.
2. Click on it and choose preferences.
3. Take note of the data directory (If its in Library then in Finder, go to the menu item GO, hold down the Option Key and you will see the Library Folder)
4. Right Click and select COPY on the var-9.5 Directory (or whatever version you have)
5. Go to some folder on new drive, I went to new drive, created folder called Postgres, then PASTE the var-9.5 directory there.
6. Back in your Preferences (the one on the elephant drop down) click on the CHOOSE button and go select your NEW var-9.5 folder.
7. Stop the Postgre.app
8. restart it.


Your on the new drive.

Delete the old ver-9.5 folder when happy.

Gave up a few days of my life and 4 AM Mornings going to bed but, but, but I think Im happy now.

Im doing a FULL load to the Postgre Server Version now (80K+ Photos) and going to see how things preform. So far Im happy.
Late 2012 27" iMac 3.4Ghz i7: 32GB Ram: Internal SSD: External Promise R4 Thunderbolt 16TB Raid 5 (all Data)

Post Reply