Subject | Re: BLOBs and garbage collection |
---|---|
Author | Fabrice Aeschbacher |
Post date | 2003-05-22T16:35:20Z |
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.
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
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 deletedchanges,
> (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
> or you are not committing the transaction that counts rows, orboth).
>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