Re: vacuumlo patch - Mailing list pgsql-hackers

From Aron Wieck
Subject Re: vacuumlo patch
Date
Msg-id 62165281-8424-48F7-A55A-F5B7A3256A6C@eunice.de
Whole thread Raw
In response to vacuumlo patch  (Tim <elatllat@gmail.com>)
List 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 by date:

Previous
From: Aron Wieck
Date:
Subject: Re: vacuumlo patch
Next
From: Aron Wieck
Date:
Subject: Re: vacuumlo patch