Re: Selecting large tables gets killed - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Selecting large tables gets killed
Date
Msg-id CAFjFpRdtd2iGL75CVhE+v=EqS9HdOXQz+8aOKpO0B+j2HhuhBw@mail.gmail.com
Whole thread Raw
In response to Re: Selecting large tables gets killed  (amul sul <sul_amul@yahoo.co.in>)
Responses Re: Selecting large tables gets killed
List pgsql-hackers
I found a very simple repro on my machine
postgres=# select x, x, lpad('string', 100, x::text) from generate_series(1, 10000000) x;
Killed

So this is just about fetching huge data through psql.

But if I reduce the number of rows by 10 times, it gives result without getting killed.

[ashutosh@ubuntu repro]psql -d postgres
psql (9.4devel)
Type "help" for help.

postgres=# select x, x, lpad('string', 100, x::text) from generate_series(1, 1000000) x;
    x    |    x    |                                                 lpad                                                
---------+---------+------------------------------------------------------------------------------------------------------
       1 |       1 | 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111string


May be each setup has it's own breaking point. So trying with larger number might reproduce the issue.

I tried to debug it with gdb, but all it showed me was that psql received a SIGKILL signal. I am not sure why.



On Thu, Feb 20, 2014 at 2:13 PM, amul sul <sul_amul@yahoo.co.in> wrote:
Hi,

I tried reproduce this bug on CENTOS 6.4 as well as on UBUNTU 13.04.
My Base machine is Window 7 and CentOs, Ubuntu is in VM.

CENTOS :
[amul@localhost postgresql]$ uname -a
Linux localhost.localdomain 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

UBUNTU:
[amul@localhost postgresql]$ uname -a
Linux localhost.localdomain 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


I didn't face any kill problem on both VM machine.
Even by making this table(big_tab)  bigger.
my select output some how as follow 
.
postgres=# select * from big_tab;
   val    |   val2   |                                                 str                                
                  
----------+----------+------------------------------------------------------------------------------------------------------
        1 |        1 | 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111string
        2 |        2 | 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222string
.
.
<skipped>

And other info
 
amul@amul:~/work/postgresql$ psql postgres

I installed from HEAD(ae5266f25910d6e084692a7cdbd02b9e52800046)


I failed to reproduce it, do I missing something?
 
Regards,

Amul Sul



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add a GUC to report whether data page checksums are enabled.
Next
From: Ian Lawrence Barwick
Date:
Subject: Re: Selecting large tables gets killed