Thread: PGSQL on shared hosting

PGSQL on shared hosting

From
Erick Papadakis
Date:
hello,

i am a newbie to the pgsql world, so pls bear with a possibly stupid
question. i want to test out pgsql but i only have a shared hosting
account. is it possible to install pgsql without root access, only for my
account? my webhost uses redhat i think.

thanks!
.ep

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Re: PGSQL on shared hosting

From
Francois Suter
Date:
> i am a newbie to the pgsql world, so pls bear with a possibly stupid
> question. i want to test out pgsql but i only have a shared hosting
> account. is it possible to install pgsql without root access, only for
> my
> account? my webhost uses redhat i think.

No. The "make install" step requires a root access.

Your best chance is to find a shared hosting which offers PostgreSQL
rather than MySQL. There are some. Not many, but some...

Good luck.

---------------
Francois

Home page: http://www.monpetitcoin.com/

"Would Descartes have programmed in Pascal?" - Umberto Eco


Re: PGSQL on shared hosting

From
Unihost Web Hosting
Date:
Hiya,

Without wanting to get flamed for gratuitous advertising, my company
offers shared hosting with PostgreSQL 7.4.  I'll leave it at that.

Apologies in advance to anyone I've offended.

Regards

Tony.

Francois Suter wrote:

>> i am a newbie to the pgsql world, so pls bear with a possibly stupid
>> question. i want to test out pgsql but i only have a shared hosting
>> account. is it possible to install pgsql without root access, only
>> for my
>> account? my webhost uses redhat i think.
>
>
> No. The "make install" step requires a root access.
>
> Your best chance is to find a shared hosting which offers PostgreSQL
> rather than MySQL. There are some. Not many, but some...
>
> Good luck.
>
> ---------------
> Francois
>
> Home page: http://www.monpetitcoin.com/
>
> "Would Descartes have programmed in Pascal?" - Umberto Eco
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


Re: PGSQL on shared hosting

From
rob
Date:
> Without wanting to get flamed for gratuitous advertising, my company
> offers shared hosting with PostgreSQL 7.4.  I'll leave it at that.

Just to make it fair I'll say ditto, then ;)
>> No. The "make install" step requires a root access.

That's not true, so long as your ./configure --prefix has been set to a
user writeable directory.

The only other issue is which PORT you run it on, and this depends on
the implementation of shared hosting your provider supplies.

As IIRC the port number influences shared memory segement use and you
don't want to clash with another instance on the shared server.

Something you don't have to worry about if your provider uses the
context patch, *ahem*.

Cheers,

--
Rob Fielding
rob@dsvr.net


Re: PGSQL on shared hosting

From
Holger Klawitter
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Friday 21 November 2003 09:49 schrieben Sie:
> > i am a newbie to the pgsql world, so pls bear with a possibly stupid
> > question. i want to test out pgsql but i only have a shared hosting
> > account. is it possible to install pgsql without root access, only for
> > my
> > account? my webhost uses redhat i think.
>
> No. The "make install" step requires a root access.

Wrong! If you install into a writeable directory e.g.
  ./configure --prefix=/home/user/postgres
make install will work just fine (or at least it did with me).

The only problem is that you cannot start postgres automatially that easily at
boot time.

Mit freundlichem Gruß / With kind regards
    Holger Klawitter
- --
info@klawitter.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/vd2z1Xdt0HKSwgYRAjF8AJ96e80dD2gNkvXHvJxLZgpNZzCAuwCgkpnx
Dl4Ik0s7s69ElW5ed/qILEM=
=oSjQ
-----END PGP SIGNATURE-----


Re: PGSQL on shared hosting

From
Tom Lane
Date:
Holger Klawitter <lists@klawitter.de> writes:
>> No. The "make install" step requires a root access.

> Wrong! If you install into a writeable directory e.g.
>   ./configure --prefix=/home/user/postgres
> make install will work just fine (or at least it did with me).

> The only problem is that you cannot start postgres automatially that
> easily at boot time.

Correct.  AFAIK, you have to be root to set up any init-script action.

You can easily build, install, and run PG in a personal directory
(I do that all the time for testing purposes) but you couldn't really
use it as a full-time server because it'd need to be manually restarted
after any system reboot.

            regards, tom lane

Re: PGSQL on shared hosting

From
Robert Treat
Date:
On Fri, 2003-11-21 at 04:41, Holger Klawitter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am Friday 21 November 2003 09:49 schrieben Sie:
> > > i am a newbie to the pgsql world, so pls bear with a possibly stupid
> > > question. i want to test out pgsql but i only have a shared hosting
> > > account. is it possible to install pgsql without root access, only for
> > > my
> > > account? my webhost uses redhat i think.
> >
> > No. The "make install" step requires a root access.
>
> Wrong! If you install into a writeable directory e.g.
>   ./configure --prefix=/home/user/postgres
> make install will work just fine (or at least it did with me).
>
> The only problem is that you cannot start postgres automatially that easily at
> boot time.
>

A bit hackey, but you could write a cronjob to check for postmaster.pid
every few minutes and start postmaster if it does not exist. (assumes
your provider gives you cron access along with those software compiling
privileges). this wouldnt give you an at boot time start, but at least a
shortly after boot time start. you'd need to make that script behave
properly after system crash too.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


Re: PGSQL on shared hosting

From
"Keith C. Perry"
Date:
Quoting Robert Treat <xzilla@users.sourceforge.net>:

> On Fri, 2003-11-21 at 04:41, Holger Klawitter wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Am Friday 21 November 2003 09:49 schrieben Sie:
> > > > i am a newbie to the pgsql world, so pls bear with a possibly stupid
> > > > question. i want to test out pgsql but i only have a shared hosting
> > > > account. is it possible to install pgsql without root access, only for
> > > > my
> > > > account? my webhost uses redhat i think.
> > >
> > > No. The "make install" step requires a root access.
> >
> > Wrong! If you install into a writeable directory e.g.
> >   ./configure --prefix=/home/user/postgres
> > make install will work just fine (or at least it did with me).
> >
> > The only problem is that you cannot start postgres automatially that easily
> at
> > boot time.
> >
>
> A bit hackey, but you could write a cronjob to check for postmaster.pid
> every few minutes and start postmaster if it does not exist. (assumes
> your provider gives you cron access along with those software compiling
> privileges). this wouldnt give you an at boot time start, but at least a
> shortly after boot time start. you'd need to make that script behave
> properly after system crash too.
>
> Robert Treat
> --
> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>

An even more basic question is what is the hosters policy on users running their
own servers.

I've got clients that do but only after they are granted permission to do so.
Having clients run they own servers as administratively not a good idea since
thing can very quick get our of control if you don't know what is running.
'Course these days you can tune your kernel and shell parameters to minimize
that.  Still, I would ask first to see if maybe they'll install it system-wide
first...

<shameless-plug>

As previously mentioned you could just go with an ISP that has already been
running PostgreSQL for some time.  I've notice quite a few service providers on
the list.  Some are probably listed on techdocs but I noticed my entry hasn't
shown up yet.

</shameless-plug>


--
Keith C. Perry, MS E.E.
Director of Networks & Applications
VCSN, Inc.
http://vcsn.com

____________________________________
This email account is being host by:
VCSN, Inc : http://vcsn.com

Re: PGSQL on shared hosting

From
Robert Treat
Date:
On Fri, 2003-11-21 at 11:20, Keith C. Perry wrote:
> <shameless-plug>
>
> As previously mentioned you could just go with an ISP that has already been
> running PostgreSQL for some time.  I've notice quite a few service providers on
> the list.  Some are probably listed on techdocs but I noticed my entry hasn't
> shown up yet.
>
> </shameless-plug>
>

<raised eyebrow>
where/when did you send in your update? given that there are several
people dedicated to deprecating the current implementation i know that
maintenance has been slacking, but occasionally I update this
information when I get a chance. Can you send your info to
webmaster@postgresql.org?

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


Re: PGSQL on shared hosting

From
"Keith C. Perry"
Date:
Quoting Robert Treat <xzilla@users.sourceforge.net>:

> On Fri, 2003-11-21 at 11:20, Keith C. Perry wrote:
> > <shameless-plug>
> >
> > As previously mentioned you could just go with an ISP that has already
> been
> > running PostgreSQL for some time.  I've notice quite a few service
> providers on
> > the list.  Some are probably listed on techdocs but I noticed my entry
> hasn't
> > shown up yet.
> >
> > </shameless-plug>
> >
>
> <raised eyebrow>
> where/when did you send in your update? given that there are several
> people dedicated to deprecating the current implementation i know that
> maintenance has been slacking, but occasionally I update this
> information when I get a chance. Can you send your info to
> webmaster@postgresql.org?
>
> Robert Treat
> --
> Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

Robert,

I think it was about a month ago but I don't remember.  I'll forward you the
original email.

--
Keith C. Perry, MS E.E.
Director of Networks & Applications
VCSN, Inc.
http://vcsn.com

____________________________________
This email account is being host by:
VCSN, Inc : http://vcsn.com

Re: PGSQL on shared hosting

From
Martijn van Oosterhout
Date:
On Fri, Nov 21, 2003 at 10:16:56AM -0500, Tom Lane wrote:
> Correct.  AFAIK, you have to be root to set up any init-script action.
>
> You can easily build, install, and run PG in a personal directory
> (I do that all the time for testing purposes) but you couldn't really
> use it as a full-time server because it'd need to be manually restarted
> after any system reboot.

For the record, at least linux cron has an @reboot tag, defined as:

@reboot        Run once, at startup.

Which should be what you want for an init script.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

Attachment

Re: PGSQL on shared hosting

From
Erick Papadakis
Date:
Thanks Tom. I don't mind having to start it again and again at server
reboots, as I only intend to use it for testing for now.

So how can I execute it inside my own folder? Do I need to give any
special commands? Is there any FAQ for this?

Thanks,
Erick



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Re: PGSQL on shared hosting

From
Tom Lane
Date:
Erick Papadakis <erick_papadakis@yahoo.com> writes:
> So how can I execute it inside my own folder? Do I need to give any
> special commands? Is there any FAQ for this?

I think the other respondents already gave you the needed clues:
configure with --prefix set to someplace in your own directory tree,
and select a PGDATA directory under your own tree as well.

I'm also in the habit of selecting a default port that's not standard
(not 5432), so that there won't be a port conflict if the machine's
owner someday decides to install PG as standard.

In short, something like

./configure --with-pgport=5434 --prefix=/home/tgl/version74

(plus any other configure options you like) and then

export PGDATA=/home/tgl/version74/data

before running initdb or starting the postmaster.

If you do it exactly as above then you'll also need to add
/home/tgl/version74/bin to your PATH so that you can invoke psql and
other utilities conveniently.  I think you can also fool with
configure's more-detailed prefix options if you have an existing
personal bin directory that you'd rather put psql into.

            regards, tom lane

Re: PGSQL on shared hosting

From
Andrew Sullivan
Date:
On Fri, Nov 21, 2003 at 12:30:32AM -0800, Erick Papadakis wrote:
> hello,
>
> i am a newbie to the pgsql world, so pls bear with a possibly stupid
> question. i want to test out pgsql but i only have a shared hosting
> account. is it possible to install pgsql without root access, only for my
> account? my webhost uses redhat i think.

Yes.  We do it all the time.  You'll need to configure with --prefix
set to something you have write access to.  You may need your
provider to install a symlink to init scripts for you if you want
automatic start up, and you may need to have your provider make some
kernel setting changes, but that's about it.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Afilias Canada                        Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110