Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A93502E483E for ; Fri, 11 Jan 2008 11:06:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 62920-02 for ; Fri, 11 Jan 2008 11:05:56 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A07322E4619 for ; Fri, 11 Jan 2008 11:05:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0BF5eTl012998; Fri, 11 Jan 2008 10:05:40 -0500 (EST) To: Jakub Ouhrabka cc: pgsql-performance@postgresql.org Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores In-reply-to: <47874EE8.2050406@comgate.cz> References: <7083.1199379570@sss.pgh.pa.us> <477D1D59.7050002@comgate.cz> <4782063C.7070105@comgate.cz> <26502.1199745090@sss.pgh.pa.us> <4782AB4D.8010009@comgate.cz> <27655.1199750492@sss.pgh.pa.us> <47836A4C.5080707@comgate.cz> <10713.1199813111@sss.pgh.pa.us> <47874EE8.2050406@comgate.cz> Comments: In-reply-to Jakub Ouhrabka message dated "Fri, 11 Jan 2008 12:11:36 +0100" Date: Fri, 11 Jan 2008 10:05:40 -0500 Message-ID: <12997.1200063940@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/65 X-Sequence-Number: 28304 Jakub Ouhrabka writes: > We'we tried hard to identify what's the cause of filling sinval-queue. > We went through query logs as well as function bodies stored in the > database. We were not able to find any DDL, temp table creations etc. Strange. The best idea that comes to mind is to add some debugging code to SendSharedInvalidMessage to log the content of each message that's sent out. That would at least tell us *what* is going into the queue, even if not directly *why*. Try something like (untested) void SendSharedInvalidMessage(SharedInvalidationMessage *msg) { bool insertOK; + elog(LOG, "sending inval msg %d %u %u %u %u %u", + msg->cc.id, + msg->cc.tuplePtr.ip_blkid.bi_hi, + msg->cc.tuplePtr.ip_blkid.bi_lo, + msg->cc.tuplePtr.ip_posid, + msg->cc.dbId, + msg->cc.hashValue); + LWLockAcquire(SInvalLock, LW_EXCLUSIVE); insertOK = SIInsertDataEntry(shmInvalBuffer, msg); LWLockRelease(SInvalLock); regards, tom lane