[Bucardo-general] CTL Creating Too Many syncrun Rows
David E. Wheeler
david at justatheory.com
Mon Jul 29 10:13:08 UTC 2013
On Jul 28, 2013, at 4:20 AM, Greg Sabino Mullane <greg at endpoint.com> wrote:
> On Thu, Jul 25, 2013 at 06:40:32PM +0200, David E. Wheeler wrote:
>> I’m tempted to add this:
>> CREATE UNIQUE INDEX syncrun_sync ON syncrun(sync) WHERE ended IS NULL;
>> To both prevent bogus rows in the future, and to help figure out what is
>> happening should it happen again in the future.
>> Should something like this go into the release schema?
Actually, I see this is already in there:
-- Is essentially a unique index, but we want to avoid any [b]locking
CREATE INDEX syncrun_sync_started ON syncrun(sync) WHERE ended IS NULL;
But it is not unique. Confused.
>> Ought we to consider adding other constraints to the database?
> Probably. If for no other reason than to catch stuff like this quicker. The syncrun
> table is one of the few internal tables that can get quite large, but a single
> partial index like that should still be no problem.
Yeah. Ideas for other indexes we should consider adding?
More information about the Bucardo-general