Re: puzzling perl DBI vs psql problem

From: Steve Atkins <steve(at)blighty(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: puzzling perl DBI vs psql problem
Date: 2014-03-13 20:26:58
Message-ID: 4E8483C3-598B-413F-AFF0-CAE354516EAF@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 13, 2014, at 1:20 PM, Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo Gonzalez 2014-03-13 20:26:59 Re: puzzling perl DBI vs psql problem
Previous Message Susan Cassidy 2014-03-13 20:25:52 Re: puzzling perl DBI vs psql problem