Subject: block write errors

From: [email-masked] (James Woods 61-89-895256)
Date: Mon, 17 May 93 21:41:05 -0700

I have an application doing large object transactions and while creating and
writing a large object I occasionally get an error for the form:

cannot write block #(usually 0 or 16) of something_strange [db_name] blind

This error is generated from smgrblindwrt() in src/backend/storage/smgr/smgr.c
This error is not happening very frequently but as we are doing a lot of bulk
data input at the moment it is happening frequently enough to cause problems.

ref:
postgres 4.1
Sun sparc/ SunOS 4.1.2
Inversion large objects accessed through libpq calls

any help will be much appreciated
James Woods
[email-masked]

---

From: Mike Olson <[email-masked]>
Date: Tue, 18 May 1993 09:38:04 -0700

> cannot write block #(usually 0 or 16) of something_strange [db_name] blind

can you send me the program you're using to write the large objects?
the most common error in using inversion large objects is to forget
to transaction-protect accesses.  that is, you need to do

	res = PQexec("begin");
	fd = p_open(...)
	nbytes = p_write(...);
	nbytes = p_write(...);
	nbytes = p_write(...);
	nbytes = p_write(...);
	nbytes = p_write(...);
	p_close(fd);
	res = PQexec("end");

also, are there any other transactions running concurrently in the
system?
					mike