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 1pmSaZ-0007ij-Gy for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Apr 2023 05:00:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmSaY-0005fL-7d for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Apr 2023 05:00:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmSaX-0005fC-SG for pgsql-hackers@lists.postgresql.org; Wed, 12 Apr 2023 05:00:09 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pmSaT-0004Y2-Ok for pgsql-hackers@postgresql.org; Wed, 12 Apr 2023 05:00:08 +0000 Received: by mail-lf1-x135.google.com with SMTP id i26so13506905lfc.6 for ; Tue, 11 Apr 2023 22:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681275603; 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=tRfGTj5OXZvUxvwpUhzIzCADitkpfmAgy5RHmL83Ixg=; b=nJWZoVxsG7PXzMwmkSFZIQs7VlYXoVMn/ZmY964udn00EU9upmf6iGarObwxKoP0Xb xvh3jzqQE59PunuMnWvrdHHGWGns9/heSSqf3VPruF+pHS8I72Xarm9/rWzb2elzBhRW UNBtGkWhj4AlRggtF04KsH030ghu/3pY8pKXxGwJ59k+o3RO8M62qOflzTjFsM3/ua2n n/i7hhTcb7MLVRjLGIRUMMTeU3PwkmG4d6x99ZmSYLXOiiUt+gWO/ppdd8ct6gZvxjZo 28ND2beFy09azWAxp287CFelsEUaR9p0gfTSAGDrmdKrNlFbsNmboJLM+i+lkhT+psjj djzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681275603; 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=tRfGTj5OXZvUxvwpUhzIzCADitkpfmAgy5RHmL83Ixg=; b=vZH8S4Kg8LlPoDASOu3hZL/y09zSZVDA+JJAZDxp7ff4GnR/0i9XyOqcVM5VpZ7HnA behwJLso8ZZ3UHaWc2mC2eICOX5ZepbUkKYCEr6d6OICyF7xInLsj0B62XhLyUliQVDE EZA/Dbo0WP8Ld2SvIrfi7eQIWBORNkbw67x1DaspwhsQ+VfucqbW614ebUYEZhcgUjI+ bRKNG/0CNnocLA/at0x6gYsoCqY1yS9wOYq0tAUCLGpnbdArBuw1U4ed8i8eqf2k35ck eHrh2RoO/3qwRx/fbBeZPlJZ0WOEToKuhfCQT0CN4m/wri5ShjI1Sn4UY211Cu9SYXft I4xw== X-Gm-Message-State: AAQBX9fDcKQtthJOC0C2zihn07iJT9fOmUGV1V/gKikGiFZkVJPnTAoK Tf1ScTLQSO5AG9g+ra6EWBw= X-Google-Smtp-Source: AKy350bXHbvwRL4myb0ozc++e+09y+uxw6N3GYe+IFizJO/53mc0MnIlwK1vBXXrtimTIXBDqLuufQ== X-Received: by 2002:a05:6512:3c3:b0:4ec:9fe9:fea9 with SMTP id w3-20020a05651203c300b004ec9fe9fea9mr178023lfp.56.1681275602803; Tue, 11 Apr 2023 22:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.30.94]) by smtp.gmail.com with ESMTPSA id f6-20020ac25326000000b004b40c1f1c70sm2846100lfh.212.2023.04.11.22.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 22:00:02 -0700 (PDT) Message-ID: <8204503e-1c75-9d3c-8b4f-30af42a0aee0@gmail.com> Date: Wed, 12 Apr 2023 08: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: refactoring relation extension and BufferAlloc(), faster COPY Content-Language: en-US To: Andres Freund , Tom Lane Cc: Melanie Plageman , Kyotaro Horiguchi , Heikki Linnakangas , Alvaro Herrera , vignesh C , pgsql-hackers@postgresql.org, Thomas Munro , Yura Sokolov , Robert Haas References: <20230329034754.elzpfwacqmapv6pj@awork3.anarazel.de> <20230330010342.rxyr5wm6szkt42wq@awork3.anarazel.de> <20230330030233.j7wsqcsvptnsniuc@awork3.anarazel.de> <20230405003945.77fsb4ct47xqoglc@awork3.anarazel.de> <20230406014616.rceit67ndlsqpnx3@awork3.anarazel.de> <20230407011514.mhffy3veft6pwhr4@awork3.anarazel.de> <20230407083911.qhjl3am6qh7vyi5l@awork3.anarazel.de> <0b5eb82b-cb99-e0a4-b932-3dc60e2e3926@gmail.com> <20230411232103.ycmsxs6bmtllmjki@awork3.anarazel.de> From: Alexander Lakhin In-Reply-To: <20230411232103.ycmsxs6bmtllmjki@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 12.04.2023 02:21, Andres Freund wrote: > Hi, > > On 2023-04-11 22:00:00 +0300, Alexander Lakhin wrote: >> A few days later I've found a new defect introduced with 31966b151. > That's the same issue that Tom also just reported, at > https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us > > Attached is my WIP fix, including a test. Thanks for the fix. I can confirm that the issue is gone. ReadBuffer_common() contains an Assert(), that is similar to the fixed one, but it looks unreachable for the WAL replay case after 26158b852. Best regards, Alexander