Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 613349FB50F for ; Wed, 1 Aug 2007 21:34:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 74495-02 for ; Wed, 1 Aug 2007 21:34:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by postgresql.org (Postfix) with ESMTP id 7DFED9FB437 for ; Wed, 1 Aug 2007 21:34:21 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d32so739370pye for ; Wed, 01 Aug 2007 17:34:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=X7/PlCOy22ZaBrghhHrlpnxhFOrVwDHAaRToi1aEUllKRkiERYgUmlw94hrvgLcti84XP9KiO2b/KGlx935BBxoOGvATsDDF0izKi+AQNqGPvY0qoAY3MQ+824Z03WHpN01QWyuZm4PdSfl7nAjEtZWzGxONr5g8W4yruB4Y3ps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=O0G9R3fKBedFtt98qZ9CoM5/5CKQ+YMdlE+Y34YI0IsxpFZf7tTsEqmCjv4sYur8M2Jb84tGuisQflzZIvnPb/x4twZw91i0qYG0WqD9W12naiKGbelwqSWDTPUNryOazKl3OLb7dpFrEKa5jLaPjynbkbbsTGcq0/IORsGXHc8= Received: by 10.35.106.15 with SMTP id i15mr1867435pym.1186014860239; Wed, 01 Aug 2007 17:34:20 -0700 (PDT) Received: from ?172.17.0.199? ( [204.11.129.146]) by mx.google.com with ESMTPS id 20sm5051594nzp.2007.08.01.17.34.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Aug 2007 17:34:19 -0700 (PDT) Message-ID: <46B12687.7090607@gmail.com> Date: Wed, 01 Aug 2007 19:34:15 -0500 From: Peter Koczan User-Agent: Thunderbird 2.0.0.5 (X11/20070725) MIME-Version: 1.0 To: Alvaro Herrera CC: pgsql-admin Subject: Re: stracing a connection References: <4544e0330708010950v464268edsf91d44b92bf55400@mail.gmail.com> <20070801180551.GI10324@alvh.no-ip.org> In-Reply-To: <20070801180551.GI10324@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/14 X-Sequence-Number: 26345 Thank you Alvaro, it worked. I got confused when I did it before since gdb couldn't figure out half of the elements in the backtrace, and strace kept saying "I can't attach", which was only because gdb was already attached to that same process. Peter Alvaro Herrera wrote: > Peter Koczan escribió: > >> Hi all, >> >> I'm running into a few problems with postgres connections, specifically >> notify/listening connections. What program(s) should I attach to the >> connection using gdb or strace in order to actually get some useful data? >> >> i.e. I'll be using something like "strace -p [pid] [command]", what should I >> use for [command]? >> > > strace -p pid > gdb -p pid > > You don't need to specify the command at all. > >