| От | Andreas Joseph Krogh |
|---|---|
| Тема | Re: Execute commands in single-user mode |
| Дата | |
| Msg-id | VisenaEmail.53.1bc2be95bd1a144d.1522c08b064@tc7-visena обсуждение исходный текст |
| Ответ на | Re: Execute commands in single-user mode (Melvin Davidson <melvin6925@gmail.com>) |
| Ответы |
Re: Execute commands in single-user mode
|
| Список | pgsql-general |
Well, you can't combine psql with the postgres startup, but you can issue subsequent commands from bash with the -c option:EG:
postgres --single -O -D $PGDATA $DB_NAME# give postgres a few seconds to complete startupsleep 30
psql -U postgres -d your_database -c "alter table pg_largeobject set tablespace some_tablespace;"
pg_ctl stop -d $PGDATA -m fast
BTW, it's always good form to state the exact O/S and version of PostgreSQL, regardless of whether you think it may apply.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера
