From: | "Patrick L(dot) Nolan" <pln(at)cosmic(dot)stanford(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | C program Killed |
Date: | 2002-07-10 21:10:19 |
Message-ID: | agi7rr$180u$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm writing a C program to read from a database table
on Red Hat Linux 7.1, Postgresql version 7.1.
I practiced running it on a small table and everything
was OK. When I switched to a large table, with 100
times as many rows, the program ran for a while and
then said
Killed
To try to get to the root of the problem, I ran it under
gdb. It says,
(gdb) run
Starting program: /home/pln/pg/find_pg
Program terminated with signal SIGKILL, Killed.
The program no longer exists.
I'm puzzled. Here are some possibly relevant bits of
information:
Both of the tables look like this:
Column | Type | Modifiers
-----------+------------------+-----------
event_num | integer | not null
ph_time | double precision |
ph_l | real |
ph_b | real |
ph_incl | real |
ph_energy | real |
sp_index7 | integer |
The small table has 142427 rows.
The large one has 14958509 rows.
Here's a fragment of the program:
res = PQexec(conn,
"SELECT event_num,ph_time,ph_l,ph_b,ph_incl,ph_energy FROM hundred_days");
nrows = PQntuples(res);
printf ("Fetching %d rows from the database.\n", nrows);
for (i = 0; i<nrows; i++) {
When it dies, it does so before getting to the printf.
--
* Patrick L. Nolan *
* W. W. Hansen Experimental Physics Laboratory (HEPL) *
* Stanford University *
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2002-07-10 21:17:36 | Re: MySQL password function |
Previous Message | Philip Hallstrom | 2002-07-10 21:06:57 | Re: MySQL password function |