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 1gQEBB-0002uB-NF for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Nov 2018 16:19:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gQEBA-00019S-9d for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Nov 2018 16:19:40 +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 1gQEB9-00019L-Qy for pgsql-hackers@lists.postgresql.org; Fri, 23 Nov 2018 16:19:40 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQEB6-0003HV-Md for pgsql-hackers@postgresql.org; Fri, 23 Nov 2018 16:19:38 +0000 Received: by mail-qt1-x843.google.com with SMTP id d18so10984234qto.8 for ; Fri, 23 Nov 2018 08:19:36 -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=py24x1eDqKSKmXfDYC33hjWmRNbLc7V7lIQDwjyIDZ4=; b=HeWT5blPMHJpR9zrSnCSyvmNjpc9a6n5/FMAWFfct6DKP0XDBToXDcdQCqM69y8bhO /DLCsbDK84VsVO8JWtSEYldcDvd+VxFYPYNVmXDo97gfhTX4jQSbDti8CLi3EJ2Sw3dd ckK3s4qPkwiP8aQi7cZeyGpEaX79TxIIxcqFREeYENHnwIRa8sJhEAeT2fAAjffBOO/+ vcZR41xP3MRWSokOt05ZV1elFJlPJJyUyYEMAhxy440xiAQ/nlDaTw/At6iJnkGTxhLR 55O0coYH4iJAmbaNLHTs4g0jEdIWZQYkBbz2jYO1MokkUqXfk67vIMqSXWpjsPMF906i 28dQ== 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=py24x1eDqKSKmXfDYC33hjWmRNbLc7V7lIQDwjyIDZ4=; b=Ex0fIKm5t3kCUm+9yqUbz6A2uykCrezrBOsDUpAkv26By0HZxHfp9W9tulY+QCzpH6 GxbPgXp3QzQOMm7Mn8sOvJ8Lz1dmHv91pYpbthl7n95zph8wINyb154InCzO2DKpmWrq J4sGwL/N9Z6KofdO40HiS1yOTjvzlC1t45YmhDBeFEHduFW0Ok4/aPDkJD5MFmotDSAq XJXgV30k0Aj5hQn8SZIulaZ1lW/7YzQl8piAAIV0DvpiLmS847TwcL698BHva6ts/Cni AjdLVu8bRuIjYHutbELe2SVITefiuR+XjKXJnNSQT8y5D6l5OQlRX8LtfX43KQ8oVTI8 8XfQ== X-Gm-Message-State: AGRZ1gIaH8eTpeQj0ua67ei2SfBaGqqvIJJi/+yc5XjEySBGCIRu0+r9 jvXMLoDJAKh0TwzTl4JhJP5aCw== X-Google-Smtp-Source: AJdET5c5LNH3LY+mY1V61cgydJyq+9KzHAFNu4M8XHHOvcCMk6xKCGHjbKXtMQrJC0PvBDJuWLiGhA== X-Received: by 2002:ac8:478f:: with SMTP id k15mr15092977qtq.281.1542989975985; Fri, 23 Nov 2018 08:19:35 -0800 (PST) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id c12sm28833051qka.42.2018.11.23.08.19.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 08:19:35 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 920696F4; Fri, 23 Nov 2018 13:19:33 -0300 (-03) Date: Fri, 23 Nov 2018 13:19:33 -0300 From: Alvaro Herrera To: Euler Taveira Cc: Petr Jelinek , pgsql-hackers , Suzuki Hironobu Subject: Re: row filtering for logical replication Message-ID: <20181123161933.jpepibtyayflz2xg@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: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Nov-23, Euler Taveira wrote: > Em qui, 22 de nov de 2018 ąs 20:03, Petr Jelinek > escreveu: > > Won't this leak memory? The list_free only frees the list cells, but not > > the nodes you stored there before. > > Good catch. It should be list_free_deep. Actually, if the nodes have more structure (say you palloc one list item, but that list item also contains pointers to a Node) then a list_free_deep won't be enough either. I'd suggest to create a bespoke memory context, which you can delete afterwards. -- Įlvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services