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 1qFaqT-0002Dq-40 for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Jul 2023 13:41:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qFaqQ-0007Va-Ja for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Jul 2023 13:40:58 +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 1qFaqQ-0007VP-9y for pgsql-hackers@lists.postgresql.org; Sat, 01 Jul 2023 13:40:58 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qFaqM-001Zs1-8v for pgsql-hackers@lists.postgresql.org; Sat, 01 Jul 2023 13:40:57 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-51d9c71fb4bso2828539a12.2 for ; Sat, 01 Jul 2023 06:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1688218850; x=1690810850; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=twcYOEnpS0Rb/BEpWKhCk8RZCWgf1I+8IYA7fg4mrFc=; b=RKTQnW7L9+NfVC36B2px7PHtggvWB/GLxEO4c0uzXqiw5O6V2Hxo3KrpVQqvxT6oOB QA7CSFFGtGk+KSt9Yp5cTLLkew/7saDOwHmwLenYoZiQm2EIks1Wj5uDf+obQ//hKGJP qNsIXCze0X9AX9ekH9V6CKuulr0z3NazkMCKuutIeNVEeHewriaTphLZ4/26GS4s2bpf Dp9rwF6eaR2nl4JXt7W3bP7t/UTXk12hquserzSxBEYZG35uH4qg6TVstbq8ttqf/oew 2CEoL3ZY4a39CZCh5M5t1SX89PBYDk1nIZSoMwlhqcVcbPN52XForuAEclegfA4f7qpt YpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688218850; x=1690810850; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=twcYOEnpS0Rb/BEpWKhCk8RZCWgf1I+8IYA7fg4mrFc=; b=Q1SetXmQtv78qRWQjVCX13iCvIhdnlqJQc8PK5oJnokTcOw9ELntAiuwj1GsIPdq0i HDCH1tLX784dzToFdjUZR5+wstZr4oN8ZcO3S7rCZTScO/QGPKNVcoZKEIELoYBuANJT FzGhdgG51NXBWQaKT/DJm3dNigIZ4cwltKL2m9UM/IfsJ6szv/0pwzYWP/wiwRovcTgU WtV3cnjqWdzZtFGBII/D/R8Gf5S60Xoz925f92dCkoPubaHa6jxI0Ppv8sXSB55yubqh pgMfSZ5AjPqez2uosqGGFdOYCqPDmknCrDkYvu3ulr8tJ5SAhZHcQvZIaoUm86u/NXVA zUpw== X-Gm-Message-State: ABy/qLaWwFp0YPPsghZ+P1yuiglojzWM40iPHOtDBJam8TnicGGjngrN 9ol49Goqrfy6Khiyt2Gv6XiviEPoFxFe2Wbn/QME5MVrlOhKL3rO7AYVD1w2j0bgKjTELfzDOeu 9FIe7OZlugqdZdHG0wSuaBqrXQcusGEUe6BJfOQsGzxEhosrpydEeOQZLzeRXmQT+sJZzdz3w+e 01IZD+/r+I+rSELB910B0qCkNzAw== X-Google-Smtp-Source: APBJJlHzJczCxPzbZBQw1q8CoPdl9oh1ztcmvuH9GVEhUZXIO50Ye9Urh5bz5P/OJQPuG5irsP5m6Q== X-Received: by 2002:aa7:db42:0:b0:51d:b964:814a with SMTP id n2-20020aa7db42000000b0051db964814amr3701996edt.34.1688218850100; Sat, 01 Jul 2023 06:40:50 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-228-220.bb.vodafone.cz. [86.49.228.220]) by smtp.gmail.com with ESMTPSA id oz31-20020a170906cd1f00b0098d15d170a0sm9242626ejb.202.2023.07.01.06.40.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jul 2023 06:40:49 -0700 (PDT) Message-ID: <6a1df56e-4656-b3ce-4b7a-a9cb41df8189@enterprisedb.com> Date: Sat, 1 Jul 2023 15:40:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: PostgreSQL Hackers Cc: Thomas Munro From: Tomas Vondra Subject: possible bug in handling of contrecords in dd38ff28ad (Fix recovery_prefetch with low maintenance_io_concurrency) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I think there's some sort of bug in how dd38ff28ad deals with contrecords. Consider something as simple as pgbench -i -s 100 and then doing pg_waldump on the WAL segments, I get this for every single one: pg_waldump: error: error in WAL record at 0/1FFFF98: missing contrecord at 0/1FFFFE0 This only happens since dd38ff28ad, and revert makes it disappear. It's possible we still have some issue with contrecords, but IIUC we fixed those. So unless there's some unknown one (and considering this seems to happen for *every* WAL segment that's hard to believe), this seems more like an issue in the error detection. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company