In my extension I got a mystery error:

TRAP: failed Assert("InterruptHoldoffCount > 0"), File: "lwlock.c", Line:
1869, PID: 62663
0 postgres 0x000000010135adb4 ExceptionalCondition + 108
1 postgres 0x00000001012235ec LWLockRelease + 1456
2 postgres 0x00000001011faebc UnlockReleaseBuffer + 24

Turns out there was a bug in my extension where I was getting a share lock
on a particular index page over and over. Oddly, the error showed up not
when I was getting the locks, but when I released them. Any time I locked
the index page more than ~200 times, this error would show up on release.

Questions:

1. Why is the limit on the number of locks so low? I thought that when
getting a share lock, all it did was bump a reference count.

2. Is there a way to get this to fail gracefully, that is, with an error
message that makes sense, and kicks in at the moment you go over the limit,
instead of later?

-- 
Chris Cleveland
312-339-2677 mobile

Reply via email to