Work with PostgreSQL database WAL log files

Stay organized with collections Save and categorize content based on your preferences.


Datastream uses the PostgreSQL WAL (Write Ahead Log) transaction log to read PostgreSQL streams. The log is stored in WAL files on the database server. Each record in the WAL log represents a single change to the actual data in one of the tables in the database.

Set configuration parameters for PostgreSQL WAL files

It is recommended that you apply the following configuration settings to your PostgreSQL database:

  • max_slot_wal_keep_size: set this parameter (available only for PostgreSQL 13 and above) to limit the amount of storage used by the replication slot. This parameter can only be set in the postgresql.conf file or using the server command line.

  • wal_sender_timeout: set this parameter to 0 (to disable the timeout) or to a value greater than or equal to 10 minutes.

If you plan to create more than 10 streams, or the number of logical replication slots that is used by other resources in addition to the number of planned streams exceeds 10, make sure to modify the following parameters:

  • max_replication_slots: increase the value of this parameter, depending on the number of replication slots set for your database (you need 1 replication slot per stream). You can only set max_replication_slots at server start.

  • max_wal_senders: increase the value of this parameter, so that it's greater than the value of the max_replication_slots parameter. You can only set max_wal_senders when you start the server.