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 1n5jcM-0003wq-32 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 07:24:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5jcK-00069B-9m for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 07:24:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5jcJ-000691-Tz for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 07:24:52 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5jcD-00041p-79 for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 07:24:51 +0000 Received: by mail-pg1-x52a.google.com with SMTP id f8so4763070pgf.8 for ; Thu, 06 Jan 2022 23:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=jAcATeMphM1+9t08GzdqW5tmz046pBb5RMsB2CLjK0c=; b=OmpNpaTdiJr2wUyyJQ6XKdubuUgwg06RTChVzYhCNOiQwaLMl388XhaUukpZIiVqVW +DmCvc4t2j7HbL7g75gufT0dpJ5wFT6AyzzOolTImDhKJol4ZVA/sGD32gLaB1Yl7QwK zxZhL+eB5RSvTVDXMqDmvrlOkGpXUZB2uiSIfqaC5gFY0GTfFG7kBNA6SpZkBxOmxIRx jfs2tRTdS9xWQwvA/pNlqDVZIrlOcWXLNQrAvxDxmyB0U78A0jsSvwoecOtiog5Ojn9P LmeFJBsoa5Y+CfJ4Bq51pGCMNQGYYjqhy+QNQZAAOXB96WhEWzCOZr5Cv2WeayyIo95O G1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=jAcATeMphM1+9t08GzdqW5tmz046pBb5RMsB2CLjK0c=; b=Pn6Uk1H7OWiVMZpxG1RiCPkPPEoaZ9/cYeXYckQlgvLPQFr//ex8QJ6H+t981VCLDO 2LuRxy8bjn4YFKRD3F8+oSBz1f6t5KJFB57bcBZRnhznrOuISO2dXlfqll3km7Ummy2r 26FOt7YzPxBFuGIZ+ee9ySMEXotX7/aFZo4E4etzNdkEK8ls7gwAMjtNx+NAxAM7x/+y sdKj87AzniUicnOtOXEcZCPT/1qOEtqO0h+ZfGUzbLAXCCSulNesXLCrj9vwZf1R3et0 jW3tnDN2AmUV1AjL43MXnu/GSgspN0dGYqt49DSpRuk/H7JJ2KO1yCbwpatP1LnhaIIL EaOA== X-Gm-Message-State: AOAM531zibHumNgV+WJXGKNMPMbKhyegDOXp/gsC/YpOMaRXHzrS0fr8 6hs/oPBnGL/PzZ50ZjnuEMxctg== X-Google-Smtp-Source: ABdhPJzuobqDNiHfp7FGwDHFmRU8lSi820hoAO7uGyrktZIekf8tGfElbU0u4imGsj8yLjacotW0VQ== X-Received: by 2002:a65:5547:: with SMTP id t7mr56356482pgr.510.1641540282971; Thu, 06 Jan 2022 23:24:42 -0800 (PST) Received: from jdavis.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id u3sm5153535pfk.82.2022.01.06.23.24.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 23:24:42 -0800 (PST) Message-ID: <2df227fddc659d1da61a59a54ffa11c03461a84e.camel@j-davis.com> Subject: Re: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers From: Jeff Davis To: SATYANARAYANA NARLAPURAM , Bharath Rupireddy Cc: PostgreSQL Hackers Date: Thu, 06 Jan 2022 23:24:40 -0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2022-01-05 at 23:59 -0800, SATYANARAYANA NARLAPURAM wrote: > I would like to propose a GUC send_Wal_after_quorum_committed which > when set to ON, walsenders corresponds to async standbys and logical > replication workers wait until the LSN is quorum committed on the > primary before sending it to the standby. This not only simplifies > the post failover steps but avoids unnecessary downtime for the async > replicas. Thoughts? Do we need a GUC? Or should we just always require that sync rep is satisfied before sending to async replicas? It feels like the sync quorum should always be ahead of the async replicas. Unless I'm missing a use case, or there is some kind of performance gotcha. Regards, Jeff Davis