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
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers