Thread: Getting Started

Getting Started

From
"Adam I. Harris, M.D."
Date:
While I consider myself computer literate, I don't speak "server". I
have an XServe running Mac OS 10.3. The dual G4 machine has 2 Gig RAM
and 750 GIG hard drive. I'm using a PACS program that depends on
Postgresql to run my image database. For the life of me, I cannot get
postgresql to install and run properly. I get errors in the log that
access to certain files is denied on the basis of permissions, while I
cannot find the files in question to grant access (yes, I do know how
to look for invisible files).

I really could use some assistance getting the system started. I also
will need a clickable icons and two programs to start and stop the db
with auto start on reboot.

I've been trying to install 7.4.3. Is version 8 ready for prime time?

Any and all help is greatly appreciated.

Adam I. Harris, M.D.

San Antonio Orthopaedic Specialists
Specializing in Joint Replacement of the Hip, Knee, and Shoulder
First in South Texas to offer the Zimmer Minimally Invasive Total Hip
replacement and Minimally Invasive Total Knee replacement.


Re: Getting Started

From
"Joe Erickson"
Date:
This site is packed with information about running PostgreSQL on the Mac:
http://www.entropy.ch/software/macosx/postgresql/

On this page you will find a package installer for PostgreSQL (it looks like you already have it installed, but maybe
notcorrectly) and a startup item that can be used to start the server when the machine boots up. 

As far as making a double clickable app to start and stop the database, my suggestion would be to write a simple shell
scriptthat will do it (could be as easy as writing how you currently start it to a file called pgstop.sh) and then
usingPlatypus (http://sveinbjorn.vefsyn.is/platypus) to make it double clickable. 

As far as the errors you are having, it's really hard to tell unless we know how it was installed.  It could be how you
arestarting the application, how it was installed, a user setting problem, etc.  If you could send the log, it might be
morehelpful.  If you use the package installer from above and follow all of the directions, you should be ok. 

--------

Joseph Erickson



-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Adam I. Harris,
M.D.
Sent: Friday, October 15, 2004 7:07 AM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Getting Started


While I consider myself computer literate, I don't speak "server". I
have an XServe running Mac OS 10.3. The dual G4 machine has 2 Gig RAM
and 750 GIG hard drive. I'm using a PACS program that depends on
Postgresql to run my image database. For the life of me, I cannot get
postgresql to install and run properly. I get errors in the log that
access to certain files is denied on the basis of permissions, while I
cannot find the files in question to grant access (yes, I do know how
to look for invisible files).

I really could use some assistance getting the system started. I also
will need a clickable icons and two programs to start and stop the db
with auto start on reboot.

I've been trying to install 7.4.3. Is version 8 ready for prime time?

Any and all help is greatly appreciated.

Adam I. Harris, M.D.

San Antonio Orthopaedic Specialists
Specializing in Joint Replacement of the Hip, Knee, and Shoulder
First in South Texas to offer the Zimmer Minimally Invasive Total Hip
replacement and Minimally Invasive Total Knee replacement.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Re: Getting Started

From
Chris Mair
Date:
> I really could use some assistance getting the system started. I also
> will need a clickable icons and two programs to start and stop the db
> with auto start on reboot.

Did you install the precompiled version linked from here:
http://www.apple.com/downloads/macosx/unix_open_source/postgresql.html

I've seen it was made for 10.2, while you're using 10.3. That might
be an issue.

Or did you compile the PostgreSQL sourcecode?
Then, have you checked out this link?
http://developer.apple.com/internet/opensource/postgres.html

Tell us more about what you did so far...

I don't think using 8.0 will resolve your problem, since it's
more of a packaging-for-your-OS-problem than a PostgreSQL problem...

Bye, Chris.




Re: Getting Started

From
Andreas
Date:
Adam I. Harris, M.D. wrote:

>  I have an XServe running Mac OS 10.3.

Ooops ... exotic   ;)

> The dual G4 machine has 2 Gig RAM and 750 GIG hard drive.

That's decent.
Ummm ... I doubt that the default config of PostgreSQL will use that
much memory even if it should.
As soon as your PG works you should find out how to tweak the memory
settings. Probaply you'll need to compile it yourself.

> I'm using a PACS program that depends on Postgresql to run my image
> database. For the life of me, I cannot get postgresql to install and
> run properly. I get errors in the log that access to certain files is
> denied on the basis of permissions, while I cannot find the files in
> question to grant access (yes, I do know how to look for invisible
> files).

Is it the PostgreSQL log or OS X's ?
What are the inaccessible files names ?

Generally one creates a special user for running the PostgreSQL server
process who is called "postgres" ... or whatever you like.
It must be a nonadministrative user.
This user "postgres" should own the data directory and probaply only he
should have access to it.
So if you created "/var/postgres/data" as user "adam" then run
PostgreSQL as user "postgres" the server might be not allowed to go into
the data directory at all therefore it can't acces stuff it expects to
find there. Or maybe it can read there but has no write-permission.

Did  you run "initdb" with the user "postgres" to prepare the content of
the data dir. before you tried to start the server the first time ?
Under Windows you actually need to logon as this user. It won't do to
just to use "run as" while beeing loged in as someone else.

Mind that the server won't start, if it figures it was allready running.
Look for stale process-id files e.g. "/tmp/postmaster.pid". Those access
right issues are pretty annoying. I had my fair share of them.

If you switched the starting user ("adam" --> "postgres") an write
permission issue might arise with PostgreSQL's log file.
Delete it so PostgreSQL can create a new one.

> I really could use some assistance getting the system started. I also
> will need a clickable icons and two programs to start and stop the db
> with auto start on reboot.

Those 2 programs are actually 1 and it comes with postgres.
Look in the readme. It should be   pg_ctl   or as in Linux and Windows
there might be ways to install PostgreSQL as a OS service. Services get
automatically started/stopped by the OS.

If you ran the   initdb  command succesfully it displayed 2 ways to
start the server manually. You can use both as command parameters of an
icon. Though those commands need to be run by the server process owner.
That's "postgres". OS X should have some "su -c 'blabla'" way to do this.
I use :
/usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data >logfile 2>&1 &

To stop postgres you can simply kill it with the process id in it's
pid-file:
kill -INT `sed -n 1p /usr/local/pgsql/data/postmaster.pid`
or use some magic with pg_ctl.

> I've been trying to install 7.4.3. Is version 8 ready for prime time?

What about the current stable 7.4.5 ?


hope it helped
Andreas

Re: Getting Started

From
Nikki
Date:
In article <1098088684.4383.22.camel@dell>, Chris Mair <list@1006.org>
wrote:

> > I really could use some assistance getting the system started. I also
> > will need a clickable icons and two programs to start and stop the db
> > with auto start on reboot.
>
> Did you install the precompiled version linked from here:
> http://www.apple.com/downloads/macosx/unix_open_source/postgresql.html
>
> I've seen it was made for 10.2, while you're using 10.3. That might
> be an issue.
>
> Or did you compile the PostgreSQL sourcecode?
> Then, have you checked out this link?
> http://developer.apple.com/internet/opensource/postgres.html
>
> Tell us more about what you did so far...
>
> I don't think using 8.0 will resolve your problem, since it's
> more of a packaging-for-your-OS-problem than a PostgreSQL problem...
>
> Bye, Chris.
>
>
I used this compiled version, and I'm running it on 10.3.5. No problems.

http://www.entropy.ch/software/macosx/postgresql/

Marc also has a package to launch on startup.  If you want a tool to
make icons you can click, look up Platypus

http://www.versiontracker.com/dyn/moreinfo/macosx/19870

Good Luck

Nikki