LCOV - code coverage report
Current view: top level - src/bin/pg_waldump - seqdesc.c (source / functions) Hit Total Coverage
Test: PostgreSQL 17devel Lines: 14 14 100.0 %
Date: 2024-04-19 22:11:39 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*-------------------------------------------------------------------------
       2             :  *
       3             :  * seqdesc.c
       4             :  *    rmgr descriptor routines for commands/sequence.c
       5             :  *
       6             :  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
       7             :  * Portions Copyright (c) 1994, Regents of the University of California
       8             :  *
       9             :  *
      10             :  * IDENTIFICATION
      11             :  *    src/backend/access/rmgrdesc/seqdesc.c
      12             :  *
      13             :  *-------------------------------------------------------------------------
      14             :  */
      15             : #include "postgres.h"
      16             : 
      17             : #include "commands/sequence.h"
      18             : 
      19             : 
      20             : void
      21          36 : seq_desc(StringInfo buf, XLogReaderState *record)
      22             : {
      23          36 :     char       *rec = XLogRecGetData(record);
      24          36 :     uint8       info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
      25          36 :     xl_seq_rec *xlrec = (xl_seq_rec *) rec;
      26             : 
      27          36 :     if (info == XLOG_SEQ_LOG)
      28          36 :         appendStringInfo(buf, "rel %u/%u/%u",
      29             :                          xlrec->locator.spcOid, xlrec->locator.dbOid,
      30             :                          xlrec->locator.relNumber);
      31          36 : }
      32             : 
      33             : const char *
      34          38 : seq_identify(uint8 info)
      35             : {
      36          38 :     const char *id = NULL;
      37             : 
      38          38 :     switch (info & ~XLR_INFO_MASK)
      39             :     {
      40          38 :         case XLOG_SEQ_LOG:
      41          38 :             id = "LOG";
      42          38 :             break;
      43             :     }
      44             : 
      45          38 :     return id;
      46             : }

Generated by: LCOV version 1.14