Loading Postgres server at bootup on Linux and shutting down.

Поиск
Список
Период
Сортировка
От Matthew Stanfield
Тема Loading Postgres server at bootup on Linux and shutting down.
Дата
Msg-id 3CD28736.E6711CEF@propertyknowledge.com
обсуждение исходный текст
Список pgsql-general
Hi,

The Postgresql admin manual (admin-7.2-A4.pdf) informs me that to start the
postgresql server on Linux (Redhat 7.2, Kernel 2.4.7-10) at bootup I should
add the following line:

File: /etc/rc.d/rc.local
Line: /path/pgsql/bin/pg_ctl start -l logfile -D /path/pgsql/data

But I thought I was supposed to start the postgesql server as user
'postgres'.

Here is how I manually start the postgresql server:

su -c 'pg_ctl start -l /var/lib/pgsql/logs/serverlog
-D /var/lib/pgsql/data -o -i' postgres

How do I adapt this line for inclusion into the /etc/rc.d/rc.local file?

When this is working how do I tell Linux to run the server shutdown command
(below) so it stops correctly on shutdown/reboot?

su -c 'pg_ctl stop -D /var/lib/pgsql/data -m s' postgres

Or will the postgresql server shutdown safely automatically when I
shutdown/reboot Linux?

Many thanks for your help, regards,

..matthew

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

Предыдущее
От: Jean-Michel POURE
Дата:
Сообщение: Re: HOWTO - Random character generation for primary key
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: What popular, large commercial websites run