Search Postgresql Archives

Re: puzzling perl DBI vs psql problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 13, 2014, at 1:20 PM, Susan Cassidy <susan.cassidy@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Yes, I am running with use strict.  The statement I pasted in is after perl quoting, being written out by the same perl program.  I just take that statement and paste it into the psql window.
> 
> DBI->trace showed nothing out of the ordinary.  It just shows the lines being fetched that I am seeing in the web program, not the lines I get from psql.
> 
> Another odd thing is that it is apparently not logging statements from Perl, only from psql.  I don't know why.  I thought I had it set up right to log to syslog.  I've had good luck before with that on other installations.

That’s supports Tom’s theory that you’re not connecting to the database you think you are. There’s no difference from the database’s PoV between queries from psql and perl.

Conceivably connecting as different users could change the result too, though it seems unlikely here.

> Here are the log settings in postgresql.conf:
> 

[fairly normal settings deleted]

> 
> Could it have something to do with permissions on /var/log/postgresql?  It is writeable by root only.  The perl program runs under apache.

No, that file is written by syslog, nothing to do with the client.

If the perl is running under apache, though, is it possible that it’s a long-running process that’s kept a transaction open and is seeing old data? Bounce apache and see if anything changes.

Cheers,
  Steve

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux