Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Use correct format placeholder for block numbers
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 17 Apr 2021 07:40:50 +0000 (09:40 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 17 Apr 2021 07:40:50 +0000 (09:40 +0200)
Should be %u rather than %d.

src/backend/access/gist/gistbuild.c
src/backend/access/heap/vacuumlazy.c
src/backend/replication/basebackup.c

index 1054f6f1f2e34c996c86052fab10896542ee56df..36edc576a8827badcf5691dffa18af5ca04b180c 100644 (file)
@@ -1212,7 +1212,7 @@ gistBufferingFindCorrectParent(GISTBuildState *buildstate,
         * number.
         */
        if (*parentblkno == InvalidBlockNumber)
-           elog(ERROR, "no parent buffer provided of child %d", childblkno);
+           elog(ERROR, "no parent buffer provided of child %u", childblkno);
        parent = *parentblkno;
    }
 
@@ -1545,7 +1545,7 @@ gistGetParent(GISTBuildState *buildstate, BlockNumber child)
                                           HASH_FIND,
                                           &found);
    if (!found)
-       elog(ERROR, "could not find parent of block %d in lookup table", child);
+       elog(ERROR, "could not find parent of block %u in lookup table", child);
 
    return entry->parentblkno;
 }
index 9f9ba5d308b3cb194cc9bd85b9716e0912b9dc71..e90fc18aa9a75e912f5e179553002ee4533640f7 100644 (file)
@@ -2260,7 +2260,7 @@ static void
 lazy_vacuum_heap_rel(LVRelState *vacrel)
 {
    int         tupindex;
-   int         vacuumed_pages;
+   BlockNumber vacuumed_pages;
    PGRUsage    ru0;
    Buffer      vmbuffer = InvalidBuffer;
    LVSavedErrInfo saved_err_info;
index 56cd473f9f3191343fc95721fa5258e9472cccc5..767eac33e4f7bc15df52eadfef9fb735e670e182 100644 (file)
@@ -1676,7 +1676,7 @@ sendFile(const char *readfilename, const char *tarfilename,
        {
            ereport(WARNING,
                    (errmsg("could not verify checksum in file \"%s\", block "
-                           "%d: read buffer size %d and page size %d "
+                           "%u: read buffer size %d and page size %d "
                            "differ",
                            readfilename, blkno, (int) cnt, BLCKSZ)));
            verify_checksum = false;
@@ -1749,7 +1749,7 @@ sendFile(const char *readfilename, const char *tarfilename,
                        if (checksum_failures <= 5)
                            ereport(WARNING,
                                    (errmsg("checksum verification failed in "
-                                           "file \"%s\", block %d: calculated "
+                                           "file \"%s\", block %u: calculated "
                                            "%X but expected %X",
                                            readfilename, blkno, checksum,
                                            phdr->pd_checksum)));