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 1n7FUw-0000tC-LZ for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jan 2022 11:39:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7FUv-0007q6-Hn for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jan 2022 11:39:29 +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 1n7FTO-0002h7-Q5 for pgsql-hackers@lists.postgresql.org; Tue, 11 Jan 2022 11:37:54 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n7FTM-0006TC-34 for pgsql-hackers@lists.postgresql.org; Tue, 11 Jan 2022 11:37:53 +0000 Received: by mail-pj1-x1029.google.com with SMTP id y16-20020a17090a6c9000b001b13ffaa625so4733529pjj.2 for ; Tue, 11 Jan 2022 03:37:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GtpCD5XuIJjS3KyyxoDHCqwpInNZrZSydYPP1LeFFu0=; b=btIWY6R3hgI6ngukP6abGH4DSriM75D+tdGseHU4CuKFP7elmm8o1mFPXVqR33/USg SrFUpAgbxikOosGhCelQTZZJwhZrPQ+dUcaos1j0gsSnvX/TC3akIARX9jgzxvRbNYtm gzAflm9bPcJ9cxyutNpfAacKcPVcminO63I/7UK+EP7HeN8yRsZrtCSpBWvDFNJNZ9k7 V2WXBrm6E6OPsu7eJi6yEBIVWhbe3A3J0Stvas6/JeT++4PvzZlIMFiCUosawEXIGAu7 psaaYUeXQr58HuPH11gQs+M5kuUkqe6GtlX+Bbxe4rK5yib7hsDvNAFgD5BUbn5WsQCT o3ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GtpCD5XuIJjS3KyyxoDHCqwpInNZrZSydYPP1LeFFu0=; b=yt1UHjMrlh+Qf6GBnjC5kBS2tqSj24tXupaQZV8EWQmKjIWkuUbdUQpQemiN3EzlJa p+ou449H7TzACE8XiD4M06z4Xemkzxw5kuP09DUmAjHkLPnsHv2mupmg+rQhBHHfYmeA S4LwE+2bSpSyOaOXHEHNimNfC42FcRxH8PVjs/hztbIHb3hVGnxIt3xxQenK3OSekKOm bnPtU/k7keNRjYvF79W2KeM/SF2iu9B0j3gpGt5UFCAdbQmAVUBSglwiLMTVF3ysgccM 0aEliZ6L4n7nMJy1ttFLSD//O6zICszqHllEpN3JA22idXS2PwIMXpNPk0pIum9LIZKc 6RPw== X-Gm-Message-State: AOAM533bh/pkzLgaS2IgmQNCukMWvsbpu+UToPPzrjejwkCZnChNFJAE vQuj0zaT0A62Uj9MaCHXt3k= X-Google-Smtp-Source: ABdhPJxF/GHSJ3FTZECAtlTd8RsNqj1E7jCRx4ekCIcVvYGy4lmYaPtuESrmfpBq9blRla+vGW2Llw== X-Received: by 2002:a17:90a:b381:: with SMTP id e1mr2622600pjr.55.1641901070725; Tue, 11 Jan 2022 03:37:50 -0800 (PST) Received: from jrouhaud (1-171-174-202.dynamic-ip.hinet.net. [1.171.174.202]) by smtp.gmail.com with ESMTPSA id l22sm10215272pfc.167.2022.01.11.03.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 03:37:50 -0800 (PST) Date: Tue, 11 Jan 2022 19:37:47 +0800 From: Julien Rouhaud To: RKN Sai Krishna Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Query regarding replication slots Message-ID: <20220111113747.7mk4stfbxo4zobqc@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 11, 2022 at 04:48:59PM +0530, RKN Sai Krishna wrote: > Hi All, > > I have a very basic question related to replication slots. Why should > the master/primary server maintain the replication slot info like lsn > corresponding to each standby server etc. Instead, why can't each > standby server send the lsn that it needs, and master/primary server > maintain the minimum lsn across all of the standby servers so that the > information could be used for cleanup/removal of WAL segments? Because the information is needed even if the standby servers are not available, and if you only have a global xmin then you can't do much when removing one of the slots.