Re: vacuumlo patch
| От | Aron Wieck |
|---|---|
| Тема | Re: vacuumlo patch |
| Дата | |
| Msg-id | 62165281-8424-48F7-A55A-F5B7A3256A6C@eunice.de обсуждение исходный текст |
| Ответ на | vacuumlo patch (Tim <elatllat@gmail.com>) |
| Список | pgsql-hackers |
Hi Tim,
I have to correct my previous answer, my change does not alter the behavior of your patch significantly.
> The difference:
> In your version of the patch vacuumlo will stop after N lo_unlink(OID) attempts.
> The previous behavior of the patch is that vacuumlo will stop after N successful lo_unlink(OID)s.
>
> If you have good reason for your behavior please add another flag so that it is optional.
> There should be a clear distinction between "counting vs not", and "aborting vs continuing" when a lo_unlink(OID) is
unsuccessful.
if (param->dry_run == 0) { if (lo_unlink(conn, lo) < 0)
{ fprintf(stderr, "\nFailed to remove lo %u: ", lo);
fprintf(stderr, "%s", PQerrorMessage(conn)); } else
deleted++; } else deleted++;
if(param->transaction_limit!=0&& deleted>=param->transaction_limit) break;
The variable "deleted" is only incremented if a lo_unlink was successful, so my patch only introduces a negligible
overheadbut no actual change in behavior.
I'm very grateful for your patch and I think it should be accepted as soon as possible, one or two "if" does not matter
tome.
Aron
В списке pgsql-hackers по дате отправления: