Thread: Any way to figure out why a session stopped?
Greetings- I was running a large job, started on Wednesday evening. The job, which used a perl script and DBI to do some manipulation and pattern extraction from full-text documents in a PostgreSQL database (version 7.1.3, running on debian linux), stopped about 1/3 of the way through its task. Unfortunately, I don't still have the window open from which I ran the script. Is there any way to figure out why it stopped, and thereby fix the problem? There's nothing very illuminating in /var/log/postgres.log, and from psql I can insert rows into all the tables, so I don't think it was an issue of the tables growing too big. However, they are very big, so if that rings any bells let me know: auth=# select count(*) from patterns; count --------- 2720343 (1 row) auth=# select count(*) from pattern_occurrences; count --------- 3176859 (1 row) There is, though, plenty of disk space for them to play with: aperrin@hm269-26876:~$ df /var/lib/postgres/data Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda3 9614148 3675684 5450088 41% / ---------------------------------------------------------------------- Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrin Assistant Professor of Sociology, U of North Carolina, Chapel Hill 269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
On Thursday, January 3, 2002, at 07:13 PM, Andrew Perrin wrote: > Greetings- > > I was running a large job, started on Wednesday evening. The job, which > used a perl script and DBI to do some manipulation and pattern > extraction > from full-text documents in a PostgreSQL database (version 7.1.3, > running > on debian linux), stopped about 1/3 of the way through its task. > > Unfortunately, I don't still have the window open from which I ran the > script. Is there any way to figure out why it stopped, perldoc DBI will tell you: <quote> "trace" DBI->trace($trace_level) DBI->trace($trace_level, $trace_filename) DBI trace information can be enabled for all handles using the "trace" DBI class method. To enable trace information for a specific handle, use the similar "$h-">"trace" method described elsewhere. Trace levels are as follows: 0 - Trace disabled. 1 - Trace DBI method calls returning with results or errors. 2 - Trace method entry with parameters and returning with results. 3 - As above, adding some high-level information from the driver and some internal information from the DBI. 4 - As above, adding more detailed information from the driver. Also includes DBI mutex information when using threaded Perl. 5 and above - As above but with more and more obscure information. Trace level 1 is best for a simple overview of what's happening. </quote>