pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Ashwin Agrawal <aagrawal@pivotal.io>
To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Zedstore - compressed in-core columnar storage
Date: Tue, 9 Apr 2019 18:08:40 +0300
Message-ID: <29097cfc-4e60-57c1-12e8-074d82bd6f33@iki.fi> (raw)
In-Reply-To: <cd2a0ed0-698f-85c8-a775-e25caa3ceb5a@postgrespro.ru>
References: <CALfoeiuF-m5jg51mJUPm5GN8u396o5sA2AF5N97vTRAEDYac7w@mail.gmail.com>
	<bf4b8f5f-90c9-025d-013c-87cf998204ad@postgrespro.ru>
	<cd2a0ed0-698f-85c8-a775-e25caa3ceb5a@postgrespro.ru>

On 09/04/2019 18:00, Konstantin Knizhnik wrote:
> On 09.04.2019 17:09, Konstantin Knizhnik wrote:
>> standard Postgres heap and my VOPS extension.
>> As test data I used TPC-H benchmark (actually only one lineitem table
>> generated with tpch-dbgen utility with scale factor 10 (~8Gb database).
>> I attached script which I have use to populate data (you have to to
>> download, build and run tpch-dbgen yourself, also you can comment code
>> related with VOPS).

Cool, thanks!

>> Unfortunately I failed to load data in zedstore:
>>
>> postgres=# insert into zedstore_lineitem_projection (select
>> l_shipdate,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag::"char",l_linestatus::"char"
>> from lineitem);
>> psql: ERROR:  compression failed. what now?
>> Time: 237804.775 ms (03:57.805)

Yeah, it's still early days, it will crash and burn in a lot of cases. 
We wanted to publish this early, to gather ideas and comments on the 
high level design, and to validate that the table AM API that's in v12 
is usable.

> Looks like the original problem was caused by internal postgres
> compressor: I have not configured Postgres to use lz4.
> When I configured Postgres --with-lz4, data was correctly inserted in
> zedstore table, but looks it is not compressed at all:
> 
> postgres=# select pg_relation_size('zedstore_lineitem_projection');
>    pg_relation_size
> ------------------
>          9363010640

The single-insert codepath isn't very optimized yet. If you populate the 
table with large "INSERT ... SELECT ...", you end up with a huge undo 
log. Try loading it with COPY.

You can also see how many pages of each type there is with:

select count(*), pg_zs_page_type('zedstore_lineitem_projection', g)
   from generate_series(0, pg_table_size('zedstore_lineitem_projection') 
/ 8192 - 1) g group by 2;

- Heikki





view thread (123+ messages)  latest in thread

Message-ID: <29097cfc-4e60-57c1-12e8-074d82bd6f33@iki.fi>
Permalink:  ../29097cfc-4e60-57c1-12e8-074d82bd6f33@iki.fi/
Also on:    postgresql.org/message-id/29097cfc-4e60-57c1-12e8-074d82bd6f33@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hlinnaka@iki.fi, k.knizhnik@postgrespro.ru, aagrawal@pivotal.io
  Subject: Re: Zedstore - compressed in-core columnar storage
  In-Reply-To: <29097cfc-4e60-57c1-12e8-074d82bd6f33@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox