Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joGFb-0008WF-5U for pgsql-docs@arkaria.postgresql.org; Thu, 25 Jun 2020 01:00:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joGFZ-0004ds-Q5 for pgsql-docs@arkaria.postgresql.org; Thu, 25 Jun 2020 01:00:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joGFZ-0004dl-Jt for pgsql-docs@lists.postgresql.org; Thu, 25 Jun 2020 01:00:21 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1joGFX-0005JK-Fn for pgsql-docs@lists.postgresql.org; Thu, 25 Jun 2020 01:00:20 +0000 Received: by mail-qk1-x744.google.com with SMTP id b4so3805416qkn.11 for ; Wed, 24 Jun 2020 18:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=V9BG1Q+FbnZqC9BQyuPTQZ9Br/NB1TVjMxdq2K/HjGE=; b=pG2TozKSXsTHkAXJjugjDb9y3q8UG7YcHvDUudc5Gt97J5YFlza5Fkb+TXTLzIbgVM oMrxsQi7tjqyioPTGKIOC5OHVYxme4hxmiL0cJH9jWvL+hye9WccyXSu+1KNAxMRVReQ 0nG2nyBRbGmsKg+UE6HqGmPooEmd8B6S8tyZfXO37m/UjCkN555RKRnC96GQ9OCOYJSx DfZlCUssI8opAQssrK1l6LsY3kyvziBYe9Gwnpt0+ZVx09TsvzLyAfebtx/9qQAf8x63 tn514hLfF+UslFQdneFVptl6NXPDd9kJomH60hUnQIs8d6qh7wR+/TvqK7vnWGRp8BnI g1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=V9BG1Q+FbnZqC9BQyuPTQZ9Br/NB1TVjMxdq2K/HjGE=; b=nQx6j+J8V976YANvWvVaotHPWdO7QtEoESUNrzNiFo9N6dFjNzRlcP6WYsZ6adlKye jrc9ClY9MIbNz8Pkpj20QcHBIz4PTUYKXinOmNZvtLkWTggH4q2fNJxW4DF2xHhsc9Hd fbZ2QrTRr7yUg7mBzUzi2/Kk4lYw+aIMYxexSdm9O+8ndJ0iM3P2PWthVt4TqulYzd22 C3a/iucz5OoqyFAi6YhYZk3OF347BzrItXa4p87VfzwdsupzEoeSDOSYQ4mv+ENndTm4 qvbp1SZ7ezLTJIVLh3KtcDbhXxv7wpU6X4RvQIyFQ9Mes/I/Q9gdJlnEpnTDc4Tq1xTw 37uA== X-Gm-Message-State: AOAM532JxUuHPehEoKiDEiaHsyBCXYcD1sraNDV4CQS9UgsCAldH49YY Tq/aSN4qEOa6MCDaqUnEE7Xwxi/p54iTbuevkRBzk4egqdzDsWSkeDQJkUpIh08HBW3PF2MVDhP sJ5IQB8YUYCcAxFm7nAISL1AfsVCyjcaaKdkU99REerz3lSQHX5sAENsE9ozZRxMCd4LNaKvv9r WP6YYzSPiXhQ== X-Google-Smtp-Source: ABdhPJyh8r8aF3f42sRV93x/H3WAmIF++WHfuZgDI8DsYMhUrGDPk3QbgBNWyq1wnBO1hokNeMDJGw== X-Received: by 2002:a37:2d07:: with SMTP id t7mr28858261qkh.51.1593046818330; Wed, 24 Jun 2020 18:00:18 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id p128sm3016273qka.47.2020.06.24.18.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 18:00:17 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1B16B2A3A97; Wed, 24 Jun 2020 21:00:16 -0400 (-04) Date: Wed, 24 Jun 2020 21:00:16 -0400 From: Alvaro Herrera To: Fujii Masao Cc: pgsql-docs@lists.postgresql.org Subject: Re: The description for pg_replication_slots.restart_lsn Message-ID: <20200625010016.GA22779@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6497f1e9-3148-c5da-7e49-b2fddad9a42f@oss.nttdata.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jun-17, Fujii Masao wrote: > The document explains that restart_lsn column in pg_replication_slots view is: > > The address (LSN) of oldest WAL which still might be required by > the consumer of this slot and thus won't be automatically removed > during checkpoints. > > But the latter part is not true in v13 thanks to max_slot_wal_keep_size. > I think that we need to update it as follows. Thought? > > The address (LSN) of oldest WAL which still might be required by > the consumer of this slot and thus won't be automatically removed > during checkpoints unless this LSN gets behind more than > max_slot_wal_keep_size from the current LSN. We just added the invalidated_at LSN to replication slots; while working on the tests for that today, I was thinking that it might be useful to display that LSN in pg_replication_slots. What do you think of the idea of publishing the invalidated_at LSN in pg_replication_slot.restart_lsn when the slot is invalid? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services