Инструменты пользователя

Инструменты сайта


it:postgresql:jobs

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
it:postgresql:jobs [2022/11/29 07:50] ura2404it:postgresql:jobs [2022/11/29 08:50] (текущий) ura2404
Строка 14: Строка 14:
 </code> </code>
  
-2. Create a config file+2. Setup directory for logging 
 +<code bash> 
 +mkdir /var/log/pgagent 
 +chown -R postgres:postgres /var/log/pgagent 
 +chmod g+w /var/log/pgagent 
 +</code> 
 + 
 +3. Create a config file
 <file bash /etc/pgagent.conf> <file bash /etc/pgagent.conf>
 DBNAME=postgres DBNAME=postgres
Строка 25: Строка 32:
 </file> </file>
  
-3. Create systemd service+4. Create systemd service
 <file bash /usr/lib/systemd/system/pgagent.service> <file bash /usr/lib/systemd/system/pgagent.service>
 [Unit] [Unit]
Строка 62: Строка 69:
 </file> </file>
  
-4. Start Service+5. Start Service
 <code bash> <code bash>
 sudo -i sudo -i
Строка 71: Строка 78:
 </code> </code>
  
-5. Enable auto rotation of logs+6. Enable auto rotation of logs
 <file bash /etc/logrotate.d/pgagent> <file bash /etc/logrotate.d/pgagent>
 /var/log/pgagent/*.log { /var/log/pgagent/*.log {
Строка 88: Строка 95:
 </code> </code>
  
-6. В базе postgres+7. В базе postgres
 <code sql> <code sql>
 CREATE EXTENSION pgagent; CREATE EXTENSION pgagent;
Строка 106: Строка 113:
 </code> </code>
  
-7. В целевой базе +8. В целевой базе 
 <code sql> <code sql>
 CREATE USER "pgagent" WITH CREATE USER "pgagent" WITH
Строка 121: Строка 128:
 GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA <schema_name> TO pgagent; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA <schema_name> TO pgagent;
 </code> </code>
- 
- 
  
it/postgresql/jobs.1669708235.txt.gz · Последнее изменение: 2022/11/29 07:50 — ura2404