FileSize limit not handled.

Started by Fr�d�ric SURLEAUabout 23 years ago2 messagesbugs
Jump to latest
#1Fr�d�ric SURLEAU
frederic.surleau@atosorigin.com

Hi, I had a problem with postgresql 7.3.2 running on a Linux RedHat system.

On this system, the file size is limited using ulimit.

When the limit is reached for a database file, Postgres does THIS :

LOG: server process (pid 4820) was terminated by signal 25
LOG: terminating any other active server processes
WARNING: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
... / ...
WARNING: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
LOG: all server processes terminated; reinitializing shared memory and
semaphores
LOG: database system was interrupted at 2003-03-20 23:39:17 CET
LOG: checkpoint record is at 0/542DF05C
LOG: redo record is at 0/542DF05C; undo record is at 0/0; shutdown FALSE
LOG: next transaction id: 510333; next oid: 120396
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: redo starts at 0/542DF09C
LOG: ReadRecord: record with zero length at 0/5441DC88
LOG: redo done at 0/5441DC64
LOG: database system is ready

I think a process receiving a "signal 25" or SIGXFSZ while inserting a row
should not hang all the server like that !

In this case, only one table has problem, it's not necessary to stop the
server and terminate connections to all database.

Could the process answer something like "Unable to INSERT a new row ! (File
size limit reached)", and then explain the problem in the log file ?

It was very difficult to me to find the origin of the problem because I had
no access to the system log.
In My PHP script, the only information was the WARNING asking to reconnect
and redo the request ! ? !

Regards,
Frédéric SURLEAU.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fr�d�ric SURLEAU (#1)
Re: FileSize limit not handled.

"Fr�d�ric SURLEAU" <frederic.surleau@atosorigin.com> writes:

On this system, the file size is limited using ulimit.=0D
=0D
When the limit is reached for a database file, Postgres does THIS :=0D
=0D
LOG: server process (pid 4820) was terminated by signal 25=0D
LOG: terminating any other active server processes=0D

It would probably work to just ignore SIGXFSZ on systems that have it.
That would change the behavior into an error return from write(), which
we already know what to do with.

Note however that running PG under a filesize ulimit is a rather foolish
thing to do. Running out of space for an ordinary table is one thing,
but running out of space for pg_xlog or pg_clog will induce a system
panic not materially different from the above.

regards, tom lane