From: | Daria Lepikhova <d(dot)lepikhova(at)postgrespro(dot)ru> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | rjuju123(at)gmail(dot)com, exclusion(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Assert in pageinspect with NULL pages |
Date: | 2022-02-23 07:09:02 |
Message-ID: | 3b176ce7-64b6-aac9-a6d0-ac4b52be7332@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
First of all, thanks for the review and remarks!
18.02.2022 08:02, Michael Paquier пишет:
> On Thu, Feb 17, 2022 at 05:40:41PM +0800, Julien Rouhaud wrote:
>> About the patch, it's incorrectly using a hardcoded 8192 block-size rather than
>> using the computed :block_size (or computing one when it's not already the
>> case).
> Well, the tests of pageinspect fail would already fail when using a
> different page size than 8k, like the checksum ones :)
>
> Anywa, I agree with your point that if this is not a reason to not
> make the tests more portable if we can do easily.
Fixed.
>> I'm also wondering if it wouldn't be better to return NULL rather than throwing
>> an error for uninitialized pages.
> Agreed that this is a sensible choice. NULL would be helpful for the
> case where one compiles all the checksums of a relation with a full
> scan based on the relation size, for example. All these behaviors
> ought to be documented properly, as well. For SRFs, this should just
> return no rows rather than generating an error.
So, I tried to implement this remark. However, further getting rid of
throwing an error and replacing it with a NULL return led to reproduce
the problem that Alexander Lakhin mentioned And here I need little more
time to figure it out.
And one more addition. In the previous version of the patch, I forgot to
add tests for the gist index, but the described problem is also relevant
for it.
--
Daria Lepikhova
Postgres Professional
Attachment | Content-Type | Size |
---|---|---|
0001-Add-checks-for-null-pages-into-pageinspect-v2.patch | text/x-patch | 12.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daria Lepikhova | 2022-02-23 07:09:08 | Re: Assert in pageinspect with NULL pages |
Previous Message | Etsuro Fujita | 2022-02-23 06:30:37 | Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit |