Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8C7521337B58 for ; Thu, 18 Nov 2010 10:49:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 31705-09 for ; Thu, 18 Nov 2010 14:49:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id C304E1337B5D for ; Thu, 18 Nov 2010 10:49:28 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 8451B348023; Thu, 18 Nov 2010 06:49:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b06+VvrN+PPy; Thu, 18 Nov 2010 06:49:21 -0800 (PST) Received: from perhan.alvh.no-ip.org (unknown [190.95.24.94]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id A17CD348022; Thu, 18 Nov 2010 06:49:20 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 4A51E6E4BB; Thu, 18 Nov 2010 11:49:18 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Tom Lane , pgsql-admin Subject: Re: Autovacuum seems to block database: WARNING worker took too long to start From: Alvaro Herrera To: =?utf-8?q?Pablo_Delgado_D=C3=ADaz-Pache?= In-reply-to: References: <6991.1289762128@sss.pgh.pa.us> <1289918622-sup-8461@alvh.no-ip.org> <1289934330-sup-4464@alvh.no-ip.org> Date: Thu, 18 Nov 2010 11:49:18 -0300 Message-Id: <1290091390-sup-7218@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/148 X-Sequence-Number: 36114 Excerpts from Pablo Delgado Díaz-Pache's message of jue nov 18 08:57:16 -0300 2010: > 2) We did a strace to the postmaster pid. However we had 2 postmasters not > dead > > # ps -fea |grep -i postmaster > postgres 3889 1 0 Nov16 ? 00:01:24 /usr/bin/postmaster -p 5432 > -D /var/lib/pgsql/data > postgres 7601 3889 0 12:37 ? 00:00:00 /usr/bin/postmaster -p 5432 > -D /var/lib/pgsql/data > > As soon as we did a "strace" to the 3889 pid everything started to work > again. Sorry for my previous response -- evidently I failed to scroll down enough to notice this part. It seems to me that this process was stuck in a unnatural way. > Not sure it was a coincidence but that was the way it was. > > *# strace -p 3889* > *Process 3889 attached - interrupt to quit* > *select(6, [3 4 5], NULL, NULL, {56, 930000}) = ? ERESTARTNOHAND (To be > restarted)* > *--- SIGUSR1 (User defined signal 1) @ 0 (0) ---* > *rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN > RT_1], NULL, 8) = 0* This seems normal postmaster activity: receiving SIGUSR1, then SIGCHLD, and doing stuff accordingly. Rather than a coincidence, I would think that the act of tracing it made it come back to life. A kernel bug maybe? Have you upgraded your kernel or libc lately? > I also straced the other postmaster pid > > *# strace -p 7601* > *Process 7601 attached - interrupt to quit* > *recvfrom(8, "P\0\0\0\221\0select id_key from transla"..., 8192, 0, NULL, > NULL) = 181* This one seems like a regular postmaster child that hadn't gotten around to changing its ps status yet. (Note it had PPID 3889 which is consistent with this idea.) -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support