From: | Amul Sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Sravan Kumar <sravanvcybage(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_verifybackup: TAR format backup verification |
Date: | 2024-07-22 11:52:07 |
Message-ID: | CAAJ_b96xU5fOOvWhJyMvvDCirJEZZdjieZZbyf0PnYukFQCy+Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 22, 2024 at 8:29 AM Sravan Kumar <sravanvcybage(at)gmail(dot)com> wrote:
>
> Hi Amul,
> thanks for working on this.
>
Thanks, for your review.
>> + file_name_len = strlen(relpath);
>> + if (file_name_len < file_extn_len ||
>> + strcmp(relpath + file_name_len - file_extn_len, file_extn) != 0)
>> + {
>> + if (compress_algorithm == PG_COMPRESSION_NONE)
>> + report_backup_error(context,
>> + "\"%s\" is not a valid file, expecting tar file",
>> + relpath);
>> + else
>> + report_backup_error(context,
>> + "\"%s\" is not a valid file, expecting \"%s\" compressed tar file",
>> + relpath,
>> + get_compress_algorithm_name(compress_algorithm));
>> + return;
>> + }
>
>
> I believe pg_verifybackup needs to exit after reporting a failure here since it could not figure out a streamer to allocate.
>
The intention here is to continue the verification of the remaining tar files
instead of exiting immediately in case of an error. If the user prefers an
immediate exit, they can use the --exit-on-error option of pg_verifybackup.
> Also, v1-0002 removes #include "pqexpbuffer.h" from astreamer.h and adds it to the new .h file and in v1-0004 it
> reverts the change. So this can be avoided altogether.
>
Fix in the attached version.
Regards,
Amul
Attachment | Content-Type | Size |
---|---|---|
v2-0007-Refactor-split-verify_control_file.patch | application/octet-stream | 5.0 KB |
v2-0008-pg_verifybackup-Add-backup-format-and-compression.patch | application/octet-stream | 8.8 KB |
v2-0006-Refactor-split-verify_file_checksum-function.patch | application/octet-stream | 5.4 KB |
v2-0010-pg_verifybackup-Tests-and-document.patch | application/octet-stream | 13.7 KB |
v2-0009-pg_verifybackup-Read-tar-files-and-verify-its-con.patch | application/octet-stream | 20.9 KB |
v2-0003-Refactor-move-astreamer-files-to-fe_utils-to-make.patch | application/octet-stream | 7.3 KB |
v2-0004-Refactor-move-some-part-of-pg_verifybackup.c-to-p.patch | application/octet-stream | 8.5 KB |
v2-0002-Refactor-Add-astreamer_inject.h-and-move-related-.patch | application/octet-stream | 3.0 KB |
v2-0005-Refactor-split-verify_backup_file-function.patch | application/octet-stream | 2.6 KB |
v2-0001-Refactor-Rename-all-bbstreamer-references-to-astr.patch | application/octet-stream | 106.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2024-07-22 11:53:31 | Re: WIP: parallel GiST index builds |
Previous Message | Alvaro Herrera | 2024-07-22 11:26:06 | Re: [EXTERNAL] Re: Add non-blocking version of PQcancel |