LCOV - differential code coverage report
Current view: top level - src/backend/access/rmgrdesc - gistdesc.c (source / functions) Coverage Total Hit UNC UBC DUB
Current: Differential Code Coverage HEAD vs 15 Lines: 0.0 % 65 0 5 60 5
Current Date: 2023-04-08 17:13:01 Functions: 0.0 % 7 0 2 5
Baseline: 15 Line coverage date bins:
Baseline Date: 2023-04-08 15:09:40 (120,180] days: 0.0 % 5 0 5
Legend: Lines: hit not hit (240..) days: 0.0 % 60 0 60
Function coverage date bins:
(240..) days: 0.0 % 7 0 2 5

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*-------------------------------------------------------------------------
                                  2                 :  *
                                  3                 :  * gistdesc.c
                                  4                 :  *    rmgr descriptor routines for access/gist/gistxlog.c
                                  5                 :  *
                                  6                 :  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
                                  7                 :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :  *
                                  9                 :  *
                                 10                 :  * IDENTIFICATION
                                 11                 :  *    src/backend/access/rmgrdesc/gistdesc.c
                                 12                 :  *
                                 13                 :  *-------------------------------------------------------------------------
                                 14                 :  */
                                 15                 : #include "postgres.h"
                                 16                 : 
                                 17                 : #include "access/gistxlog.h"
                                 18                 : #include "lib/stringinfo.h"
                                 19                 : #include "storage/relfilelocator.h"
                                 20                 : 
                                 21                 : static void
 3784 alvherre                   22 UBC           0 : out_gistxlogPageUpdate(StringInfo buf, gistxlogPageUpdate *xlrec)
                                 23                 : {
                                 24               0 : }
                                 25                 : 
                                 26                 : static void
 1479 heikki.linnakangas         27               0 : out_gistxlogPageReuse(StringInfo buf, gistxlogPageReuse *xlrec)
                                 28                 : {
  143 pg                         29 UNC           0 :     appendStringInfo(buf, "rel %u/%u/%u; blk %u; snapshotConflictHorizon %u:%u",
                                 30                 :                      xlrec->locator.spcOid, xlrec->locator.dbOid,
                                 31                 :                      xlrec->locator.relNumber, xlrec->block,
                                 32               0 :                      EpochFromFullTransactionId(xlrec->snapshotConflictHorizon),
                                 33               0 :                      XidFromFullTransactionId(xlrec->snapshotConflictHorizon));
 1479 heikki.linnakangas         34 UBC           0 : }
                                 35                 : 
                                 36                 : static void
 1448 andres                     37               0 : out_gistxlogDelete(StringInfo buf, gistxlogDelete *xlrec)
                                 38                 : {
  143 pg                         39 UNC           0 :     appendStringInfo(buf, "delete: snapshotConflictHorizon %u, nitems: %u",
                                 40               0 :                      xlrec->snapshotConflictHorizon, xlrec->ntodelete);
 1570 akorotkov                  41 UBC           0 : }
                                 42                 : 
                                 43                 : static void
 3784 alvherre                   44               0 : out_gistxlogPageSplit(StringInfo buf, gistxlogPageSplit *xlrec)
                                 45                 : {
 3062 heikki.linnakangas         46               0 :     appendStringInfo(buf, "page_split: splits to %d pages",
                                 47               0 :                      xlrec->npage);
 3784 alvherre                   48               0 : }
                                 49                 : 
                                 50                 : static void
 1479 heikki.linnakangas         51               0 : out_gistxlogPageDelete(StringInfo buf, gistxlogPageDelete *xlrec)
                                 52                 : {
 1355                            53               0 :     appendStringInfo(buf, "deleteXid %u:%u; downlink %u",
                                 54               0 :                      EpochFromFullTransactionId(xlrec->deleteXid),
                                 55               0 :                      XidFromFullTransactionId(xlrec->deleteXid),
                                 56               0 :                      xlrec->downlinkOffset);
 1479                            57               0 : }
                                 58                 : 
                                 59                 : void
 3062                            60               0 : gist_desc(StringInfo buf, XLogReaderState *record)
                                 61                 : {
 3221                            62               0 :     char       *rec = XLogRecGetData(record);
 3062                            63               0 :     uint8       info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
                                 64                 : 
 3784 alvherre                   65               0 :     switch (info)
                                 66                 :     {
                                 67               0 :         case XLOG_GIST_PAGE_UPDATE:
                                 68               0 :             out_gistxlogPageUpdate(buf, (gistxlogPageUpdate *) rec);
                                 69               0 :             break;
 1479 heikki.linnakangas         70               0 :         case XLOG_GIST_PAGE_REUSE:
                                 71               0 :             out_gistxlogPageReuse(buf, (gistxlogPageReuse *) rec);
                                 72               0 :             break;
 1570 akorotkov                  73               0 :         case XLOG_GIST_DELETE:
 1448 andres                     74               0 :             out_gistxlogDelete(buf, (gistxlogDelete *) rec);
 1570 akorotkov                  75               0 :             break;
 3784 alvherre                   76               0 :         case XLOG_GIST_PAGE_SPLIT:
                                 77               0 :             out_gistxlogPageSplit(buf, (gistxlogPageSplit *) rec);
                                 78               0 :             break;
 1479 heikki.linnakangas         79               0 :         case XLOG_GIST_PAGE_DELETE:
                                 80               0 :             out_gistxlogPageDelete(buf, (gistxlogPageDelete *) rec);
                                 81               0 :             break;
 1100 noah                       82               0 :         case XLOG_GIST_ASSIGN_LSN:
                                 83                 :             /* No details to write out */
                                 84               0 :             break;
                                 85                 :     }
 3124 andres                     86               0 : }
                                 87                 : 
                                 88                 : const char *
                                 89               0 : gist_identify(uint8 info)
                                 90                 : {
                                 91               0 :     const char *id = NULL;
                                 92                 : 
 3121                            93               0 :     switch (info & ~XLR_INFO_MASK)
                                 94                 :     {
 3124                            95               0 :         case XLOG_GIST_PAGE_UPDATE:
                                 96               0 :             id = "PAGE_UPDATE";
                                 97               0 :             break;
 1570 akorotkov                  98               0 :         case XLOG_GIST_DELETE:
                                 99               0 :             id = "DELETE";
                                100               0 :             break;
 1479 heikki.linnakangas        101               0 :         case XLOG_GIST_PAGE_REUSE:
                                102               0 :             id = "PAGE_REUSE";
                                103               0 :             break;
 3124 andres                    104               0 :         case XLOG_GIST_PAGE_SPLIT:
                                105               0 :             id = "PAGE_SPLIT";
                                106               0 :             break;
 1479 heikki.linnakangas        107               0 :         case XLOG_GIST_PAGE_DELETE:
                                108               0 :             id = "PAGE_DELETE";
                                109               0 :             break;
 1100 noah                      110               0 :         case XLOG_GIST_ASSIGN_LSN:
                                111               0 :             id = "ASSIGN_LSN";
                                112               0 :             break;
                                113                 :     }
                                114                 : 
 3124 andres                    115               0 :     return id;
                                116                 : }
        

Generated by: LCOV version v1.16-55-g56c0a2a