> On Mar 11, 2021, at 3:36 AM, Andrey Borodin <x4...@yandex-team.ru> wrote:
> 
> 
> 
>> 11 марта 2021 г., в 13:12, Peter Eisentraut 
>> <peter.eisentr...@enterprisedb.com> написал(а):
>> 
>> client-side tools whose sole task is to execute server-side functionality in 
>> a slightly filtered way
> 
> By the way, can we teach pg_amcheck to verify database without creating local 
> PGDATA and using bare minimum of file system quota?

pg_amcheck does not need a local data directory to check a remote database 
server, though it does need to connect to that server.  The local file system 
quota should not be a problem, as pg_amcheck does not download and save any 
data to disk.  I am uncertain if this answers your question.  If you are 
imagining pg_amcheck running on the same server as the database cluster, then 
of course running pg_amcheck puts a burden on the server to read all the 
relation files necessary, much as running queries over the same relations would 
do.

> We can implement a way for a pg_amcheck to ask for some specific file, which 
> will be downloaded by backup tool and streamed to pg_amcheck.
> E.g. pg_amcheck could have a restore_file_command = 'backup-tool 
> bring-my-file %backup_id %file_name' and probably 
> list_files_command='backup-tool list-files %backup_id'. And pg_amcheck could 
> then fetch bare minimum of what is needed.
> 
> I see that this is somewhat orthogonal idea, but from my POV interesting one.

pg_amcheck is not designed to detect corruption directly, but rather to open 
one or more connections to the database and execute sql queries which employ 
the contrib/amcheck sql functions.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to