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 1h8yQP-0006GM-KU for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 02:36:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8yQO-0003b0-E1 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 02:36:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8yQO-0003UG-0U for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2019 02:36:20 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8yQK-0002jL-Qv for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2019 02:36:18 +0000 Received: by mail-wr1-x442.google.com with SMTP id s15so16636550wra.12 for ; Tue, 26 Mar 2019 19:36:16 -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=Z2jsM6kfPlEBGdFaUFGTRI+jRQDosz/R7P68Qp+XK9s=; b=AXJj85Q3cynleAhBv3Ck6jPaXjOEBE6OdHf2Ne9MtMVRSh7QgG+FHIytQLcAKMy5DU 5Cjt6ezH3OVwb7E8pgeF4mVPkjFuHY5ynSV4O0qQnQVQXX6G/ep9TUjtZm1vO+J8H3Pj nrhkK+lm3SXnZxW0cHH7JU+GlGNnsrd+K1uZ0Chvlk7TaH6XCdhaNHyhz1NAjC0TpiJE kWN5mJnf+cdiFWAHFxVyZn/ooq5vgp67rzNzimAN22uGxYDTs5/c4k7CyGbNRhX+AKzn t6Vgy6cFNt9PceDljiaiIYOhDJnMqh310AumqCNbB7mPNX+JR+OQPpit93UyVSjialxV n/FQ== 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=Z2jsM6kfPlEBGdFaUFGTRI+jRQDosz/R7P68Qp+XK9s=; b=swUK2KKtXmvbVaL3gXBqMLrFqn2QEjbpfrWoaHl4RTXmmbxsXOGfNtzhqzgwksuG1F plbLLpGL1DCpczgbEqDDTXE5QlkYaLoHHNAou5CegpdXDo9w9QeSz0xonIKt9TmMKGfj Egu8RKKIkfBe2+agpPUbMdI66PJE5FNlYGdOWQSGzJu/bfDSdlHwKBjKygkmzxXOP0LN IwoHyQ2Czy5UgDPbePuk5zeEBow5CkroeDg+sP3cfA8xOOfoUxTN/jYJikwqe/07M8d2 knl4LktKGxiqeb0oYhOGUAU4J3p0TDCnL8soLGmLSZyJZLjm+sQbqgux8tQAReSf8VY8 9v2A== X-Gm-Message-State: APjAAAWTaq5I42RoYawvdPq9c5G3WSjmxDURVn90/CERYTG9ktiWACnY 5lrNGRRzvui4QTmDwqzMqZuDdA== X-Google-Smtp-Source: APXvYqxSFonlsPHr6fALqFnkuyxCE2r33NHTUE4owEsNupE2sh0T7mwt+CMsTqhIbWGZhZjhWA7fAQ== X-Received: by 2002:a5d:428f:: with SMTP id k15mr23219605wrq.113.1553654175147; Tue, 26 Mar 2019 19:36:15 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id i17sm7525562wrs.44.2019.03.26.19.36.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 26 Mar 2019 19:36:14 -0700 (PDT) Date: Wed, 27 Mar 2019 03:36:12 +0100 From: Tomas Vondra To: Alvaro Herrera Cc: Postgres hackers Subject: Re: performance issue in remove_from_unowned_list() Message-ID: <20190327023612.GC4406@development> References: <20190310200923.GA4108@alvherre.pgsql> <7c599eff-8125-091c-61ef-90e02aa57486@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4+135 (aae3e555) (2019-03-21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Mar 21, 2019 at 02:22:40AM +0100, Tomas Vondra wrote: > ... > >OK, so here is a bit more polished version of the dlist-based patch. > >It's almost identical to what I posted before, except that it: > >1) undoes the non-working optimization in DropRelationFiles() > >2) removes add_to_unowned_list/remove_from_unowned_list entirely and >just replaces that with dlist_push_tail/dlist_delete > >I've originally planned to keep those functions, mostly because the >remove_from_unowned_list comment says this: > > - * If the reln is not present in the list, nothing happens. > - * Typically this would be caller error, but there seems no > - * reason to throw an error. > >I don't think dlist_delete allows that. But after further inspection of >all places calling those functions, don't think that can happen. > >I plan to commit this soon-ish and backpatch it as mentioned before, >because I consider it pretty much a fix for b4166911. > Aaaaaand committed + backpatched. > >-- >Tomas Vondra http://www.2ndQuadrant.com >PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services