Subject Re: BLOBs and garbage collection
Ivan and others,

Thanks for all your replies. They really helped me to find the
solution and better understand how transaction and record version
work.

> This can mean that either 3025 records is already deleted
> (probably, because it is close to 3018 from statistisc),
> or that you are not committing somewhere
> (either you are not committing all transactions that make the
changes,
> or you are not committing the transaction that counts rows, or
both).
>

The second process, which is responsible for deleting old records,
was buggy.
Ivan was right, I did not commit the transaction that counts row.

But that was not enough. In my first code, I used a timer
(setitimer) to launch a function delete_old_videos(), each minute,
that delete old records and count rows. The mistake was to use a
timer AND a global DB connection.

If I do not use a timer, but simply call usleep(60 * 1000000)
between each call of delete_old_videos(), then it works great.

Thanks to all for your help,

Best regards
Fabrice Aeschbacher