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 1t4Byy-00GtIj-Im for pgsql-admin@arkaria.postgresql.org; Fri, 25 Oct 2024 04:31:28 +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 1t4Byu-00BqCn-Mp for pgsql-admin@arkaria.postgresql.org; Fri, 25 Oct 2024 04:31:25 +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 1t4Byu-00BqCe-7S for pgsql-admin@lists.postgresql.org; Fri, 25 Oct 2024 04:31:24 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t4Byq-002qlW-E8 for pgsql-admin@lists.postgresql.org; Fri, 25 Oct 2024 04:31:23 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-288642376bcso985308fac.1 for ; Thu, 24 Oct 2024 21:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitnine-net.20230601.gappssmtp.com; s=20230601; t=1729830678; x=1730435478; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=09UtO466hUD/mgeOdiqQ0hB/7bwuP/7TbCSoW/BHAaw=; b=Lfgk8ng1QuRvQny+KlOcGXawYmbQR1xvudI1Z460jvyUvycuUr4dfZ7GnVls8V/DQ0 hfWsu13fQSiYoG5elfM3iC3Bbod1713nt2sfHltGf68yzc6Qmwuuc2FvgfagDmZ9MhYj IUSVNeLVHaIMQcFeUAKQXmFk996nbumE/Pr+ArbXp+llENcfAQLcitSPtZYl7MM+qAvZ lV5E1glGXmmO39Ft/2uP8aC1JOzXDKz03mfQNje/iQJAkskmc7P4pU9kFtUMFEBDoR3g rvJv88T8EawfbIaUsbEgT0pQ8iLfEwr7JKZWj4eGLEWSRmA2qBi71bzjQ3P7jMvoFs8c aczQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729830678; x=1730435478; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=09UtO466hUD/mgeOdiqQ0hB/7bwuP/7TbCSoW/BHAaw=; b=lX63sjmw6+9doKeT+AHLf4zgBqVBfiHCVD97x6cJemU0SKzSmjWmg7r1ykEDyI/GXS uOv7l0NM1+gmpF4rI9GDQjDhRVC/S+Ch9hqj4H2NvnsV/gchW5Wr5eLQ0CL9UeEvElUa lF+mfomAY7xaFkxM9MoK3LW/wBrqz9xEZhih5NnlLpyT16+7XT0+10mCIm/0P3EsiB5N MUxu7YhRpe3xmL6sLRg8te3DB026dqKVDY7malrb031R8cjTMtIhi/lxYtuIHjp0JKHz LLUg0hr8zc06S9x3SBwmYe1u+xWvipQYWfouyebxb0kdAVIRCKEijK+Rf47QyKXZy1o9 kSzQ== X-Gm-Message-State: AOJu0YwMRm37sWL+NdAjUIqhwbWaLxWYVwpXqAdDoflyWRp1h7HsbPWa p8ecsOtVoPfWHi2zqjqROVuwc+gON2cyWwtVZJpHupAGbwxfQhQPsRef5f2BnnY7p8i+ZzFTujJ /BjBYLpCORPFbhO+7y3iDgx+76ZyYm/3wzU/uErZeDJy0Q3Ob3+w= X-Google-Smtp-Source: AGHT+IEeM/ldef6egHRUzOUaZYVwwzHAIeCu+t+lJuMkSj3sW1biCy3Ub+k8nUM/564oVlEwnZsr/KvefsyEA2qSWRw= X-Received: by 2002:a05:6870:3909:b0:288:60d6:f183 with SMTP id 586e51a60fabf-28ccb9e55e0mr8552148fac.38.1729830677989; Thu, 24 Oct 2024 21:31:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Muhammad Usman Khan Date: Fri, 25 Oct 2024 09:31:06 +0500 Message-ID: Subject: Re: Will there be data loss between slot syncronisation To: Nikhil Shetty Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000001562d30625459753" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001562d30625459753 Content-Type: text/plain; charset="UTF-8" Hi, Data loss may occur because unsynced slots may not have fully replicated all the necessary changes from the primary. On Thu, 24 Oct 2024 at 22:06, Nikhil Shetty wrote: > Hi Team, > > As per documentation for sync_replication_slots: > > The nap time of the worker is tuned according to the activity on the > primary. The slot sync worker waits for some time before the next > synchronization, with the duration varying based on whether any slots were > updated during the last cycle. > > What happens if there is a long period where the standby slot is not > synced and there is autofailover? Will there be a data loss? > > Thanks, > Nikhil > --0000000000001562d30625459753 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
Data loss may occur b= ecause unsynced slots may not have fully replicated all the necessary chang= es from the primary.


On Thu, 24 Oct 2024 at 22:0= 6, Nikhil Shetty <nikhil.dba04= @gmail.com> wrote:
Hi Team,

As per documentatio= n for=C2=A0sync_repl= ication_slots:

The=C2=A0nap=C2=A0time=C2=A0of=C2=A0the=C2=A0wor= ker=C2=A0is=C2=A0tuned=C2=A0according=C2=A0to=C2=A0the=C2=A0activity=C2=A0o= n=C2=A0the
primary.=C2=A0The=C2=A0sl= ot=C2=A0sync=C2=A0worker=C2=A0waits=C2=A0for=C2=A0some=C2=A0time=C2=A0befor= e=C2=A0the=C2=A0next
synchronization= ,=C2=A0with=C2=A0the=C2=A0duration=C2=A0varying=C2=A0based=C2=A0on=C2=A0whe= ther=C2=A0any=C2=A0slots=C2=A0were
u= pdated=C2=A0during=C2=A0the=C2=A0last=C2=A0cycle.

What happen= s if there is a long period where the standby slot is not synced and there = is autofailover? Will there be a data loss?

Thanks,
Nikhil
--0000000000001562d30625459753--