From: | Richard Yen <richyen3(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, myon(at)debian(dot)org, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Subject: | Re: Patch to allow pg_filedump to support reading of pg_filenode.map |
Date: | 2021-04-29 19:39:57 |
Message-ID: | CAKH4vDhz+HCo1e+6nNyT+XZTQBY9OscqfwY=NbKfK_jxxQnKDw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 29, 2021 at 12:05 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> I think you should be able to avoid crashing if passed a non-relmapper
> file.
> Make sure not to loop over more mappings than exist in the relmapper file
> of
> the given size.
>
> I guess you should warn if the number of mappings is too large for the
> file's
> size. And then "cap" the number of mappings to the maximum possible
> number.
>
Ah, thanks for the tip. That's right -- I can't assume the user's input is
a valid file. Updated patch here.
--Richard
>
> --
> Justin
>
Attachment | Content-Type | Size |
---|---|---|
add_filenode_support_v3.patch | application/octet-stream | 4.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2021-04-29 20:16:37 | Re: function for testing that causes the backend to terminate |
Previous Message | Justin Pryzby | 2021-04-29 19:05:31 | Re: Patch to allow pg_filedump to support reading of pg_filenode.map |