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 1lroI2-00079c-2D for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 21:02:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lroI0-0007GW-Vx for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 21:02:04 +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 1lroI0-0007GI-KE for pgsql-hackers@lists.postgresql.org; Fri, 11 Jun 2021 21:02:04 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lroHy-00053b-4O for pgsql-hackers@postgresql.org; Fri, 11 Jun 2021 21:02:03 +0000 Received: by mail-wm1-x32c.google.com with SMTP id d184so8764349wmd.0 for ; Fri, 11 Jun 2021 14:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6Y67xTG5tJskRaca96oibfX/ykleyCbKBV92sDB40ns=; b=EIN/VebMox7BLBRZ5YxckC2Uh9K4EZNXi13DXD9ycI0P8lkYETqijSzyHBRpV4HFGe 87LtBUM92NslIRgrFZRujP2KivCsseMiytvrREL6lpkbzBXW0a56nkIYRmbwbum5MtWJ Wc5TUmk9d7n6aavqRy6Bu/J9F13TrAMPnm3COsNMURxwGOpururzhoj2hD+5scxrw99A EyIVpT8WXLyyyxPbvkXSumaQKGjDndnDv31O270XTelrVx85IokYn0mPFV3MkS/ok6Uo QoyG9XVJ1ip3VV8kBq1gn5WuBsCXrdqvFJdKKbqc3VQRRRf7RZYFdQnm7FO1z2T0/Q3f hdMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6Y67xTG5tJskRaca96oibfX/ykleyCbKBV92sDB40ns=; b=fE07WGC5DWm2ho2BZ3E9sycyPQh5iy+s0SLe8L/hbPyd5DYG5vHAy6+wUJXzDKq2Md U/vB9tXpOAKoIN+UTeYq104b/HczXzp43ZSb13hZgR8844GsAEpDEd9TJqSRZ+2EzOR3 0aIxtChP0lsjTdODegxw60w45dzVsC9WaVV4j6aTjn+KQgyAwhx1+5y5qiL5Blau035f BrGbRdKwo2YxeRfMYumbpFZwxQEAq3RJoqUl26uZvZnndCI/xu4X14YxJ5Ob+vq0JAWp nuYNqQ5UVVLwAJPL8dBo5sd/j6rx7xygRl72PfMmmsJkAuf15eJ+n0nEEoJcA35BD8nq qjLw== X-Gm-Message-State: AOAM5319RITNJhUG+ijMtG82Ca5bTnss/mzfV8ES2mUxEzo/z6XGsyAe Z3ZwHlibWCVuhHLvTVPJUoGnkdw6zFDaxWFikS0wwLRJzKXmstedLyeLFGTuJXOjYSfoWzstTcC JEerl8hsUIj63+CXqrlnUzNzsSomv1fph98iW+Tyj0Yq7YuJCtyzP+n5ighz3h2NsPGuENuHq/Y OAkTnZH5Otfe9XxYuhN/VcCpOSq8KKDtKfJktJ99+jITi8NZ67628qsZXxAunRRBSVqIAnCN+h/ glhGqrSucZXIHAYUCMsqfryR7nT5C2SmHReZvq/ X-Google-Smtp-Source: ABdhPJxFQnj5sZo5aQRVKFFxiA8S2zsm29GI2gd6g/2oXV9JLPzXKdRSXwcdrcilCHyuYg9OUZeeHQ== X-Received: by 2002:a7b:cc09:: with SMTP id f9mr5652962wmh.104.1623445320164; Fri, 11 Jun 2021 14:02:00 -0700 (PDT) Received: from [10.137.0.19] (ip-86-49-254-183.net.upcbroadband.cz. [86.49.254.183]) by smtp.gmail.com with ESMTPSA id p10sm7885031wrr.33.2021.06.11.14.01.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Jun 2021 14:01:59 -0700 (PDT) Subject: Re: postgres_fdw batching vs. (re)creating the tuple slots From: Tomas Vondra To: Bharath Rupireddy Cc: Tom Lane , Andres Freund , PostgreSQL-development References: <20210530205831.vib4p7mt23cymhpc@alap3.anarazel.de> <2399204.1622409059@sss.pgh.pa.us> <20210530212616.5k5nxnbunwnwet2a@alap3.anarazel.de> <2433405.1622416631@sss.pgh.pa.us> <4e7ebff8-59ac-c90c-3ecd-8d9dfdfc75ad@enterprisedb.com> <6dc1c07b-87e6-63e6-10b3-cca4698361fb@enterprisedb.com> Message-ID: Date: Fri, 11 Jun 2021 23:01:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 6/9/21 1:08 PM, Tomas Vondra wrote: > > > On 6/9/21 12:50 PM, Bharath Rupireddy wrote: >> On Wed, Jun 9, 2021 at 4:00 PM Tomas Vondra >> wrote: >>> >>> Hi, >>> >>> Here's a v2 fixing a silly bug with reusing the same variable in two >>> nested loops (worked for simple postgres_fdw cases, but "make check" >>> failed). >> >> I applied these patches and ran make check in postgres_fdw contrib >> module, I saw a server crash. Is it the same failure you were saying >> above? >> > > Nope, that was causing infinite loop. This is jut a silly mistake on my > side - I forgot to replace the i/j variable inside the loop. Here's v3. > > regards > FWIW I've pushed this, after improving the comments a little bit. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company