C program Killed

Поиск
Список
Период
Сортировка
От Patrick L. Nolan
Тема C program Killed
Дата
Msg-id agi7rr$180u$1@news.hub.org
обсуждение исходный текст
Ответы Re: C program Killed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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                                       *

В списке pgsql-general по дате отправления:

Предыдущее
От: Doug Silver
Дата:
Сообщение: Re: was there a change in FreeBSD SHM implementation from 4.4 to
Следующее
От: "Henrik Steffen"
Дата:
Сообщение: Re: Serious Crash last Friday