LCOV - differential code coverage report
Current view: top level - src/backend/access/rmgrdesc - tblspcdesc.c (source / functions) Coverage Total Hit UBC CBC
Current: c70b6db34ffeab48beef1fb4ce61bcad3772b8dd vs 06473f5a344df8c9594ead90a609b86f6724cff8 Lines: 100.0 % 20 20 20
Current Date: 2025-09-06 07:49:51 +0900 Functions: 100.0 % 2 2 2
Baseline: lcov-20250906-005545-baseline Branches: 71.4 % 7 5 2 5
Baseline Date: 2025-09-05 08:21:35 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(360..) days: 100.0 % 20 20 20
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                 :                :  * tblspcdesc.c
                                  4                 :                :  *    rmgr descriptor routines for commands/tablespace.c
                                  5                 :                :  *
                                  6                 :                :  * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
                                  7                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :                :  *
                                  9                 :                :  *
                                 10                 :                :  * IDENTIFICATION
                                 11                 :                :  *    src/backend/access/rmgrdesc/tblspcdesc.c
                                 12                 :                :  *
                                 13                 :                :  *-------------------------------------------------------------------------
                                 14                 :                :  */
                                 15                 :                : #include "postgres.h"
                                 16                 :                : 
                                 17                 :                : #include "commands/tablespace.h"
                                 18                 :                : 
                                 19                 :                : 
                                 20                 :                : void
 3943 heikki.linnakangas@i       21                 :CBC          20 : tblspc_desc(StringInfo buf, XLogReaderState *record)
                                 22                 :                : {
 4102                            23                 :             20 :     char       *rec = XLogRecGetData(record);
 3943                            24                 :             20 :     uint8       info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
                                 25                 :                : 
 4665 alvherre@alvh.no-ip.       26         [ +  + ]:             20 :     if (info == XLOG_TBLSPC_CREATE)
                                 27                 :                :     {
                                 28                 :              6 :         xl_tblspc_create_rec *xlrec = (xl_tblspc_create_rec *) rec;
                                 29                 :                : 
 4005 andres@anarazel.de         30                 :              6 :         appendStringInfo(buf, "%u \"%s\"", xlrec->ts_id, xlrec->ts_path);
                                 31                 :                :     }
 4665 alvherre@alvh.no-ip.       32         [ +  - ]:             14 :     else if (info == XLOG_TBLSPC_DROP)
                                 33                 :                :     {
                                 34                 :             14 :         xl_tblspc_drop_rec *xlrec = (xl_tblspc_drop_rec *) rec;
                                 35                 :                : 
 4005 andres@anarazel.de         36                 :             14 :         appendStringInfo(buf, "%u", xlrec->ts_id);
                                 37                 :                :     }
                                 38                 :             20 : }
                                 39                 :                : 
                                 40                 :                : const char *
                                 41                 :             22 : tblspc_identify(uint8 info)
                                 42                 :                : {
                                 43                 :             22 :     const char *id = NULL;
                                 44                 :                : 
 4002                            45      [ +  +  - ]:             22 :     switch (info & ~XLR_INFO_MASK)
                                 46                 :                :     {
 4005                            47                 :              7 :         case XLOG_TBLSPC_CREATE:
                                 48                 :              7 :             id = "CREATE";
                                 49                 :              7 :             break;
                                 50                 :             15 :         case XLOG_TBLSPC_DROP:
                                 51                 :             15 :             id = "DROP";
                                 52                 :             15 :             break;
                                 53                 :                :     }
                                 54                 :                : 
                                 55                 :             22 :     return id;
                                 56                 :                : }
        

Generated by: LCOV version 2.4-beta