From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net>, Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_basebackup fails on databases with high OIDs |
Date: | 2020-01-11 07:21:11 |
Message-ID: | 304f2314-099d-8c30-7b06-c6a1c9076fca@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-01-06 21:00, Magnus Hagander wrote:
>> +0.5 to avoid calling OidInputFunctionCall()
>
> Or just directly using atol() instead of atoi()? Well maybe not
> directly but in a small wrapper that verifies it's not bigger than an
> unsigned?
>
> Unlike in cases where we use oidin etc, we are dealing with data that
> is "mostly trusted" here, aren't we? Meaning we could call atol() on
> it, and throw an error if it overflows, and be done with it?
> Subdirectories in the data directory aren't exactly "untrusted enduser
> data"...
Yeah, it looks like we are using strtoul() without additional error
checking in similar situations, so here is a patch doing it like that.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Fix-base-backup-with-database-OIDs-larger-than-IN.patch | text/plain | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-01-11 07:37:08 | Re: pgbench - use pg logging capabilities |
Previous Message | Peter Eisentraut | 2020-01-11 07:14:17 | Re: remove some STATUS_* symbols |