Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1foUgX-00045I-R5 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Aug 2018 14:16:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1foUgV-0005zo-SO for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Aug 2018 14:16:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1foUgV-0005zg-I3 for pgsql-hackers@lists.postgresql.org; Sat, 11 Aug 2018 14:16:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1foUgT-00086I-3k for pgsql-hackers@postgresql.org; Sat, 11 Aug 2018 14:16:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7BEFuYc006900; Sat, 11 Aug 2018 10:15:56 -0400 From: Tom Lane To: Tomas Vondra cc: Andres Freund , Alvaro Herrera , PostgreSQL-development Subject: Re: logical decoding / rewrite map vs. maxAllocatedDescs In-reply-to: <79a0c7f4-89fb-cf8d-82eb-5a7ca8e08d56@2ndquadrant.com> References: <20180809174746.aa6rbpsu4zjipzif@alvherre.pgsql> <20180810211340.nlgyfa7jlmkjcs5m@alap3.anarazel.de> <79a0c7f4-89fb-cf8d-82eb-5a7ca8e08d56@2ndquadrant.com> Comments: In-reply-to Tomas Vondra message dated "Sat, 11 Aug 2018 15:43:55 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6898.1533996956.1@sss.pgh.pa.us> Date: Sat, 11 Aug 2018 10:15:56 -0400 Message-ID: <6899.1533996956@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: >>> On 08/09/2018 07:47 PM, Alvaro Herrera wrote: >>>> Actually, it seems to me that ApplyLogicalMappingFile is just leaking >>>> the file descriptor for no good reason. > I think the fix can be as simple as attached ... I'm mostly afk for the > weekend, so I'll commit & backpatch on Monday or so. LGTM. While you're at it, would you fix the misspelling three lines below this? * Check whether the TransactionOId 'xid' is in the pre-sorted array 'xip'. ^ regards, tom lane