klionengineer.blogg.se

Configure postgresql
Configure postgresql












configure postgresql

If this value is specified without units, it is taken as milliseconds. This is useful for the sending server to detect a standby crash or network outage. Terminate replication connections that are inactive for longer than this amount of time. This parameter can only be set in the nf file or on the server command line. If this value is specified without units, it is taken as megabytes. You can see the WAL availability of replication slots in pg_replication_slots. Otherwise, if restart_lsn of a replication slot falls behind the current LSN by more than the given size, the standby using the slot may no longer be able to continue replication due to removal of required WAL files. If max_slot_wal_keep_size is -1 (the default), replication slots may retain an unlimited amount of WAL files. Specify the maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time. If wal_keep_size is zero (the default), the system doesn't keep any extra segments for standby purposes, so the number of old WAL segments available to standby servers is a function of the location of the previous checkpoint and status of WAL archiving. This sets only the minimum size of segments retained in pg_wal the system might need to retain more segments for WAL archival or to recover from a checkpoint. (However, the standby server can recover by fetching the segment from archive, if WAL archiving is in use.) Downstream connections will also eventually fail as a result. If a standby server connected to the sending server falls behind by more than wal_keep_size megabytes, the sending server might remove a WAL segment still needed by the standby, in which case the replication connection will be terminated.

configure postgresql

Specifies the minimum size of past log file segments kept in the pg_wal directory, in case a standby server needs to fetch them for streaming replication. Setting it a lower value than the current number of tracked replication origins (reflected in pg_replication_origin_status, not pg_replication_origin) will prevent the server from starting. On the subscriber side, specifies how many replication origins (see Chapter 49) can be tracked simultaneously, effectively limiting how many logical replication subscriptions can be created on the server. Also, wal_level must be set to replica or higher to allow replication slots to be used. Setting it to a lower value than the number of currently existing replication slots will prevent the server from starting. This parameter can only be set at server start. Specifies the maximum number of replication slots (see Section 26.2.6) that the server can support.

configure postgresql

Otherwise, queries will not be allowed in the standby server. When running a standby server, you must set this parameter to the same or higher value than on the master server. Also, wal_level must be set to replica or higher to allow connections from standby servers. Abrupt disconnection of a streaming client might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. The value 0 means replication is disabled. Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes).














Configure postgresql