Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9CsS-0001rz-IM for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Sep 2019 18:34:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9CsQ-0003JC-Mg for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Sep 2019 18:34:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9CsQ-0003J5-De for pgsql-hackers@lists.postgresql.org; Sat, 14 Sep 2019 18:34:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9CsO-0002jF-4T for pgsql-hackers@lists.postgresql.org; Sat, 14 Sep 2019 18:34:30 +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 x8EIYL0B031836; Sat, 14 Sep 2019 14:34:21 -0400 From: Tom Lane To: Amit Khandekar cc: Robert Haas , Tomas Vondra , Alvaro Herrera from 2ndQuadrant , PostgreSQL Hackers Subject: Re: logical decoding : exceeded maxAllocatedDescs for .spill files In-reply-to: References: <20190911125140.GA21034@alvherre.pgsql> <20190912093055.exeatfemzr3f25yx@development> <7005.1568391272@sss.pgh.pa.us> Comments: In-reply-to Amit Khandekar message dated "Sat, 14 Sep 2019 20:35:25 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31834.1568486061.1@sss.pgh.pa.us> Date: Sat, 14 Sep 2019 14:34:21 -0400 Message-ID: <31835.1568486061@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Khandekar writes: > On Fri, 13 Sep 2019 at 22:01, Robert Haas wrote: >> On Fri, Sep 13, 2019 at 12:14 PM Tom Lane wrote: >>> Again, though, the advice that's been given here is that we should >>> fix logical decoding to use the VFD API as it stands, not change >>> that API. I concur with that. >> A reasonable position. So I guess logical decoding has to track the >> file position itself, but perhaps use the VFD layer for managing FD >> pooling. > Yeah, something like the attached patch. I think this tracking of > offsets would have been cleaner if we add in-built support in VFD. But > yeah, for bank branches at least, we need to handle it outside of VFD. > Or may be we would add it if we find one more use-case. Again, we had that and removed it, for what seem to me to be solid reasons. It adds cycles when we're forced to close/reopen a file, and it also adds failure modes that we could do without (ie, failure of either the ftell or the lseek, which are particularly nasty because they shouldn't happen according to the VFD abstraction). I do not think there is going to be any argument strong enough to make us put it back, especially not for non-mainstream callers like logical decoding. regards, tom lane