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 1mzLi2-0007P4-W5 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Dec 2021 16:40:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzLi1-0000fh-Q6 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Dec 2021 16:40:21 +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 1mzLi1-0000fX-6Y for pgsql-hackers@lists.postgresql.org; Mon, 20 Dec 2021 16:40:21 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mzLhx-0005Ph-FI for pgsql-hackers@lists.postgresql.org; Mon, 20 Dec 2021 16:40:20 +0000 Received: by mail-ed1-x535.google.com with SMTP id f5so17617315edq.6 for ; Mon, 20 Dec 2021 08:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=aG2htOr9Uf6dbb4+Zoi6Q9aAC+aG4RtBcEkYHws/5ZQ=; b=ZyTl4BjWJSEKxRMt4l4eeQ81tQoiKpECOBDOz/uHz1crV94vfMp+606EsointNAwC0 sBfl++BDOdKCid46WJsSfuzVgqHodxkHyhmSwxmxt1MlGcrRFMe920P3fSW0+5mLnMQB t1uBbpm1xzsDQlk3DPX7W8RqXYdmraDwDz/BrmwpSeE7nGiD4/Vaqtu1A5jbIKbbgGnc w2iXwdKEr/i+N4rHFm8cM6u4wkyU3mzeuOpnoO97TwUr0uZzLckk6kGXkC9AvnYV100p 5/O6vJ71TmxzfXOy4yixG8wipt2+OhL35OU0gObik5nTXGFZtjrtZ4cWfJ/JFWIz5ykL oPPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=aG2htOr9Uf6dbb4+Zoi6Q9aAC+aG4RtBcEkYHws/5ZQ=; b=VPMp71eNNWATg5aqnKpWfVn+deJZfBWsEzB1Xe7kRbL/7gbJcl0MFsfLEIaH1JVmnW A4TwQEZWdipj6mrTTjvnMo0YCfDcscw0jD2QGtOiC133LR6SgL4dJYWzn0hOFnvz6N06 vVnsc9igfUmZ7fv+qa1EDVJIRQQxFmQuUyzR5QneJzlfGOep66FQ8taAR9R/ZO9bsAsX yMTNVR6ILJ+++NnLqc0Wbc1PuPi/wOi1GywR2Cab2d2U6VYdJBEzSLK1k7a0LKubv/zB B9dnoEOnbzhI0werUSp4BnhADylS1FUVj1YCX9ZjsEBaTweKa+m2j205kTZ2Xp8dej9n wl/Q== X-Gm-Message-State: AOAM531JkEM3egjweBvubwnAIwo6XUvFKdQ6SQvkTbAeI9i7BTevojw0 /XylU8fg6hYOnGP/ZzbPOE2wN0I/gJIR/1e6I9HtJMm9YQcPiDqdSqjamjqY6OZB5UpGpwGp0lw IBwZvzDaoryCcah8H2HYUuYKODK+QAdKQMzAeijQ4sgFnSE5Nztc6Twu+LxNlYMa5CZ/xBgDK8/ WRYG+EvEn/68ILARv95vob6ON5WGb2GcBCBEPrgXWFuBGz2uDyM0VG X-Google-Smtp-Source: ABdhPJy9Z8zk0PEgNG9WZES95PrbDOhWO7gCdgGWoTYQXej2XYq2loJeFlIPFy5AimojF1wD5rfO7Q== X-Received: by 2002:a05:6402:1650:: with SMTP id s16mr16693669edx.193.1640018416080; Mon, 20 Dec 2021 08:40:16 -0800 (PST) Received: from [10.137.0.18] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id lg17sm3558922ejb.194.2021.12.20.08.40.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Dec 2021 08:40:15 -0800 (PST) Message-ID: Date: Mon, 20 Dec 2021 17:40:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: sequences vs. synchronous replication Content-Language: en-US To: Peter Eisentraut , Tom Lane Cc: PostgreSQL Hackers References: <712cad46-a9c8-1389-aef8-faf0203c9be9@enterprisedb.com> <1452362.1639803168@sss.pgh.pa.us> <38a6a779-ee8d-de3c-fbd7-709285be88fa@enterprisedb.com> <7869761b-fdc7-6f7d-dc95-9ba8315a8ecf@enterprisedb.com> <1637476.1639862832@sss.pgh.pa.us> <8e24a470-b092-3c9f-0614-acd9df3f724f@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/20/21 15:31, Peter Eisentraut wrote: > On 18.12.21 22:48, Tomas Vondra wrote: >> What do you mean by "not caching unused sequence numbers"? Reducing >> SEQ_LOG_VALS to 1, i.e. WAL-logging every sequence increment? >> >> That'd work, but I wonder how significant the impact will be. It'd bet >> it hurts the patch adding logical decoding of sequences quite a bit. > > It might be worth testing.  This behavior is ancient and has never > really been scrutinized since it was added. > OK, I'll do some testing to measure the overhead, and I'll see how much it affects the sequence decoding patch. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company