This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new 72581fd4f7f Fix pg_dump TAP tests. (#1505)
72581fd4f7f is described below

commit 72581fd4f7fac744396170921f9b442b9ed8d498
Author: reshke <[email protected]>
AuthorDate: Mon Dec 29 16:06:34 2025 +0500

    Fix pg_dump TAP tests. (#1505)
    
    Currecntly TAP tests for pg_dump are red.
    
    ```
    
    Test Summary Report
    -------------------
    t/002_pg_dump.pl            (Wstat: 25088 (exited 98) Tests: 7138 Failed: 
98)
      Failed tests:  112, 327, 542, 972, 1402, 1618, 1834, 1976-1977
                    1979-1982, 1987-1988, 1993-1995, 2001-2002
                    2004, 2010, 2013, 2015, 2023, 2032-2033
                    2043, 2045-2050, 2054, 2063, 2073-2074
                    2086-2091, 2093-2094, 2101-2104, 2108, 2125
                    2135, 2155, 2158-2167, 2169-2171, 2180
                    2182, 2185-2189, 2270, 2915, 3345, 3560
                    3775, 3990, 4205, 4420, 4635, 4850, 5633-5634
                    5644-5645, 5680, 5730, 5812, 5819, 5824
                    5845-5846, 6141, 6786, 7001
      Non-zero exit status: 98
    t/004_pg_dump_parallel.pl   (Wstat: 1024 (exited 4) Tests: 4 Failed: 4)
      Failed tests:  1-4
      Non-zero exit status: 4
    t/010_dump_connstr.pl       (Wstat: 768 (exited 3) Tests: 14 Failed: 3)
      Failed tests:  7-9
      Non-zero exit status: 3
    ```
    
    Issues cause is append only - specific test and parallel dump. Fix first by 
modifying TAP perl regex. Fix latter by fixing rebase issues with  
[56b46d3](https://github.com/postgres/postgres/commit/56b46d3) with changes for 
pg_backup_archiver.c
    
    
    Found during PG16 rebase and cross-validation with main branch and PG 
upstream.
---
 src/bin/pg_dump/pg_backup_archiver.c | 37 +-----------------------------------
 src/bin/pg_dump/t/002_pg_dump.pl     | 16 +++++++++-------
 2 files changed, 10 insertions(+), 43 deletions(-)

diff --git a/src/bin/pg_dump/pg_backup_archiver.c 
b/src/bin/pg_dump/pg_backup_archiver.c
index 96bd469147a..70131b7af63 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -4935,43 +4935,8 @@ CloneArchive(ArchiveHandle *AH)
 
        /* re-establish fixed state */
        if (AH->mode == archModeRead)
-       {
-               Assert(AH->connection == NULL);
-
-               /* this also sets clone->connection */
-               ConnectDatabase((Archive *) clone, 
&clone->public.ropt->cparams, true, false);
-
-               /* re-establish fixed state */
                _doSetFixedOutputState(clone);
-       }
-       else
-       {
-               PQExpBufferData connstr;
-               char       *pghost;
-               char       *pgport;
-               char       *username;
-
-               Assert(AH->connection != NULL);
-
-               /*
-                * Even though we are technically accessing the parent's 
database
-                * object here, these functions are fine to be called like that
-                * because all just return a pointer and do not actually 
send/receive
-                * any data to/from the database.
-                */
-               initPQExpBuffer(&connstr);
-               appendPQExpBufferStr(&connstr, "dbname=");
-               appendConnStrVal(&connstr, PQdb(AH->connection));
-               pghost = PQhost(AH->connection);
-               pgport = PQport(AH->connection);
-               username = PQuser(AH->connection);
-
-               /* this also sets clone->connection */
-               ConnectDatabase((Archive *) clone, 
&clone->public.ropt->cparams, true, false);
-
-               termPQExpBuffer(&connstr);
-               /* setupDumpWorker will fix up connection state */
-       }
+       /* in write case, setupDumpWorker will fix up connection state */
 
        /* Let the format-specific code have a chance too */
        clone->ClonePtr(clone);
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index bd0e6c3d4d8..5b85ffa49fc 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -2214,20 +2214,22 @@ my %tests = (
                create_order => 19,
                create_sql      => 'CREATE TABLE dump_test.test_table_ao(a 
integer, b text)
                                                WITH (appendonly = true, 
compresstype = zlib, compresslevel = 1);',
-               regexp => qr/^
-                       \QCREATE TABLE dump_test.test_table_ao (\E\n
-                       \s+\Qa integer,\E\n
-                       \s+\Qb text\E\n
-                       \QWITH (appendonly = true, orientation = column, 
compresstype = zlib, compresslevel = 1);\E\n/xm,
+               regexp => qr{^
+                       \QCREATE TABLE dump_test.test_table_ao (\E
+                       \n\s+\Qa integer,\E
+                       \n\s+\Qb text\E
+                       \n\Q)\E
+                       \n\QWITH (appendonly = true, compresstype=zlib, 
compresslevel='1');\E
+                       }xm,
                like => {
                        %full_runs,
                        %dump_test_schema_runs,
-                       only_dump_test_table => 1,
                        section_pre_data     => 1,
+                       exclude_test_table       => 1,
                },
                unlike => {
+                       only_dump_test_table => 1,
                        exclude_dump_test_schema => 1,
-                       exclude_test_table       => 1,
                },
        },
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to