From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Subject: | Re: Online checksums verification in the backend |
Date: | 2020-04-05 09:44:59 |
Message-ID: | 20200405094459.GG1206@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Apr 05, 2020 at 06:08:06PM +0900, Masahiko Sawada wrote:
>
> Why do we need two rows in the doc? For instance, replication slot
> functions have some optional arguments but there is only one row in
> the doc. So I think we don't need to change the doc from the previous
> version patch.
>
I thought that if we document the function as pg_check_relation(regclass [,
fork]) users could think that the 2nd argument is optional, so that
pg_check_relation('something', NULL) could be a valid alias for the 1-argument
form, which it isn't. After checking, I see that e.g. current_setting has the
same semantics and is documented the way you suggest, so fixed back to previous
version.
> And I think these are not necessary as we already defined in
> include/catalog/pg_proc.dat:
>
> +CREATE OR REPLACE FUNCTION pg_check_relation(
> + IN relation regclass,
> + OUT relid oid, OUT forknum integer, OUT failed_blocknum bigint,
> + OUT expected_checksum integer, OUT found_checksum integer)
> + RETURNS SETOF record STRICT VOLATILE LANGUAGE internal AS 'pg_check_relation'
> + PARALLEL RESTRICTED;
> +
> +CREATE OR REPLACE FUNCTION pg_check_relation(
> + IN relation regclass, IN fork text,
> + OUT relid oid, OUT forknum integer, OUT failed_blocknum bigint,
> + OUT expected_checksum integer, OUT found_checksum integer)
> + RETURNS SETOF record STRICT VOLATILE LANGUAGE internal
> + AS 'pg_check_relation_fork'
> + PARALLEL RESTRICTED;
>
Oh right this isn't required since there's no default value anymore, fixed.
v9 attached.
Attachment | Content-Type | Size |
---|---|---|
v9-0001-Add-a-pg_check_relation-function.patch | text/plain | 42.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Darafei Komяpa Praliaskouski | 2020-04-05 09:48:33 | Re: Yet another fast GiST build |
Previous Message | Masahiko Sawada | 2020-04-05 09:08:06 | Re: Online checksums verification in the backend |