Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqdV3-000K6l-9S for pgsql-general@arkaria.postgresql.org; Wed, 11 Oct 2023 18:00:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qqdV0-000Q8c-PV for pgsql-general@arkaria.postgresql.org; Wed, 11 Oct 2023 17:59:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqdV0-000Q8K-CT for pgsql-general@lists.postgresql.org; Wed, 11 Oct 2023 17:59:59 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qqdUx-0002BT-Tu for pgsql-general@lists.postgresql.org; Wed, 11 Oct 2023 17:59:58 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-59f6492b415so611447b3.0 for ; Wed, 11 Oct 2023 10:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697047194; x=1697651994; darn=lists.postgresql.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=csacY/RSbrQaz1FVrMaE/sdWUhzA3jb1hqKhWfRuYdA=; b=T0vZTI55BiIFI57010n0DHTfMNTpxtI7VfnS2QgIqxMrKyQ6wLNtjFGjUTgYj1tJfH 6uWHBXcNhjy3CDjXR05hkBVhF4MRdCTg2vgtHOzPVDuqhZWpNlpNffmclqgqPKUxvhaN ZSSVVLXJDPUxqSyR9OOsDfJlzB1Lj9pDNtxkwFKu+Y0GK+cINzRE0zFE1EPy+URqlKop CV8kwgaJqz7gJU0b0u+9Wonvao4KxE7qywImqN4u+Ih2m9iy3FMky2mOxUmL6M2qEwf9 vOg1kiaHa69v+/PwBLaAq8pQ5vIxAcnwVbTCsi0tPUlwqPCUPqzKTh05FTUW/xZpXPeI 80OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697047194; x=1697651994; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=csacY/RSbrQaz1FVrMaE/sdWUhzA3jb1hqKhWfRuYdA=; b=w2tAtjvHXXkMBPwtigF9DurLgZUnxacTA+x/7r4yJagpRA4gUnQirwQjtTZ5tianzw qCa5Y9YWPIJ+jWkDn5fh3M3px/NKsV5aG9Ewuu2EN44lTiQaUeoliq3oU2+IvCNvIoMR 9ltN8XuSHF2TOaqVsn9palv6v4Zp9cW7YaZCJ9yW+0nVskQvnUlDESqW9plm3xo0WwaE iHeEAAB1SSsLxmz7zMBbIguGeYNe971VWFkW4AmTl8WpsyIWlbFgfIPb0ug4TzI298nP GJcNnipkPhVjNqR1sutn0a82Sr2jEsGSjWYSlS5xPl/39U9fKkU8QPj/nrChqdqHKeEl 1rvg== X-Gm-Message-State: AOJu0YwLGiGhUAHWHsvqQVBGW6D3wI8DuLGoY6brHhqcv3WXBFng61gQ 9JpgA804YPhAjmSsIkRA15IQ3uyEAzc= X-Google-Smtp-Source: AGHT+IFaoV9h12KGmVLIWqlzqL9TmjS56pWjvg20gm1VYdcO4kZ0K1uxbYkR1JxJQ8UYUTx9MvX6DQ== X-Received: by 2002:a0d:e8c6:0:b0:5a7:af4f:59ad with SMTP id r189-20020a0de8c6000000b005a7af4f59admr5065741ywe.0.1697047193554; Wed, 11 Oct 2023 10:59:53 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:fd24:e51f:1d6f:f68d? ([2600:1700:bd2c:b810:fd24:e51f:1d6f:f68d]) by smtp.googlemail.com with ESMTPSA id g192-20020a0dddc9000000b0054bfc94a10dsm5321526ywe.47.2023.10.11.10.59.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 10:59:53 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------KlhjllE8kXhqfDiHXG8Mc0DZ" Message-ID: <5d61fc2b-6fb3-18a8-4165-64b71fb98b5a@gmail.com> Date: Wed, 11 Oct 2023 12:59:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: log wal file transfer in error logs Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <6202ad1fa40598dd6c0dc25e7d9cd52ca1a462ae.camel@cybertec.at> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------KlhjllE8kXhqfDiHXG8Mc0DZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Tables (on the primary) pg_stat_replication and (on the secondary) pg_stat_wal_receiver do that for you. On 10/11/23 12:50, Atul Kumar wrote: > Yes, I meant streamed, I need to log those wal files that are getting > streamed and replayed on standby servers in error logs of primary as well > as standby servers. > > So that I can cross check that whichever file is streamed has been > replayed on standby. > > I need to keep a track of these wal files in db error logs. > > > > Regard > > On Wed, Oct 11, 2023 at 10:29 PM Atul Kumar wrote: > > Yss, I meant streamed, I need to log those wal files that are getting > streamed and replayed on standby servers in error logs of primary as > well as standby servers. > > So that I can cross check that whichever file is streamed has been > replayed on standby. > > I need to keep a track of these wal files in db error logs. > > > > Regards, > Atul > > > > On Wed, Oct 11, 2023 at 10:21 PM Laurenz Albe > wrote: > > On Wed, 2023-10-11 at 22:15 +0530, Atul Kumar wrote: > > I need to log all wal files that are getting transferred to all > standby servers in the postgresql error logs. > > WAL files are not transferred to standby servers... > > WAL is streamed, so what would you want to log? > > Yours, > Laurenz Albe > -- Born in Arizona, moved to Babylonia. --------------KlhjllE8kXhqfDiHXG8Mc0DZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Tables (on the primary) pg_stat_replication and (on the secondary) pg_stat_wal_receiver do that for you.

On 10/11/23 12:50, Atul Kumar wrote:
Yes, I meant streamed, I need to log those wal files that are getting streamed and replayed on standby servers in error logs of primary as well as standby servers.

So that I can cross check that whichever file is streamed has been replayed on standby.

I need to keep a track of these wal files in db error logs.



Regard

On Wed, Oct 11, 2023 at 10:29 PM Atul Kumar <akumar14871@gmail.com> wrote:
Yss, I meant streamed, I need to log those wal files that are getting streamed and replayed on standby servers in error logs of primary as well as standby servers.

So that I can cross check that whichever file is streamed has been replayed on standby.

I need to keep a track of these wal files in db error logs.



Regards,
Atul



On Wed, Oct 11, 2023 at 10:21 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 2023-10-11 at 22:15 +0530, Atul Kumar wrote:
> I need to log all wal files that are getting transferred to all standby servers in the postgresql error logs.

WAL files are not transferred to standby servers...

WAL is streamed, so what would you want to log?

Yours,
Laurenz Albe

--
Born in Arizona, moved to Babylonia.
--------------KlhjllE8kXhqfDiHXG8Mc0DZ--