Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKH7e-0004Jj-Lr for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2020 07:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKH7d-000259-HU for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2020 07:52:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKH7d-00024y-Ah for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2020 07:52:13 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jKH7a-0000Tb-La for pgsql-hackers@postgresql.org; Fri, 03 Apr 2020 07:52:11 +0000 Received: by mail-wm1-x341.google.com with SMTP id a81so6581035wmf.5 for ; Fri, 03 Apr 2020 00:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jFOctIQCe2gCPNlnpsl+dTCWf1DFrJ48GUSjb61RelI=; b=LJNgNw5avaE3emUNsEpF96tfxZcTsjwATpKoG6AXQM+rmsTDrpkHfhvx7Rsw6PFMsj xNZ9aoAo9AgZ9w9+i/bWlQOI2bb5IRCdFvaiUC4nP3Jx5CG6pGZhrkB2TfjSb8WMoY9x i6l0N7/JwvFJIBmgOb3TiAAQwBOyQ3gu7TPY6KMJrUNlUO+tjc/AQWBpRclB0VfAAmXC 4PJJ1nv8zHh2Q+M4mNE/l7Z0i3oD8ekfZnZBSh1hJXCgvUw3ohqR8De1V3fE0TPUVec9 4fnxb45/5IDUzu/9QjmWrdn5gQjkXzj/qboB9zioibJDM9kZK8d9aQZiIycNXyjZEGtO 7b2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jFOctIQCe2gCPNlnpsl+dTCWf1DFrJ48GUSjb61RelI=; b=P4h9fcJsqhDNMn8HIAHR56f86joDOg+s1X6ry1IfdL/vc4TKGOZAzZc4pbwMMP3uao KhDBsQEsIAmBESMD1UMWS4KwjuQZLfeoKlW9gLukxxe4QytiT9HWVLj2ifkijhx3EZcI bE2QCoWxg30d0vEeRmQNWf6q5El4XhDB1OnCVZn71pDPB8N3CTkS2ATZZ4joFbAnTHeL C2cTshyDunVTwlFNBPceOIzOvOaJglx8F0rTCNGLezQtTL831IhJGiqGvrRhUTq4I0r9 xs/vvqdl136NqtYT4IVdBnwAq9yctZdZEDuy5JVt6+2AChVcctMPQML7SNN019uwnP3v O2Jg== X-Gm-Message-State: AGi0PuaNXEs6mkNyFZEbkVUcEquvka3tkMCpRkvEXLMoFA7+KqcDchq8 +xrjEBERk8770+1nFSW5zp18/AoRMKqyHJ2yM9bjwOwrqisHen5P1Bp0XUZUMAc22XLcUL1Wa21 U7xGRTXfUfmZQ112FJZ7VGAUVbjkmLiy1Ctk3/AIyE/krq2eA/PMbVriL76Zzm78P5ktAmVic0C L+VgI= X-Google-Smtp-Source: APiQypK/+E7dfZogA2WYYn+hoYAnR0YBuxmXfJ/i8lw/kDeFuGp/7u2Ke4uyOsv6+0UWcw4JEi5rAA== X-Received: by 2002:a1c:9912:: with SMTP id b18mr7140568wme.76.1585900328883; Fri, 03 Apr 2020 00:52:08 -0700 (PDT) Received: from ?IPv6:2a02:8308:13b:9400:54a1:714f:b878:5d89? ([2a02:8308:13b:9400:54a1:714f:b878:5d89]) by smtp.gmail.com with ESMTPSA id t81sm10263173wmb.15.2020.04.03.00.52.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Apr 2020 00:52:08 -0700 (PDT) Subject: Re: adding partitioned tables to publications To: Peter Eisentraut , Amit Langote Cc: Rafia Sabih , PostgreSQL-development References: <73a1877a-6f1d-9f2e-da51-bc2eb57e07d5@2ndquadrant.com> <4f999141-97c8-c968-a726-0a1ec3e36e47@2ndquadrant.com> From: Petr Jelinek Message-ID: Date: Fri, 3 Apr 2020 09:52:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <4f999141-97c8-c968-a726-0a1ec3e36e47@2ndquadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 02/04/2020 14:23, Peter Eisentraut wrote: > On 2020-03-30 17:42, Amit Langote wrote: >> I have updated the comments in apply_handle_tuple_routing() (see 0002) >> to better explain what's going on with UPDATE handling.  I also >> rearranged the tests a bit for clarity. >> >> Attached updated patches. > > Also, the coverage report reveals that in logicalrep_partmap_init(), the > patch is mistakenly initializing LogicalRepRelMapContext instead of > LogicalRepPartMapContext.  (Hmm, how does it even work like that?) > It works because it's just a MemoryContext and it's long lived. I wonder if the fix here is to simply remove the LogicalRepPartMapContext... > I think apart from some of these details, this patch is okay, but I > don't have deep experience in the partitioning code, I can just see that > it looks like other code elsewhere.  Perhaps someone with more knowledge > can give this a look as well. > FWIW it looks okay to me as well from perspective of somebody who implemented something similar outside of core. > About patch 0003, I was talking to some people offline about the name of > the option.  There was some confusion about using the term "schema". How > about naming it "publish_via_partition_root", which also matches the > name of the analogous option in pg_dump. > +1 (disclaimer: I was one of the people who discussed this offline) -- Petr Jelinek 2ndQuadrant - PostgreSQL Solutions for the Enterprise https://www.2ndQuadrant.com/