Thread: mac ports question

mac ports question

From
Tom Allison
Date:
I ran into a problem today where somewhere my port of postgresql82 just
stopped working.  I'm largely an idiot on Mac because I use is as a
workstation/development box and do most of the real system related work
on my debian boxes.

But I don't know how to get the port working again.

Then I saw there is a new version 8.3 in port.

So, if I upgrade does anyone know if this cleanly removes version 8.2
from the box so I don't have to start carrying multiple versions?

I don't really need to upgrade, but I figured it would be an easy way to
get my database running again and get me back up to current toys.  Of
course, upgrades don't often work out that well...

Re: mac ports question

From
Stephan Szabo
Date:
On Sat, 5 Apr 2008, Tom Allison wrote:

> I ran into a problem today where somewhere my port of postgresql82 just
> stopped working.  I'm largely an idiot on Mac because I use is as a
> workstation/development box and do most of the real system related work
> on my debian boxes.
>
> But I don't know how to get the port working again.
>
> Then I saw there is a new version 8.3 in port.
>
> So, if I upgrade does anyone know if this cleanly removes version 8.2
> from the box so I don't have to start carrying multiple versions?

It won't remove 8.2 automatically. You'd have to ask port to deactivate
and uninstall it. Unfortunately, you may find it complains about
dependencies when you do that.

Are you using the server as well, or just the client components? If the
server, AFAIK it also won't try to do any database migration, which
probably isn't a huge problem on a dev system, but could be.

Re: mac ports question

From
Tom Allison
Date:
If it doesn't remove the 8.2 then I guess I can migrate it.
But that requires that I still need to get 8.2 running.


Right now it complains that it can't find a listening socket at /tmp/...
(localhost mode).  And I can't find the configuration files in this set-up.

I do have this running:
/opt/local/bin/daemondo --label=postgresql82-server --start-cmd
/opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper
start ; --stop-c

But that doesn't actually mean anything to me other that I guess it's
trying to start.  And it's stuck somewhere.

And no logs.
And no config file to make the logs hyper verbose.

This stinks.  I can find all this stuff on my Debian boxes, but on this
mac -- have no clue where things live.

Stephan Szabo wrote:
> On Sat, 5 Apr 2008, Tom Allison wrote:
>
>> I ran into a problem today where somewhere my port of postgresql82 just
>> stopped working.  I'm largely an idiot on Mac because I use is as a
>> workstation/development box and do most of the real system related work
>> on my debian boxes.
>>
>> But I don't know how to get the port working again.
>>
>> Then I saw there is a new version 8.3 in port.
>>
>> So, if I upgrade does anyone know if this cleanly removes version 8.2
>> from the box so I don't have to start carrying multiple versions?
>
> It won't remove 8.2 automatically. You'd have to ask port to deactivate
> and uninstall it. Unfortunately, you may find it complains about
> dependencies when you do that.
>
> Are you using the server as well, or just the client components? If the
> server, AFAIK it also won't try to do any database migration, which
> probably isn't a huge problem on a dev system, but could be.


Re: mac ports question

From
Stephan Szabo
Date:
On Sat, 5 Apr 2008, Tom Allison wrote:

> If it doesn't remove the 8.2 then I guess I can migrate it.
> But that requires that I still need to get 8.2 running.
>
>
> Right now it complains that it can't find a listening socket at /tmp/...
> (localhost mode).  And I can't find the configuration files in this set-up.
>
> I do have this running:
> /opt/local/bin/daemondo --label=postgresql82-server --start-cmd
> /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper
> start ; --stop-c
>
> But that doesn't actually mean anything to me other that I guess it's
> trying to start.  And it's stuck somewhere.
> And no logs.

I believe if it's getting far enough to actually try running PostgreSQL
the logs would be being put somewhere like /opt/local/var/log/postgresql82
(or at least the 83 port seems to put it in a postgresql83 from there)

Re: mac ports question

From
Shane Ambler
Date:
Stephan Szabo wrote:
> On Sat, 5 Apr 2008, Tom Allison wrote:
>
>> If it doesn't remove the 8.2 then I guess I can migrate it.
>> But that requires that I still need to get 8.2 running.
>>
>>
>> Right now it complains that it can't find a listening socket at /tmp/...
>> (localhost mode).  And I can't find the configuration files in this set-up.
>>
>> I do have this running:
>> /opt/local/bin/daemondo --label=postgresql82-server --start-cmd
>> /opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper
>> start ; --stop-c
>>
>> But that doesn't actually mean anything to me other that I guess it's
>> trying to start.  And it's stuck somewhere.
>> And no logs.

/opt/local/etc/LaunchDaemons/org.macports.postgresql82-server/postgresql82-server.wrapper
should be your startup script (as in Apple's replacement for rc scripts)
and should contain your settings (as in datadir) if not a config file in
the dir with it or in /etc/rc.conf (I'm don't use macports so I'm not
sure how it config's)

If not search for a file called postgresql.conf or PG_VERSION you should
find several copies of PG_VERSION, one at the top of your data dir where
you will also find your postgresql.conf and the log files or log dir
with the log files depending on your conig. The other PG_VERSION files
will be inside each folder that has your table data.

Permission settings will mean that root (or the pg user) will be the
only ones able to see these files so you may need to find as root from
the terminal.


> I believe if it's getting far enough to actually try running PostgreSQL
> the logs would be being put somewhere like /opt/local/var/log/postgresql82
> (or at least the 83 port seems to put it in a postgresql83 from there)
>


--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz