Content-Length: 259696 | pFad | http://github.com/postgrespro/postgres_cluster/commit/259bbe177808986e5d226ea7ce5a1ebb74657791

EA Fix base backup with database OIDs larger than INT32_MAX · postgrespro/postgres_cluster@259bbe1 · GitHub
Skip to content

Commit 259bbe1

Browse files
committed
Fix base backup with database OIDs larger than INT32_MAX
The use of pg_atoi() for parsing a string into an Oid fails for values larger than INT32_MAX, since OIDs are unsigned. Instead, use atooid(). While this has less error checking, the contents of the data directory are expected to be trustworthy, so we don't need to go out of our way to do full error checking. Discussion: https://www.postgresql.org/message-id/flat/dea47fc8-6c89-a2b1-07e3-754ff1ab094b%402ndquadrant.com
1 parent 23d0dfa commit 259bbe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ sendDir(const char *path, int basepathlen, bool sizeonly, List *tablespaces,
12911291

12921292
if (!sizeonly)
12931293
sent = sendFile(pathbuf, pathbuf + basepathlen + 1, &statbuf,
1294-
true, isDbDir ? pg_atoi(lastDir + 1, sizeof(Oid), 0) : InvalidOid);
1294+
true, isDbDir ? atooid(lastDir + 1) : InvalidOid);
12951295

12961296
if (sent || sizeonly)
12971297
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/259bbe177808986e5d226ea7ce5a1ebb74657791

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy