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 1rSW3A-00EDtp-6K for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 05:43:48 +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 1rSW38-0029l0-On for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 05:43:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rSW38-0029kr-FQ for pgsql-hackers@lists.postgresql.org; Wed, 24 Jan 2024 05:43:46 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rSW36-0034u1-5D for pgsql-hackers@postgresql.org; Wed, 24 Jan 2024 05:43:45 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-2142c746270so2290036fac.2 for ; Tue, 23 Jan 2024 21:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706075023; x=1706679823; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X9k53Gmfgv1c/UDi87hJkR2y7ghpUsQiSl2NXKPsPmU=; b=h35UatkQYyXMzffU5zdSaWt78kjGqQD/qo4tuav1tchO//UrFrhBu/+O8EkMdRMu/a rybPPBAsKMWZiKqrJOIPa0mxGp8EJX+g3opc1NjVUuzrx5EyoXP3VsDvoyBqCgJUJTkf Gxn9zGIJKns+etAwCPGFL7dGLgviUCDS/pREvBppzejlZNWY0O+o+l7RASJ/nuc2QU3V O57ii1plyG2+l3l2muj49JplLYIzw7HVCKW+j6KnmvsPjy9ESxuiXTVAD3exCuOl3KBW qXutVm4+th8SwuMa07sjYF16pkSS0JZzKxAUx/cA1x+h66n8SCy/L/jDKJvG2QHtYj5J 9E7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706075023; x=1706679823; h=content-transfer-encoding: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=X9k53Gmfgv1c/UDi87hJkR2y7ghpUsQiSl2NXKPsPmU=; b=trfPQJpHRl7Vx+xJrv458zxT7Yzwzu6XA5aEch1/emXoCCDPM265qF/6P0hsHASZM4 8gdYwQYGlugbDJMG19UUPemx1aRooSzCuKQHF/vmvIArpIBL7k9k2DPaZ7c3T5i/NPDd OaDo1QQetAw2N2OryybfF7lCP3GW3icxGbbAt/LPvR0hOD5rr4/RFZxi7JrLtT5J0UmV 9VRcNDE18DOu+9e7LocgdcOkz9l9fBw3VldXTRhW6NVX0LpxET0U++/NN0gs/a5Cr/Bk oLeCA7OCXozju0wzIn9Orw5IuQVETovrZgsj3FzJ2iqSKujgXQq9HPGVzTMYfL2EFWgW jEaA== X-Gm-Message-State: AOJu0YxMI5KHWnVW0uinUC1Wij7y69XVYyA0dYquXrzxhV/iJjEzdWbH eZlXDaW1b+cjBRal9a4aK/eLjrYblgLG+SYiU1e5P77OloPIH1JV8krXY9wemBwWU6DSguic/GX TQHFDoJ45liS+OPiTCdCG00XHn1E= X-Google-Smtp-Source: AGHT+IERvS8p+rOvyk7U31/jG/AhdgNNvECOVRshczLOYFaN/6VQJN0asTUv9sKMwoezuAnONzOojen7z/yIBvErn5A= X-Received: by 2002:a05:6871:7823:b0:210:cac2:4419 with SMTP id oy35-20020a056871782300b00210cac24419mr2787019oac.38.1706075023103; Tue, 23 Jan 2024 21:43:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 24 Jan 2024 11:13:31 +0530 Message-ID: Subject: Re: Synchronizing slots from primary to standby To: Masahiko Sawada Cc: shveta malik , Bertrand Drouvot , "Zhijie Hou (Fujitsu)" , Dilip Kumar , Peter Smith , Nisha Moond , "Hayato Kuroda (Fujitsu)" , Bharath Rupireddy , Peter Eisentraut , Bruce Momjian , Ashutosh Sharma , Andres Freund , pgsql-hackers , Ajin Cherian , Alvaro Herrera Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 24, 2024 at 10:41=E2=80=AFAM Masahiko Sawada wrote: > > On Mon, Jan 22, 2024 at 3:58=E2=80=AFPM Amit Kapila wrote: > > > > Can we think of using GetStandbyFlushRecPtr()? We probably need to > > expose this function, if this works for the required purpose. > > GetStandbyFlushRecPtr() seems good. But do we really want to raise an > ERROR in this case? IIUC this case could happen often when the slot > used by the standby is not listed in standby_slot_names. > or it can be due to some bug in the code as well. > I think we > can just skip such a slot to synchronize and check it the next time. > How about logging the message and then skipping the sync step? This will at least make users aware that they could be missing to set standby_slot_names. > Here are random comments on slotsyncworker.c (v66): > > +/* GUC variable */ > +bool enable_syncslot =3D false; > > Is enable_syncslot a really good name? We use "enable" prefix only for > planner parameters such as enable_seqscan, and it seems to me that > "slot" is not specific. Other candidates are: > > * synchronize_replication_slots =3D on|off > * synchronize_failover_slots =3D on|off > I would prefer the second one. Would it be better to just say sync_failover_slots? --=20 With Regards, Amit Kapila.