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 1q6USh-0001fE-Py for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 11:02:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6USg-0004C5-M2 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 11:02:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6USg-0004Bw-C3 for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 11:02:50 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q6USZ-000Z0h-MN for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 11:02:49 +0000 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-33c37f62e24so21968055ab.3 for ; Tue, 06 Jun 2023 04:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686049362; x=1688641362; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qieDcgf+zjbxEwQUoXKwx6OVhCnq04g5BSL0c8SsgBw=; b=ghzMEs1hd/XMiqC87mOFInu+jL2hXcyGh5LtpFigxLkAVxLsMp60VjQ7lAd81K6FkA DFSbSbUj0Bugz72XZeVotBJx71VzyG2rdo5FsWracmL9vxFlCZpLKXoQN7Ck+XXLPsuE 3eDegEJb7kYpx/FoHmyTo6t96jAeg0gCCFWNn+26zKySuNT3Wy8m/DpaOSQ8xN7SNq+p c0kUO539rvlCrFk/teQqh+0WmTdAtbukxhyAGMP4/3Jk//0Z3Ig3FLGZMdJnM/QDYDpV RYHPDsff+czML/XJNEz/6gsBMs6g4q9NO+gMSuItI4BpvpBki836d7GgX72biYTD7ulF aDcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686049362; x=1688641362; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qieDcgf+zjbxEwQUoXKwx6OVhCnq04g5BSL0c8SsgBw=; b=eeae92hYfqCpQ7IRJC8F6lzY1AqRP3WbuJwbEURK4DYU7jOMEuwm06O1yORA/jbZOD LJZ6Rv2qguwfCmTzchxbLJ7YWUCkeRuJTQ5tA3MzB6Amg28pdD1H2neeMCHjJSNtHJrh AUCp3MXXf2p6sIExgM4k0DBZrCGZF6SHsdUZtQdH76pcDIL/cJuX1cr4xQc1XcNyTagF HdNLE2TRtj1rGPfCJQQpsfvEzpEldvFuxK1JLAD841ylPXZEj5+F6Dn30rvIA+/jdxyN rrvqOH4Rq95yWX34y7Whq1i7JKJJ7z38mAv0JdR1XjVwGNdgBKW43qUu0dZxvzMs0m1u Y+kQ== X-Gm-Message-State: AC+VfDwdACnTDM91flE00SEictkznJ+RKCUaxZ+FKYEYo7X/G7xHJM+G eryBDdTWGlMn/sovPHmJ0Tg11T0EbeM2uELl891S9KCKcH5WResm X-Google-Smtp-Source: ACHHUZ4pDEtXP1XjwNBKt1Qv/dEFMirHXqYR/GnSnIWIf4VQtKjtqCihBqONWXvGtny+RGfxex/UPBUjJgWTZGJ+sL4= X-Received: by 2002:a05:6870:a416:b0:177:a5e2:442e with SMTP id m22-20020a056870a41600b00177a5e2442emr1963138oal.43.1686048998015; Tue, 06 Jun 2023 03:56:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Tue, 6 Jun 2023 16:26:25 +0530 Message-ID: Subject: Re: Support logical replication of DDLs To: shveta malik Cc: "Yu Shi (Fujitsu)" , vignesh C , "Zhijie Hou (Fujitsu)" , Ajin Cherian , "Wei Wang (Fujitsu)" , Runqi Tian , Peter Smith , Tom Lane , li jie , Dilip Kumar , Alvaro Herrera , Masahiko Sawada , Japin Li , rajesh singarapu , PostgreSQL Hackers , Zheng Li Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jun 5, 2023 at 3:00=E2=80=AFPM shveta malik wrote: > Few assorted comments: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1. I see the following text in 0005 patch: "It supports most of ALTER TABLE command except some commands(DDL related to PARTITIONED TABLE ...) that are recently introduced but are not yet supported by the current ddl_deparser, we will support that later.". Is this still correct? 2. I think the commit message of 0008 (0008-ObjTree-Removal-for-multiple-commands-2023_05_22) should be expanded to explain why ObjTree is not required and or how you have accomplished the same with jsonb functions. 3. 0005* patch has the following changes in docs: + + DDL Replication Support by Command Tag + + + + + + + Command Tag + For Replication + Notes + + + + + ALTER AGGREGATE + - + + + + ALTER CAST + - + ... ... If the patch's scope is to only support replication of table DDLs, why such other commands are mentioned? 4. Can you write some comments about the deparsing format in one of the file headers or in README? 5. + + The table_init_write event occurs just after the creation of + table while execution of CREATE TABLE AS and + SELECT INTO commands. Patch 0001 has multiple references to table_init_write trigger but it is introduced in the 0002 patch, so those changes either belong to 0002 or one of the later patches. I think that may reduce most of the changes in event-trigger.sgml. 6. + if (relpersist =3D=3D RELPERSISTENCE_PERMANENT) + { + ddl_deparse_context context; + char *json_string; + + context.verbose_mode =3D false; + context.func_volatile =3D PROVOLATILE_IMMUTABLE; Can we write some comments as to why PROVOLATILE_IMMUTABLE is chosen here? 7. diff --git a/src/test/modules/test_ddl_deparse_regress/t/001_compare_dumped= _results.pl.orig b/src/test/modules/test_ddl_deparse_regress/t/001_compare_dumped_results.pl= .orig new file mode 100644 index 0000000000..58cf7cdf33 --- /dev/null +++ b/src/test/modules/test_ddl_deparse_regress/t/001_compare_dumped_result= s.pl.orig Will this file require for the 0008 patch? Or is this just a leftover? --=20 With Regards, Amit Kapila.