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

Re: Postgres Access Timing

On Thu, 2009-07-23 at 09:00 -0700, Chris Travers wrote:
> On Thu, Jul 23, 2009 at 2:15 AM, beamends <..hidden..> wrote:
>         Hi All,
>         not strictly a LSMB thing, but as the answer may be of
>         interest to
>         others here goes... (excuse the terminology, I'm not of the
>         dbase expert
>         persuasion)
>         I'm "injecting" data into Postgres using a C program via
>         libpq. From the
>         documentation it's not clear if the various functions
>         check/wait to see
>         if a dbase command has been or can be completed before
>         returning from
>         the function ("locking"?). All is tickety-boo except when
>         creating a new
>         part. When the new part is created the next line is to create
>         the
>         partsvendor table entry. This works ok for most of the time,
>         but will
>         start failing after a while with the INSERT into partsvendor
>         failing.
>         Doing the command from the SQL window in phppgadmin will then
>         work.
>         Presumably this is a timing issue or such. So the question is,
>         is there
>         and SQL or Posgres command to interrogate the dbase to see if
>         it is
>         "ready" for the next command. Or am I barking up the wrong
>         tree
>         entirely!
> Hmmm....  I don't think it would be a timing issue unless you are
> doing strange things.  Do you have errors from the PostgreSQL log
> file?
> Best Wishes,
> Chris Travers

Hi Chris,
I'll have a look for the log - wherever it is!

More info from this mornings efforts....

For about an hour and a half all was well, then it started messing
about, INSERTing from the C program failing, but using exactly the same
line (cut and pasted into phppgsadmin from the output on the terminal)
worked. Then that stopped working too! Currently using phppgadmin's SQL
window will work, but it can take up to 4 minutes before success. I also
tried updating the partsvendor info from the part window, and this too
fails - repeatedly coming up with a unique key error (despite the entry
not being there browsing with phppgadmin) until suddenly, for no reason,
it works!

All the other tables associated with a part record work fine - is there
something special about partsvendor - it seems like updates to that
table are being queued and overflowing after a while?

> ------------------------------------------------------------------------------
> _______________________________________________
> Ledger-smb-users mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users