too many LWLocks taken

Started by Alex Vinogradovsabout 18 years ago5 messagesgeneral
Jump to latest
#1Alex Vinogradovs
AVinogradovs@Clearpathnet.com

Guys,

I've got a pretty large database, and since certain time
it started giving me "too many LWLocks taken" when running
some batch inserts... Any parameter can be ajusted ?

Thanks!

Best regards,
Alex Vinogradovs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Vinogradovs (#1)
Re: too many LWLocks taken

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

I've got a pretty large database, and since certain time
it started giving me "too many LWLocks taken" when running
some batch inserts... Any parameter can be ajusted ?

Oh really? That's a bug, not something you need to adjust a parameter
for. Can you put together a self-contained test case? What PG
version is this?

regards, tom lane

#3Alex Vinogradovs
AVinogradovs@Clearpathnet.com
In reply to: Tom Lane (#2)
Re: too many LWLocks taken

Version is 8.2.5 running on FreeBSD 6.2. I can try upgrading
to 8.2.7, if you think that would help.

I don't think I can make a test case. Database had been
up for a year now, with about 2 thousand inherited tables
(partitioning) and about 2B rows in all tables...

Show quoted text

On Fri, 2008-04-04 at 18:58 -0400, Tom Lane wrote:

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

I've got a pretty large database, and since certain time
it started giving me "too many LWLocks taken" when running
some batch inserts... Any parameter can be ajusted ?

Oh really? That's a bug, not something you need to adjust a parameter
for. Can you put together a self-contained test case? What PG
version is this?

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Vinogradovs (#3)
Re: too many LWLocks taken

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

Version is 8.2.5 running on FreeBSD 6.2. I can try upgrading
to 8.2.7, if you think that would help.

Well, an upgrade would be a good idea on general principles, but
I doubt it will fix a previously unknown bug.

Does the postmaster log show any other odd behavior around these
errors? Which process is throwing the error anyway? If it's
a regular backend, what query is it executing?

regards, tom lane

#5Alex Vinogradovs
AVinogradovs@Clearpathnet.com
In reply to: Tom Lane (#4)
Re: too many LWLocks taken

It appears the errors were caused by table corruption. I've
truncated and reloaded some large table (300m entries),
and the problem disappeared. Table corruption was probably
caused by hardware failure, not by PostgreSQL :)

Show quoted text

On Fri, 2008-04-04 at 20:15 -0400, Tom Lane wrote:

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

Version is 8.2.5 running on FreeBSD 6.2. I can try upgrading
to 8.2.7, if you think that would help.

Well, an upgrade would be a good idea on general principles, but
I doubt it will fix a previously unknown bug.

Does the postmaster log show any other odd behavior around these
errors? Which process is throwing the error anyway? If it's
a regular backend, what query is it executing?

regards, tom lane