Re: puzzling perl DBI vs psql problem - Mailing list pgsql-general

From Steve Atkins
Subject Re: puzzling perl DBI vs psql problem
Date
Msg-id 4E8483C3-598B-413F-AFF0-CAE354516EAF@blighty.com
Whole thread Raw
In response to Re: puzzling perl DBI vs psql problem  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
List pgsql-general
On Mar 13, 2014, at 1:20 PM, Susan Cassidy <susan.cassidy@decisionsciencescorp.com> wrote:

> Yes, I am running with use strict.  The statement I pasted in is after perl quoting, being written out by the same
perlprogram.  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
thoughtI 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
thedatabase’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
programruns 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
openand is seeing old data? Bounce apache and see if anything changes. 

Cheers,
  Steve

pgsql-general by date:

Previous
From: Susan Cassidy
Date:
Subject: Re: puzzling perl DBI vs psql problem
Next
From: Rodrigo Gonzalez
Date:
Subject: Re: puzzling perl DBI vs psql problem