diff options
author | Robert Haas <rhaas@postgresql.org> | 2022-07-28 10:08:10 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2022-07-28 10:20:29 -0400 |
commit | 851f4cc75cdd8c831f1baa9a7abf8c8248b65890 (patch) | |
tree | f0cb2019773365b1b149f3f1d857f75572a9532f /src/backend/replication/basebackup.c | |
parent | 9e4f914b5eba3f49ab99bdecdc4f96fac099571f (diff) | |
download | postgresql-851f4cc75cdd8c831f1baa9a7abf8c8248b65890.tar.gz postgresql-851f4cc75cdd8c831f1baa9a7abf8c8248b65890.zip |
Clean up some residual confusion between OIDs and RelFileNumbers.
Commit b0a55e43299c4ea2a9a8c757f9c26352407d0ccc missed a few places
where we are referring to the number used as a part of the relation
filename as an "OID". We now want to call that a "RelFileNumber".
Some of these places actually made it sound like the OID in question
is pg_class.oid rather than pg_class.relfilenode, which is especially
good to clean up.
Dilip Kumar with some editing by me.
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r-- | src/backend/replication/basebackup.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 637c0ce4597..7f85071229b 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -1172,7 +1172,8 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, int excludeIdx; bool excludeFound; ForkNumber relForkNum; /* Type of fork if file is a relation */ - int relOidChars; /* Chars in filename that are the rel oid */ + int relnumchars; /* Chars in filename that are the + * relnumber */ /* Skip special stuff */ if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) @@ -1222,23 +1223,24 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, /* Exclude all forks for unlogged tables except the init fork */ if (isDbDir && - parse_filename_for_nontemp_relation(de->d_name, &relOidChars, + parse_filename_for_nontemp_relation(de->d_name, &relnumchars, &relForkNum)) { /* Never exclude init forks */ if (relForkNum != INIT_FORKNUM) { char initForkFile[MAXPGPATH]; - char relOid[OIDCHARS + 1]; + char relNumber[OIDCHARS + 1]; /* * If any other type of fork, check if there is an init fork - * with the same OID. If so, the file can be excluded. + * with the same RelFileNumber. If so, the file can be + * excluded. */ - memcpy(relOid, de->d_name, relOidChars); - relOid[relOidChars] = '\0'; + memcpy(relNumber, de->d_name, relnumchars); + relNumber[relnumchars] = '\0'; snprintf(initForkFile, sizeof(initForkFile), "%s/%s_init", - path, relOid); + path, relNumber); if (lstat(initForkFile, &statbuf) == 0) { |