Re: max_wal_senders

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Rick Otten <rottenwindfish(at)gmail(dot)com>, "pgsql-performa(dot)" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: max_wal_senders
Date: 2023-02-09 05:59:53
Message-ID: ba04a12d2b1e792e863e98cd88d3d54649464d21.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2023-02-08 at 18:07 -0500, Rick Otten wrote:
> I've been thinking about the max_wal_senders parameter lately and wondering if there
> is any harm in setting it too high.

No, there isn't, except that if you end up having too many *actual* WAL senders, it
will cause load. A high limit is no problem as such.

> The documentation mentions an orphaned connection slot that may take a while to time out.
> How can I tell if I have any of those?  I was looking for a `pg_wal_slots` table
> similar to the `pg_replication_slots` table, but don't see anything obvious in the catalog.

The view is "pg_stat_replication", but you won't see there if an entry is
abandoned before PostgreSQL does and terminates it. You can set "tcp_keepalived_idle"
low enough so that the kernel will detect broken connections early on.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2023-02-09 06:40:12 Re: max_wal_senders
Previous Message Rick Otten 2023-02-08 23:07:15 max_wal_senders