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 1iXQRH-0002xX-OU for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2019 13:54:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXQRF-0005s7-CX for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2019 13:54:33 +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 1iXQRF-0005rz-3U for pgsql-hackers@lists.postgresql.org; Wed, 20 Nov 2019 13:54:33 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXQR7-0003bW-6Q for pgsql-hackers@lists.postgresql.org; Wed, 20 Nov 2019 13:54:32 +0000 Received: by mail-qt1-x842.google.com with SMTP id 30so28955873qtz.12 for ; Wed, 20 Nov 2019 05:54:24 -0800 (PST) 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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=VsIjZ9E1ktn/eZqEu4N7m3YHb7U/2wIFI4bHOwrgTVg=; b=DofQYozPm541Z0Wzkv65l9YBhCKyIIcuO9N80SzYchv7c2Q6Ycw/kudJ1Kd6hgE8uh UrdESIluY4e8SeVQChtxOaYUixsn3ayLlt0OH+2Uh0EkOzOpxVHiAYJ0KYP/sR+zEM/e fFyKmLvWGJH4RDvs+ft2X65karFKhZy/9bQssmHHk20ZtCy/JRAzXjGeOBd9782LSH93 dus9vm0Aqn/YZMLaLjKWlVJw6jMr2T4WJcQpR0Y5ODxR2VV6dI/5ypRoE+yWeuUB+Ft6 2Xmym0RTLFJmvPiQBuCKpVX44bhZlICAp3neEh+PW4ikA2iLQF3wcbM+G9Upjbwm5Bv4 uanQ== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VsIjZ9E1ktn/eZqEu4N7m3YHb7U/2wIFI4bHOwrgTVg=; b=pAKhQ0EfFZYl9bXCPRNT5i+I7lRJd7smHQp/+yGui8dXHmZDCtULu550DlvFvP5bqr skGfO5mm1PaJwTEOxzWlKoY7dtM8cmK+Et/wpdZc8f/T/ab4rJfyO+iltip9GsQksm7o KJmb9sZ4eCKBB4Y1fLZGPZ+fYHkfD8mJi3y4REWmIFpeH5R+ZPQzkntLIZplYxLmAajt VbLkxwdRwTRi2nmIOGDOf0qmSqJjrdDzRli8pVjggcqMnEnvg0Ttp34GO9m7AClQKbYP 2+iQL3wTgjoQoTsTaNbzSVORVCdXcWde4gWAIZ+v4tsKbRI+LcfMDEtNI0Xu4nDguCoE NFjA== X-Gm-Message-State: APjAAAVeWbNcYspja6vQZ/F2ucUkhGJQO5/UbFHQlcpc7eCsL0ZknhWU 53mn5um3SDp4eBRT36f8WLFQGw== X-Google-Smtp-Source: APXvYqygwTHG6soHPciKwFoGHK9TUU0MlIoSJPN0Wxvjyi4c+rCRlg7tJ2lt5JPy6JgyUkf8zHJnZA== X-Received: by 2002:ac8:e03:: with SMTP id a3mr2677188qti.169.1574258062526; Wed, 20 Nov 2019 05:54:22 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([70.32.0.115]) by smtp.gmail.com with ESMTPSA id 23sm11863782qkj.52.2019.11.20.05.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 05:54:22 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 740643006BC; Wed, 20 Nov 2019 10:54:11 -0300 (-03) Date: Wed, 20 Nov 2019 10:54:11 -0300 From: Alvaro Herrera To: Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha Cc: Amit Khandekar , Amit Kapila , Andres Freund , Tom Lane , Thomas Munro , Robert Haas , Tomas Vondra , PostgreSQL Hackers Subject: Re: logical decoding : exceeded maxAllocatedDescs for .spill files Message-ID: <20191120135411.GA10316@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Nov-20, Juan José Santamaría Flecha wrote: > I was not able to reproduce the Permission denied error with current HEAD, > until I opened another CMD inside the "pg_replslot/regression_slot" folder. > This will be problematic, is the deletion of the folder actually needed? Yes :-( The code assumes that if the directory is there, then it's valid. Trying to remove that assumption is probably a more invasive fix. I think ReplicationSlotDropAcquired is too pessimistic (no recourse if the rename fails) and too optimistic (this will almost never happen). We could change it so that the rename is retried a few times, and avoid the failure. (Naturally, the rmtree should also be retried.) The code seems written with the POSIX semantics in mind, but it seems easy to improve. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services