]> granicus.if.org Git - postgresql/commitdiff
Make WAL description output more consistent
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 20 Nov 2018 12:30:01 +0000 (13:30 +0100)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 20 Nov 2018 12:30:01 +0000 (13:30 +0100)
The output for record types XLOG_DBASE_CREATE and XLOG_DBASE_DROP used
the order dbid/tablespaceid, whereas elsewhere the order is
tablespaceid/dbid[/relfilenodeid].  Flip the order for those two types
to make it consistent.

Author: Jean-Christophe Arnu <jcarnu@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAHZmTm18Ln62KW-G8NYvO1wbBL3QU1E76Zep=DuHmg-zS2XFAg@mail.gmail.com/

src/backend/access/rmgrdesc/dbasedesc.c

index 39e26d7ed4414ae2b1ee18651303a06fd47afb26..7ee120f1d9fd0a90321ae0136e5e879119ab0b06 100644 (file)
@@ -29,15 +29,15 @@ dbase_desc(StringInfo buf, XLogReaderState *record)
                xl_dbase_create_rec *xlrec = (xl_dbase_create_rec *) rec;
 
                appendStringInfo(buf, "copy dir %u/%u to %u/%u",
-                                                xlrec->src_db_id, xlrec->src_tablespace_id,
-                                                xlrec->db_id, xlrec->tablespace_id);
+                                                xlrec->src_tablespace_id, xlrec->src_db_id,
+                                                xlrec->tablespace_id, xlrec->db_id);
        }
        else if (info == XLOG_DBASE_DROP)
        {
                xl_dbase_drop_rec *xlrec = (xl_dbase_drop_rec *) rec;
 
                appendStringInfo(buf, "dir %u/%u",
-                                                xlrec->db_id, xlrec->tablespace_id);
+                                                xlrec->tablespace_id, xlrec->db_id);
        }
 }