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 1rmXCX-008T9Y-Gb for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 11:00:14 +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 1rmXCV-00D05R-Hb for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 11:00:12 +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 1rmXCV-00D05J-3m for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 11:00:11 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rmXCR-005Izy-EU for pgsql-hackers@postgresql.org; Tue, 19 Mar 2024 11:00:10 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-513da1c1f26so6175397e87.3 for ; Tue, 19 Mar 2024 04:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710846007; x=1711450807; darn=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=CLA3fPYltDlzVp9yHCnFFn5gU1gQITTpsCjW7RbaD3k=; b=Dq77tCmCOKfcQMhWq04dhM37d3u8SAH8ey/MWLtE1fWfM1LihRneo5q0eyQCTcrGHD 9I6tIktEeP4CGdkdxaGFSP5b02rTbd8NtgOSdiZnw5sB9Kg1yMC8DZZhzWqRHzYS14FN kgmpDgvW3HOXvEFPJ36I4odQhjYIFR2NAJ8e9wyMLFRnHtUqljcuu+J/Xmy/iMir6+Rt 1FwtkkAICTxFBdr4njtIhANha5c1e9zzlOm4+dRRlFVGSCZnCvjPokzm3BNnoEV3wdm8 1sNZTrnoAdDZqg3e4ILSS9ZPuw8y0Z6AVJYYyV1z9F1kdv3ZECCWYPqt9Ey/lA0FSkdv zatg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710846007; x=1711450807; 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=CLA3fPYltDlzVp9yHCnFFn5gU1gQITTpsCjW7RbaD3k=; b=YqBAgZd80640t/z/hxXMYBHY9U9A81AyECftx3avNrnGIT57xPP9AdMTBRWWeHc6zg 2MdMYAYNzVVkUmt9YYy1Arr3VGJoRHyv4rMOsWk55kcFBhFcz6Pe4QEiXCz0Gogn+v4w AiS2MCaUAU/U5TUXwRjcxr7cZBhZKMlysmKjjXb/kIWqElv4w+qU1kIc3Z0ftF6FI8Jo inlhU29L1Zz7E4Se38nJ7y05sQg0djiahf0b2wuzNo3d2m5BDTt1hgtvyDkViK+MTehG vKSFkRUYzFCA+rWq0GO8GfdFjKiUhf4fbwZL4k371B1Gj1D96BUeRBnDSFWeVjLi3O8T 5G0Q== X-Forwarded-Encrypted: i=1; AJvYcCU0cIb0ra/YocUa2ig4wcNJ5WNXVcIsj5MbCT5JYn3I8YWDZi3xmuMb5H+Bss1NllQDWV4PlqZKrp+aUl8jJea7LLCv+4o2joAGDKY/ X-Gm-Message-State: AOJu0Yw/4FhEy/IJJ/taXtwcYbq2hROr6uZQdbrXTNasRnBBP4XXXBUU 9MGcFdldua+YwlONLO9rDa8WhbOtPtnirIU/fP3aHJu86wqi+YZ7 X-Google-Smtp-Source: AGHT+IH7pm3LzjEvsj3Qgyn1WVEL8OXdjzp1eZ6gZ3/ybSvuMn9sN2+28sR+tDd35GbFca7q8c7twQ== X-Received: by 2002:a19:770a:0:b0:514:a825:9e24 with SMTP id s10-20020a19770a000000b00514a8259e24mr2465215lfc.23.1710846006625; Tue, 19 Mar 2024 04:00:06 -0700 (PDT) Received: from [1.0.0.7] ([178.155.30.186]) by smtp.gmail.com with ESMTPSA id u19-20020ac25193000000b00513b4057a70sm1899312lfi.18.2024.03.19.04.00.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Mar 2024 04:00:03 -0700 (PDT) Message-ID: Date: Tue, 19 Mar 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: Recent 027_streaming_regress.pl hangs Content-Language: en-US To: Tom Lane , Thomas Munro , Andres Freund Cc: Michael Paquier , pgsql-hackers References: <2378342.1710449799@sss.pgh.pa.us> From: Alexander Lakhin In-Reply-To: <2378342.1710449799@sss.pgh.pa.us> 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 14.03.2024 23:56, Tom Lane wrote: > Thomas Munro writes: >> On Fri, Mar 15, 2024 at 7:00 AM Alexander Lakhin wrote: >>> Could it be that the timeout (360 sec?) is just not enough for the test >>> under the current (changed due to switch to meson) conditions? >> But you're right that under meson the test takes a lot longer, I guess >> due to increased concurrency: > What it seems to be is highly variable. Looking at calliphoridae's > last half dozen successful runs, I see reported times for > 027_stream_regress anywhere from 183 to 704 seconds. I wonder what > else is happening on that machine. Also, this is probably not > helping anything: > > 'extra_config' => { > ... > 'fsync = on' > > I would suggest turning that off and raising wait_timeout a good > deal, and then we'll see if calliphoridae gets any more stable. I could reproduce similar failures with PG_TEST_EXTRA=wal_consistency_checking only, running 5 tests in parallel on a slowed-down VM, so that test duration increased to ~1900 seconds, but perhaps that buildfarm machine has a different bottleneck (I/O?) or it's concurrent workload is not uniform as in my experiments. Meanwhile, I've analyzed failed test logs from buildfarm and calculated the percentage of WAL replayed before timeout. For instance, one of the failures: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-03-18%2022%3A36%3A40 standby_1.log: 2024-03-18 22:38:22.743 UTC [2010896][walreceiver][:0] LOG:  started streaming WAL from primary at 0/3000000 on timeline 1 ... 2024-03-18 22:50:02.439 UTC [2004203][checkpointer][:0] LOG: recovery restart point at 0/E00E030 2024-03-18 22:50:02.439 UTC [2004203][checkpointer][:0] DETAIL: Last completed transaction was at log time 2024-03-18 22:41:26.647756+00. 2024-03-18 22:50:12.841 UTC [2010896][walreceiver][:0] FATAL:  could not receive data from WAL stream: server closed the connection unexpectedly primary.log: 2024-03-18 22:38:23.754 UTC [2012240][client backend][3/3:0] LOG: statement: GRANT ALL ON SCHEMA public TO public; # ^^^ One of the first records produced by `make check` ... 2024-03-18 22:41:26.647 UTC [2174047][client backend][10/752:0] LOG:  statement: ALTER VIEW my_property_secure SET (security_barrier=false); # ^^^ A record near the last completed transaction on standby ... 2024-03-18 22:44:13.226 UTC [2305844][client backend][22/3784:0] LOG:  statement: DROP TABLESPACE regress_tblspace_renamed; # ^^^ One of the last records produced by `make check` \set t0 '22:38:23.754' \set t1 '22:44:13.226' \set tf '22:41:26.647756' select extract(epoch from (:'tf'::time - :'t0'::time)) / extract(epoch from (:'t1'::time - :'t0'::time)); ~52% https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-03-18%2018%3A58%3A58 ~48% https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-03-18%2016%3A41%3A13 ~43% https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-03-18%2015%3A47%3A09 ~36% https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-03-15%2011%3A24%3A38 ~87% https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2024-03-17%2021%3A55%3A41 ~36% So it still looks like a performance-related issue to me. And yes, fsync = off -> on greatly increases (~3x) the overall test duration in that my environment. Best regards, Alexander