Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 152419F945C for ; Mon, 5 Nov 2007 11:32:54 -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 93461-09 for ; Mon, 5 Nov 2007 11:32:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 777649F9457 for ; Mon, 5 Nov 2007 11:32:50 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id j3so937471ugf for ; Mon, 05 Nov 2007 07:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=LC85LS+KD1Z8DwjXjXROkV5dfvFpA+rexZIUwapnluU=; b=M0oh+B7nbetYn3tN1h5jX/jqNRHZwgVg8BhZigaMlvCCEvEdkTNShZnGb+8kQVLKEGUj76Y86rE/mRLVyhP8ib6sOaR7j6fGekgurQb+we/FT9C35CQVBQ68KWqYAdO6S4nPhDOFBcKK2gTMrCuc1HCyVV7nOtbFNn+FsHQnMEA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ii7+4Aut+K9jbNW4g7CN1v9QiyAI9Va4dxaIYjlYANtmo0KA3CuHWa2I9z6MkSNG9mQ/AzAEdjz52kIQ52MXED17tDvEc9RNm2U71bhvUWx8woCH3HwrLyuIG1ck8Kpx6sxBTStNNXRE2JALP/ZW6RF1g2JTwwn55QRk3mxMhX4= Received: by 10.66.225.17 with SMTP id x17mr1852090ugg.1194276766291; Mon, 05 Nov 2007 07:32:46 -0800 (PST) Received: by 10.67.98.4 with HTTP; Mon, 5 Nov 2007 07:32:46 -0800 (PST) Message-ID: Date: Mon, 5 Nov 2007 10:32:46 -0500 From: "Radhika S" To: pgsql-performance@postgresql.org Subject: Database connections and stored procs (functions) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/57 X-Sequence-Number: 27472 Hi, I am running postgres 8.2 on RH linux. My daemon downloads files and then inserts the data into preliminary tables, and finally calls a stored procedure which reads data from a view and inserts into the final table. I have a bit of a peculiar problem. (I understand this may not be the right venue). My deamon calls a stored procedure SP_LoadFiles(). The daemon stops syncing at about 6:30 pm and restarts syncing at about 7:30 am. Every day, I have to manually re-start the daemon for the function sp_LoadFiles() to actually load the files. I can see that the procedure is being called, but it does not load the data. If I run the procedure manually via psql : select * from sp_loadfiles(); it works and the data is loaded. my stored proc sp_loadfiles is accessing a View which is accessing a couple of tables. There is no dynamic sql being generated, just inserts from the view. Is this a connection issue? Do I have to end the daemons db connection. Is this set in the postgresql.conf? Thank you. Radhika -- It is all a matter of perspective. You choose your view by choosing where to stand. --Larry Wall