Re: Starting PostgreSQL from a windows application

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Starting PostgreSQL from a windows application
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA35545@algol.sollentuna.se
обсуждение исходный текст
Ответ на Starting PostgreSQL from a windows application  (Hovik Avedian <havedian@ebasetech.com>)
Список pgsql-admin
> I have installed Postures on a Windows server and it starts as a
> service and all is OK.
>
> I have 2 questions:
>
> 1. I need to be able to wrap PostgreSQL as part of my application
> and, therefore, start it as part of my app. start-up. I know that
> pg_ctl start is the command, but as your documentation clearly
> states, PostgreSQL can only be started by a non-privileged user.
> Here lies my problem.
> Most software needs a privileged user to start it. So how can I
> start PostgreSQL as a different user from the one which needs to be
> logged in to start the other software?

This will be fixed in 8.2 (it's fixed in the development snapshots). You
can find backported versions of initdb and pg_ctl on
http://people.planetpostgresql.org/mha/index.php?/archives/93-Backported
-run-as-admin-tools.html.

I would not recommend these for a big production deployment, because
they are *not* official PostgreSQL binaries (the database backend still
is, though, so it *should* be safe. But they have not been as well
tested as postgresql-proper). But for a pilot install that will go to
8.2, definitely worth using.


> 2. How do I give my users a totally new database. Is backup/restore
> the only mechanism?
> Can I copy (parts of) the data directory, from one installation of
> PostgreSQL to another?

Backup/restore, or you can create a manual sql script that you pass to
psql that generates all your objects.


//Magnus


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Problem in starting PGSQL8.1 service.
Следующее
От: Erika Terahata Torres Prada e Silva - MPS
Дата:
Сообщение: RES: Issue on Varchar Ordering