Re: db security; user identification

Поиск
Список
Период
Сортировка
От Marcin Gil
Тема Re: db security; user identification
Дата
Msg-id 40176F6F.3090306@audax.com.pl
обсуждение исходный текст
Ответ на Re: db security; user identification  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: db security; user identification  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-novice
Tom Lane wrote:

> I concur with the suggestion to investigate local IDENT auth, though.
>  If your system supports it, it's trustworthy and lots more
> convenient than forcing a password to be supplied all the time.

Could you please, suggest any further reading on IDENT topic?
I've found myself lacking knowlegde on that.

> Another possibility is to put the correct password into the postgres
> account's ~/.pgpass file.  If you stick with md5 local auth you are
> going to end up doing that anyway, because it's the only reasonable
> way to handle authentication for batch jobs (think about backup and
> periodic vacuum tasks).  I am not totally sure, but I think that
> would also fix the pg_ctl start problem without needing -w.
>
pg_ctl has two options:
-w : wait for the start or shutdown to complete
-W : do not wait for the start or shutdown to complete

So I guess its '-W' you are writing about?
I've attached my startup script.

Thanks
--
   Marcin Gil :: marcin.gil@audax.com.pl
#!/bin/sh
#
# /etc/rc.d/rc.postgres
#
# Start/stop/restart the PostgreSQL database server.
#

export PGDATA=/var/lib/pgsql

USE_TCP=1

if [ "$2" = "usetcp" ]; then
    USE_TCP=1
elif [ "$2" = "notcp" ]; then
    USE_TCP=0
fi


if [ "${USE_TCP}" == "1" ]; then
    OPTIONS="-o -i"
fi


postgres_start() {
  if [ -x /usr/bin/pg_ctl -a -x /usr/bin/postmaster ]; then
    echo "Starting PostgreSQL..."
    su postgres -c "/usr/bin/pg_ctl start -l /var/log/postgresql -D ${PGDATA} ${OPTIONS}"
  fi
}

postgres_stop() {
    echo "Stopping PostgreSQL..."
    su postgres -c "/usr/bin/pg_ctl stop -w -m fast"
}

postgres_restart() {
    echo "Restarting PostgreSQL..."
    su postgres -c "/usr/bin/pg_ctl restart -w -m fast ${OPTIONS}"
}

postgres_reload() {
    echo "Reloading PostgreSQL..."
    su postgres -c "/usr/bin/pg_ctl reload"
}

postgres_status() {
    su postgres -c "/usr/bin/pg_ctl status"
}


case "$1" in
'start')
  postgres_start
  ;;
'stop')
  postgres_stop
  ;;
'restart')
  postgres_restart
  ;;
'reload')
  postgres_reload
  ;;
'status')
  postgres_status
  ;;
*)
  echo "Usage: $0 start|stop|restart|reload|status"
  ;;
esac


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

Предыдущее
От: Martin Atukunda
Дата:
Сообщение: Re: Install or Bust - pgsql on Red Hat 9
Следующее
От: Marcin Gil
Дата:
Сообщение: Re: unexpected eof