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 1i8n14-0003Xm-3J for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2019 14:57:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8n12-000300-GS for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2019 14:57:40 +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 1i8n12-0002zp-7Q for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2019 14:57:40 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8n0z-0003sB-FS for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2019 14:57:39 +0000 Received: by mail-wm1-x343.google.com with SMTP id g207so3111385wmg.5 for ; Fri, 13 Sep 2019 07:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BgVJ5SdGJoCPJvcbePEQuyLFwSm1xVVRZVAzpUw3vg0=; b=NeEvhwnExKR9niJhejcdcZ1tBbnp6g6Ukrv3ehViZzV1HgNaKTnYlBNdxgPrt864j6 p6TOseUqljo5Ct6sFqSN6Hp7atLqAVYH8M6tuYKvQu8RFU5+hW8BsD9FsFRdFH3FAOEW 5RVhgHHKW1TIvKYzh+4dL1j91SrwX1ePo5fYd/F67Sq2HONAhJbuSOEoZWjwzbjSa9+O a5nG2PnbuNjOzPoDDBnM6TN4l+axJhz3JyTwB+uL+FFFOpSa4QBq5pwmVV+M9XNZEV1A vHb7nUuMU7m3T+zxudxkM8PtNxdh5pmPnteeAkKSAqe5rDSaS4ZNBz9sq7+ug4zoqVqs xgYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BgVJ5SdGJoCPJvcbePEQuyLFwSm1xVVRZVAzpUw3vg0=; b=pZL34h0SXu3N9VjvHAR/TFzE0H756VyQAAnWDXl2Kye3VW+VZFGRJadyEpG63AyNTx U+wn1sdjikUBybDhw3HkwsurgMpPd9lCjRD6HTcJMe9+uQA6uE9Pg3/HZ+rEA6E8lwu/ Xt0rMTt/OiAtEl9Mtqvp47m68a3fSQaKZC8azqGTBXHYz52k/20Z5FXrwKoL2mJ23AlX 8/ldn42T7/iU8YAHhSl9v5nO7agQ/Cnulz6K3xj33zLGK+ba2qUr++JRabD28w80Adzp QtlCd2liPCQNtCh7qodZscOKQm7T9A4M+km1BOBYMfc5QgbQUnWrpIUYcSkMETdrK9di swrg== X-Gm-Message-State: APjAAAVeyyjbLFUt/zclGfNriGmwc7BXyrEtTxIoRWHeBHXSYvkCi5Oa WtqYx8lpdW1MDLsA6ZX6EDKP5A== X-Google-Smtp-Source: APXvYqyiUoksnSlGGTYAJRgk/JbeyLcoqkcgWlbszqh6Y7TN0C8O+t6u7biuhGqGW6WjnNYAKjIVUA== X-Received: by 2002:a1c:9c96:: with SMTP id f144mr3941118wme.96.1568386656327; Fri, 13 Sep 2019 07:57:36 -0700 (PDT) Received: from localhost (ip-86-49-253-183.net.upcbroadband.cz. [86.49.253.183]) by smtp.gmail.com with ESMTPSA id v6sm4467641wma.24.2019.09.13.07.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2019 07:57:35 -0700 (PDT) Date: Fri, 13 Sep 2019 16:57:34 +0200 From: Tomas Vondra To: Andres Freund Cc: Alvaro Herrera , Amit Khandekar , PostgreSQL Hackers Subject: Re: logical decoding : exceeded maxAllocatedDescs for .spill files Message-ID: <20190913145734.mpesqes7yi6gtgau@development> References: <20190912093055.exeatfemzr3f25yx@development> <20190912125755.GA24047@alvherre.pgsql> <20190912183401.2yzfdxjmfycrdb3h@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190912183401.2yzfdxjmfycrdb3h@alap3.anarazel.de> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Sep 12, 2019 at 11:34:01AM -0700, Andres Freund wrote: >Hi, > >On 2019-09-12 09:57:55 -0300, Alvaro Herrera wrote: >> On 2019-Sep-12, Tomas Vondra wrote: >> >> > On Wed, Sep 11, 2019 at 09:51:40AM -0300, Alvaro Herrera from 2ndQuadrant wrote: >> > > On 2019-Sep-11, Amit Khandekar wrote: >> >> > > I think doing this all the time would make restore very slow -- there's a >> > > reason we keep the files open, after all. >> > >> > How much slower? It certainly will have a hit, but maybe it's negligible >> > compared to all the other stuff happening in this code? > >I'd expect it to be significant. > > >> > As a sidenote - in the other thread about streaming, one of the patches >> > does change how we log subxact assignments. In the end, this allows using >> > just a single file for the top-level transaction, instead of having one >> > file per subxact. That would also solve this. > >Uhm, how is rollback to savepoint going to be handled in that case? I >don't think it's great to just retain space for all rolled back >subtransactions. > The code can just do ftruncate() to the position of the subtransaction. That's what the patch [1] does. [1] https://commitfest.postgresql.org/24/1927/ regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services