From: | Aron Wieck <me(at)eunice(dot)de> |
---|---|
To: | Tim Lewis <Tim(dot)Lewis(at)vialect(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: vacuumlo patch |
Date: | 2011-07-26 15:16:54 |
Message-ID: | 62165281-8424-48F7-A55A-F5B7A3256A6C@eunice.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 overhead but 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 to me.
Aron
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-07-26 15:36:23 | Re: Another issue with invalid XML values |
Previous Message | Aron Wieck | 2011-07-26 15:09:18 | Re: vacuumlo patch |