Skip to content

Change postgresql.conf settings on primary and standby via pg_autoctl #80

Open

Description

@marcocitus

It would be useful if pg_autoctl had a command to change a setting like max_connections or shared_buffers when streaming replication is set up. We basically need to make sure that both servers have the setting in their postgresql.conf (or include) and then do a restart, preferably without triggering a failover.

Activity

  1. changed the title [-]Allow pg_autoctl to change postgresql.conf settings on primary and standby[/-] [+]Change postgresql.conf settings on primary and standby via pg_autoctl[/+] on Oct 3, 2019
  2. dimitri commented on Oct 14, 2026

    @dimitri
    Contributor

    This is now available: pg_autoctl restart postgres --maintenance (PR #1198).

    It restarts Postgres to pick up a postgresql.conf/ALTER SYSTEM SET change, wrapping the restart in maintenance mode so the monitor doesn't trigger a failover while the node is down — e.g.:

    ALTER SYSTEM SET shared_buffers = '4GB';
    pg_autoctl restart postgres --maintenance --pgdata <PGDATA>
    

    This hasn't shipped in a release yet — it's merged to main and should land in the next pg_auto_failover release, probably in November. See the manual page for pg_autoctl restart postgres and the worked example in docs/operations.rst in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions