pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedBroken pipe :-)
3+ messages / 3 participants
[nested] [flat]
* Broken pipe :-)
@ 1998-03-04 15:08 Andreea Gheorghe <andi@sri.ziua.ro>
1998-03-04 20:31 ` Re: [INTERFACES] Broken pipe :-) Peter T Mount <pgint@maidast.demon.co.uk>
0 siblings, 1 reply; 3+ messages in thread
From: Andreea Gheorghe @ 1998-03-04 15:08 UTC (permalink / raw)
To: pgsql-interfaces
Sorry for the previous message, I forgotten to write the subject antet
of e-mail :-)
Hello all,
I have installed postgresql-6.2.1-7 on Red Hat 5.0(Hurricane).
I need to insert a large object into a data base.
I found in "Postgres User Manual", in section "Large Object", the sample
example "testlo.c" - test using large object with libpq.
I compiled this example, and there are some strange things:
- if I try to insert in the data base a file with size smaller
the 1K, the thinhs are Ok.
- but, if I try to insert a larger file, I get the message:
"broken pipe". Then, if I execute again, this program, I get the message:
"can't create large object", this mean that "lo_creat" function failed.
To insert the file in the date base is used: "lo_import" function
from libpq.
Did anyone have this problem? Can anybody help me?
Thanks a lot!
> ########################
> Friendly Andi
>
> http://www.ziua.ro/~andi
> ########################
> Trust everybody...
> then cut the cards!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] Broken pipe :-)
1998-03-04 15:08 Broken pipe :-) Andreea Gheorghe <andi@sri.ziua.ro>
@ 1998-03-04 20:31 ` Peter T Mount <pgint@maidast.demon.co.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Peter T Mount @ 1998-03-04 20:31 UTC (permalink / raw)
To: Andreea Gheorghe <andi@sri.ziua.ro>; +Cc: pgsql-interfaces
On Wed, 4 Mar 1998, Andreea Gheorghe wrote:
>
> Sorry for the previous message, I forgotten to write the subject antet
> of e-mail :-)
>
> Hello all,
>
> I have installed postgresql-6.2.1-7 on Red Hat 5.0(Hurricane).
> I need to insert a large object into a data base.
> I found in "Postgres User Manual", in section "Large Object", the sample
> example "testlo.c" - test using large object with libpq.
> I compiled this example, and there are some strange things:
> - if I try to insert in the data base a file with size smaller
> the 1K, the thinhs are Ok.
> - but, if I try to insert a larger file, I get the message:
> "broken pipe". Then, if I execute again, this program, I get the message:
> "can't create large object", this mean that "lo_creat" function failed.
>
> To insert the file in the date base is used: "lo_import" function
> from libpq.
> Did anyone have this problem? Can anybody help me?
> Thanks a lot!
Large Objects are sort of broken in 6..2.1.
When I was implementing large objects in the JDBC driver, I was getting
the same errors that you are seeing. I found it was sort of a memory leak
in fastpath that was causing the backend to dump core.
I'd advise you upgrade to 6.3 (now it's out), as it fixes this problem.
Also, lo_import/lo_export only works for files sitting on the server, not
on the client. To access files on the server, look at the examples in the
source tree.
--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
^ permalink raw reply [nested|flat] 3+ messages in thread
* Broken Pipe
@ 1999-03-03 23:50 Gregory W Burnham <gburnham@sfu.ca>
0 siblings, 0 replies; 3+ messages in thread
From: Gregory W Burnham @ 1999-03-03 23:50 UTC (permalink / raw)
To: pgsql-interfaces
I'm using Postgres 6.3.2 (I know, I know 6.4.2 is out,
I'll upgrade as soon as this #$%&*! project is over)
running on RedHat 5.1.
I'm getting 'Broken Pipe' returned from the following snippet:
___________________________________________________
if (idNum != 0){
int lo_fd = 0;
lo_fd = lo_open(conn, idNum, INV_READ);
lo_read(conn, lo_fd, buffer, bufferSize);
lo_close(conn, lo_fd);
}
___________________________________________________
The pipe breaks in various places, but always in this
section. This is part of a loop, and it seems to
always happen the 4th time through. And yes, it's
with differant Oids.
Any ideas? Solutions? Cyanide?
Gregory W Burnham
Software Engineer
Excite Labs
Simon Fraser University
Vancouver, BC
V5A 1S6
604 291 3615 ph
604 291 5679 fx
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-03-03 23:50 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-03-04 15:08 Broken pipe :-) Andreea Gheorghe <andi@sri.ziua.ro>
1998-03-04 20:31 ` Peter T Mount <pgint@maidast.demon.co.uk>
1999-03-03 23:50 Broken Pipe Gregory W Burnham <gburnham@sfu.ca>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox