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 1sR8Zt-00DUYr-SX for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 11:00:10 +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 1sR8Zs-00Etum-IV for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jul 2024 11:00:08 +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 1sR8Zs-00Etue-8g for pgsql-hackers@lists.postgresql.org; Tue, 09 Jul 2024 11:00:08 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sR8Zp-001Bmt-HO for pgsql-hackers@lists.postgresql.org; Tue, 09 Jul 2024 11:00:07 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52eafec1e84so1964212e87.0 for ; Tue, 09 Jul 2024 04:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720522803; x=1721127603; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6Z3QuH66q1wVduNITjAHwDuaHkI0Im0MiCz6RCAS6F8=; b=HWJZND1OqXQSV/aEcMFFXZLTZOkHCJxIn8wwXIEjJx2JEcHhwSjWbA5ZMVj6MD2bCJ eqxwqeuN0UH+xtMR6VE559meVaKRWyR0PvC1y7TYiPvCxx71AzkFeMBUAH8MYdy+l5/0 g9D4btk9bUnVlBnBQ+P032MS3ln6peR1JLVekkJxpyh8MMhY/FlsBiJ5m5pUBk8S7BrU JUCXjJsYzUwEYxubtUORWC/fpUOZUHrkeAIXbmxbOKNBfqZz8ksbinxrBhQByVpKDyGP snkNAXxWVXKTdi3PmfOMP/vV6cfxuKtAJUj7uHBDmqWH+VOkejQB0QboKtDLGhzvJgQK naIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720522803; x=1721127603; h=content-transfer-encoding:in-reply-to:from:references:cc: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=6Z3QuH66q1wVduNITjAHwDuaHkI0Im0MiCz6RCAS6F8=; b=SMz2iJQ2LNm3HEUok2GY18/sCn5vv7P3UyQyIYtsVvLPRQbvNNezefWQ8jmgQ898pG Tnlcy3uUtNs3S8+nCy3I3yL+z4TwH9Tp78wblyP86Mue+w+eJmPCK1/P10mK3CM4KG8H 5DhCNEqQFvWyuMrxFWAYeTflzv/L5PERyp4I4RO2PvRDo4hozXGCpelqJbYgNIVjYLLp 029ti2a9eFET8DxnSLFG8OsG4ey5YaFW30XbU7in4V/7Cfrrb1qWXEaFH1wJo+z6rRhm bfYXSH2d1vPOcAryH3GeszWPATtdpHWOdk5LK7fTJ2Wb0cqfsbsvrmif3aMgXP4cuxwW nZJQ== X-Gm-Message-State: AOJu0YzxvXi9mvnZVxIUxKd/aaca83fqjg6qwiEF4Xbfmzop2n3YupTW pV6UdD3BopA7D7yDIOniE/zKd2JPRUYhcSKAQ/OISFrzc7Y4AksG X-Google-Smtp-Source: AGHT+IGDSYXuaKdmrOto7fi+IPtqyFcM8gX0DB53HqMpwxzGxQSesqkYm/NZ5W6qOzsF7KBI4UR1hQ== X-Received: by 2002:a05:6512:2309:b0:52c:8024:1db with SMTP id 2adb3069b0e04-52eb99d4ebamr1355939e87.63.1720522802466; Tue, 09 Jul 2024 04:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.22.46]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52eb9061c86sm207805e87.164.2024.07.09.04.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jul 2024 04:00:01 -0700 (PDT) Message-ID: Date: Tue, 9 Jul 2024 14:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: speed up a logical replica setup Content-Language: en-US To: Amit Kapila , "Hayato Kuroda (Fujitsu)" Cc: "pgsql-hackers@lists.postgresql.org" References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com> <2e86cf53-c806-49d2-9a10-1a1257776d1f@app.fastmail.com> <5da4b286-e570-4341-8262-92d763f6b1a4@app.fastmail.com> <776c5cac-5ef5-4001-b1bc-5b698bc0c62a@app.fastmail.com> <3c024250-3f13-4f4d-b8e9-55f176db4abf@eisentraut.org> <0dffca12-bf17-4a7a-334d-225569de5e6e@gmail.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Amit and Kuroda-san, 03.07.2024 14:02, Amit Kapila wrote: > Pushed 0002 and 0003. Let's wait for a discussion on 0001. Please look at another failure of the test [1]: [13:28:05.647](2.460s) not ok 26 - failover slot is synced [13:28:05.648](0.001s) #   Failed test 'failover slot is synced' #   at /home/bf/bf-build/skink-master/HEAD/pgsql/src/bin/pg_basebackup/t/040_pg_createsubscriber.pl line 307. [13:28:05.648](0.000s) #          got: '' #     expected: 'failover_slot' with 040_pg_createsubscriber_node_s.log containing: 2024-07-08 13:28:05.369 UTC [3985464][client backend][0/2:0] LOG: statement: SELECT pg_sync_replication_slots() 2024-07-08 13:28:05.557 UTC [3985464][client backend][0/2:0] LOG: could not sync slot "failover_slot" as remote slot precedes local slot 2024-07-08 13:28:05.557 UTC [3985464][client backend][0/2:0] DETAIL:  Remote slot has LSN 0/30047B8 and catalog xmin 743, but local slot has LSN 0/30047B8 and catalog xmin 744. I could not reproduce it locally, but I've discovered that that subtest somehow depends on pg_createsubscriber executed for the 'primary contains unmet conditions on node P' check. For example with this test modification: @@ -249,7 +249,7 @@ command_fails(          $node_p->connstr($db1), '--socket-directory',          $node_s->host, '--subscriber-port',          $node_s->port, '--database', -        $db1, '--database', +        'XXX', '--database',          $db2      ],      'primary contains unmet conditions on node P'); I see the same failure: 2024-07-09 10:19:43.284 UTC [938890] 040_pg_createsubscriber.pl LOG:  statement: SELECT pg_sync_replication_slots() 2024-07-09 10:19:43.292 UTC [938890] 040_pg_createsubscriber.pl LOG:  could not sync slot "failover_slot" as remote slot precedes local slot 2024-07-09 10:19:43.292 UTC [938890] 040_pg_createsubscriber.pl DETAIL:  Remote slot has LSN 0/3004780 and catalog xmin 743, but local slot has LSN 0/3004780 and catalog xmin 744. Thus maybe even a normal pg_createsubscriber run can affect the primary server (it's catalog xmin) differently? One difference I found in the logs, is that the skink failure's regress_log_040_pg_createsubscriber contains: pg_createsubscriber: error: publisher requires 2 wal sender processes, but only 1 remain Though for a successful run I see locally (I can't find logs of successful test runs on skink): pg_createsubscriber: error: publisher requires 2 wal sender processes, but only 0 remain [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2024-07-08%2013%3A16%3A35 Best regards, Alexander