LCOV - differential code coverage report
Current view: top level - src/backend/access/rmgrdesc - smgrdesc.c (source / functions) Coverage Total Hit UBC CBC
Current: f76c13edadc2b319036e0d238703ed56bb23f934 vs 9e17d25e79d4756be08b4a5521b4b58450217137 Lines: 100.0 % 22 22 22
Current Date: 2026-09-20 14:13:17 +0900 Functions: 100.0 % 2 2 2
Baseline: lcov-20260920-baseline Branches: 71.4 % 7 5 2 5
Baseline Date: 2026-09-20 14:13:13 +0900 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(360..) days: 100.0 % 22 22 22
Function coverage date bins:
(360..) days: 100.0 % 2 2 2
Branch coverage date bins:
(360..) days: 71.4 % 7 5 2 5

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * smgrdesc.c
                                  4                 :                :  *    rmgr descriptor routines for catalog/storage.c
                                  5                 :                :  *
                                  6                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                  7                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :                :  *
                                  9                 :                :  *
                                 10                 :                :  * IDENTIFICATION
                                 11                 :                :  *    src/backend/access/rmgrdesc/smgrdesc.c
                                 12                 :                :  *
                                 13                 :                :  *-------------------------------------------------------------------------
                                 14                 :                :  */
                                 15                 :                : #include "postgres.h"
                                 16                 :                : 
                                 17                 :                : #include "catalog/storage_xlog.h"
                                 18                 :                : 
                                 19                 :                : 
                                 20                 :                : void
 4322 heikki.linnakangas@i       21                 :CBC         988 : smgr_desc(StringInfo buf, XLogReaderState *record)
                                 22                 :                : {
 4481                            23                 :            988 :     char       *rec = XLogRecGetData(record);
 4322                            24                 :            988 :     uint8       info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
                                 25                 :                : 
 5044 alvherre@alvh.no-ip.       26         [ +  + ]:            988 :     if (info == XLOG_SMGR_CREATE)
                                 27                 :                :     {
                                 28                 :            985 :         xl_smgr_create *xlrec = (xl_smgr_create *) rec;
                                 29                 :                : 
  572 andres@anarazel.de         30                 :            985 :         appendStringInfoString(buf,
                                 31                 :            985 :                                relpathperm(xlrec->rlocator, xlrec->forkNum).str);
                                 32                 :                :     }
 5044 alvherre@alvh.no-ip.       33         [ +  - ]:              3 :     else if (info == XLOG_SMGR_TRUNCATE)
                                 34                 :                :     {
                                 35                 :              3 :         xl_smgr_truncate *xlrec = (xl_smgr_truncate *) rec;
                                 36                 :                : 
  572 andres@anarazel.de         37                 :              3 :         appendStringInfo(buf, "%s to %u blocks flags %d",
                                 38                 :              3 :                          relpathperm(xlrec->rlocator, MAIN_FORKNUM).str,
                                 39                 :                :                          xlrec->blkno, xlrec->flags);
                                 40                 :                :     }
 4384                            41                 :            988 : }
                                 42                 :                : 
                                 43                 :                : const char *
                                 44                 :            994 : smgr_identify(uint8 info)
                                 45                 :                : {
                                 46                 :            994 :     const char *id = NULL;
                                 47                 :                : 
 4381                            48      [ +  +  - ]:            994 :     switch (info & ~XLR_INFO_MASK)
                                 49                 :                :     {
 4384                            50                 :            988 :         case XLOG_SMGR_CREATE:
                                 51                 :            988 :             id = "CREATE";
                                 52                 :            988 :             break;
                                 53                 :              6 :         case XLOG_SMGR_TRUNCATE:
                                 54                 :              6 :             id = "TRUNCATE";
                                 55                 :              6 :             break;
                                 56                 :                :     }
                                 57                 :                : 
                                 58                 :            994 :     return id;
                                 59                 :                : }
        

Generated by: LCOV version 2.0-1