Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
Modifying postgresql.conf through shell?

I want to modify a postgresql.conf parameter through the shell. From the documentation I can see that I can use the postgres command with the -c flag.

However, on my attempt, for example,

postgres -c autovacuum=off

postgres returns:

Execution of PostgreSQL by a user with administrative permissions is not permitted.

The server must be started under an unprivileged user ID to prevent possible system security compromises. See the documentation for more information on how to properly start the server.

How can I overcome this or what is the correct procedure? Also, I don't really mind for security compromises.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Given the differences on the underlying OS, I usually prefer to do this via PostgreSQL itself, which comes handy when you're dealing with a managed service that do not give you filesystem access, like so:

sudo -u postgres psql -U postgres -d database_name -c "alter system set postgresql_parameter = 'new_value';"

As an example when I have to install TimeScaleDB extension, I can do:

sudo -u postgres psql -U postgres -d database_name -c "alter system set shared_preload_libraries = 'timescaledb';"
sudo service postgresql restart
sudo -u postgres psql -U postgres -d database_name -c "create extension if not exists timescaledb;"
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda