pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: b1000101@pm.me
To: pgsql-docs@lists.postgresql.org
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Subject: Re: max_slot_wal_keep_size unit is not specified
Date: Tue, 23 Nov 2021 11:21:05 -0300
Message-ID: <202111231421.zybfdpc5pyln@alvherre.pgsql> (raw)
In-Reply-To: <163760291192.26193.10801700492025355788@wrigleys.postgresql.org>

On 2021-Nov-22, PG Doc comments form wrote:

> The unit (I assume it's MB) of max_slot_wal_keep_size is not explicitly
> specified in the docs. If it's intentional then please, disregards, but I've
> not been able to deduct that from this page alone. Thanks!

Well, that's embarrasing.  I'll see about fixing it.

It is a size-based unit.  You would typically specify some unit (say,
MB) together with the number; internally, because the way this works is
in terms of whole files, it is rounded down to an integer number of WAL
segments.  If you don't specify a unit, it is taken to be a number of
megabytes.

I wonder why did we make it round down rather than up.  Does this mean
that if you have max_slot_wal_keep_size=8MB and wal segments of 16 MB,
the slot gets invalidated with more than zero reserved segments?

Thanks for reporting.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from 
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
 Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php





view thread (6+ messages)  latest in thread

Message-ID: <202111231421.zybfdpc5pyln@alvherre.pgsql>
Permalink:  ../202111231421.zybfdpc5pyln@alvherre.pgsql/
Also on:    postgresql.org/message-id/202111231421.zybfdpc5pyln@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, b1000101@pm.me, pgsql-docs@lists.postgresql.org, horikyota.ntt@gmail.com
  Subject: Re: max_slot_wal_keep_size unit is not specified
  In-Reply-To: <202111231421.zybfdpc5pyln@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox