Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009

    Unanswered: Postgresql missing core directories

    Hello all,

    I've got a problem with my PostgreSQL install. First, let me re-cap my previous status:
    I was originally running PostgreSQL8.3 on Ubuntu 9.04. Everything was working perfectly fine. I upgraded to Ubuntu 9.10 and it pretty much killed my PostgreSQL server.
    After the initial upgrade of the OS, the postgres package installed fine, but for some reason would not accept any of my settings as far as the user accounts go. In short, it wouldn't allow me to connect to the db as any user whatsoever. Yes I have a postgres user. Remember my 8.3 version was running perfectly fine for months.
    I even went as far as copying my config files from my 8.3 version to my 8.4 version and it still wouldn't work. So I figured I'd just un-install and re-install to see if that would help at all. After I re-installed the package (using Ubuntu's Synaptic Package Manager), it still installed improperly even worse this time.
    The installation did not create any directories in the /etc/postgresql directory. In fact, /etc/postgresql doesn't even exist. Also, there is no startup script in the /etc/init.d directory neither, so I cannot even start it if I wanted to at this point.

    I've attempted several times to re-install this package to ensure it wasn't just messing up randomly, but it just plain doesn't work properly compared to the 8.3 version.

    I do have other directories that it created however...
    but other than that, there is nothing else regarding the package.

    I'm at a complete loss here. I cannot figure out why the installation is different that what it was previously nor can I determine why it's missing its core directories in the /etc directory.

    Has anybody had anything like this before? Or have any idea what I can do to rectify this?
    Any help is greatly appreciated.


  2. #2
    Join Date
    Aug 2009
    Olympia, WA
    Ok, sounds like you've been moving files around, so lets start with doing a "complete removal" then reinstall.

    Ubuntu puts the config files in different directories (/etc/postgres/8.4 and /etc/postgres/8.3) so your settings from 8.3 would not apply. Same goes for data directories. But you can't just take the data directories from 8.3 and tell 8.4 to use them. Hopefully you still have 8.3 installed? Because you'll need to do a dump from 8.3 and restore into 8.4.

  3. #3
    Join Date
    Jun 2004
    Arizona, USA
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

  4. #4
    Join Date
    Nov 2009
    Well, I guess I didn't explain it 100% in my first post. I didn't 'move' the files from 8.3->8.4 I simply copied the configs and used them as reference (i.e. config file for user permissions, etcc) I just used my previous settings by comparing the old 8.3 files to the new 8.4 files and found what I had changed previously in 8.3 to get access for users to the DB.

    As for a Dump/Restore... I didn't get that far because as I said, when I first un-installed 8.3 & 8.4 then re-installed them, they were not installing properly with the Synaptic Package Manger in Ubuntu therefore they wouldn't do a complete un-install either. There was something weird about the way it was handling the removal of the old and the fresh install.

    At any rate, I've figured it out just before going to bed last night.
    Because I was having problems with the Package Manager not removing all the information properly I tried using:
    sudo aptitude purge postgresql-8.4
    this went through the removal, but again, it wouldn't remove everything so that when I attempted to re-install 8.4 only, it was still not installing correctly. It wouldn't create any directory in /etc nor any startup scripts in /etc/init.d
    So after banging my head against the wall I stumbled upon the following:
    sudo apt-get remove postgresql-8.4
    which is basically the same as using it in Synaptic Package Manager, however this way using CLI I'm able to actually see extra messages not shown by the Package Manager and it was totally borked. It was complaining of dependency issues and then said it was not configuring properly with dpkg because of broken dependencies. Which is odd because Synaptic takes care of all dependencies when you install a package.
    At any rate, after that I tried this:
    sudo apt-get --purge postgresql-8.4*
    and then it removed all broken dependencies and all of the postgres packages.
    After that I ran:
    apt-get install postgresql-8.4
    and viola! Now it appears to be working just fine. ALL of the core directories have been created including the /etc/postgresql/... and my startup script in /etc/init.d as well.
    Also, forgot to mention, I had to remove the postgres user prior to doing that last step because for some reason it just wouldn't work otherwise. I don't know if this is a glitch on my system or if the postgres user was somehow tied physically to the packages which caused improper auto-configs/installs/removals. I think it's quite odd that a system user would cause such a debacle especially since that user didn't have su rights.

    At any rate, thank you for the reply. I will read through the Dump procedure just to make sure it is embedded in my brain for future reference.

    Thanks for the replies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts