← All posts tagged PostgreSQL

netneladno

pipelinedb сео мне лично сука пишет о том что они сделали
и как бы они хотели чтобы я купил у них платную версию

хочешь заказать разработку у команды Бартунова?
нееет, сперва добейся

netneladno

We recently started exploring Paxos as a technique for doing automated fail-over of PostgreSQL servers and wrote a simple implementation of Paxos and Multi-Paxos including basic support for membership changes in about 1000 lines of PL/pgSQL <>. We found PL/pgSQL to be an excellent tool for implementing Paxos, because the necessary transactional semantics are a natural part of the language. Other consensus algorithms would have been harder to implement in this way, because they rely on timers and other background tasks. 

The pg_paxos extension <> demonstrates how the Paxos functions can be used for fault-tolerant, consistent table replication in PostgreSQL. While a replicated table has high write and read latencies due to the network round-trips involved, it can be very useful for applications such as automated fail-over. We plan to add optimisations such as the ones applied in Google Megastore <research.> to reduce the overhead and develop the extension further to be able to replace components like etcd or Zookeeper.

netneladno

now we have parallel sequential scan!

For those following along at home, here's a demo:

rhaas=# \timing
Timing is on.
rhaas=# select * from pgbench_accounts where filler like '%a%';
aid | bid | abalance | filler
-----+-----+----------+--------
(0 rows)

Time: 743.061 ms
rhaas=# set max_parallel_degree = 4;
SET
Time: 0.270 ms
rhaas=# select * from pgbench_accounts where filler like '%a%';
aid | bid | abalance | filler
-----+-----+----------+--------
(0 rows)

Time: 213.412 ms

This is all pretty primitive at this point — there are still lots of
things that need to be fixed and improved, and it applies to only the
very simplest cases at present, but, hey, parallel query.  Check it
out.

netneladno

/usr/pgsql-9.5/bin/pgbench -c 100 -j 50 -P 5 -r -S -T 600 pgbench
progress: 105.0 s, 282394.1 tps, lat 0.353 ms stddev 0.198
progress: 110.0 s, 281564.0 tps, lat 0.354 ms stddev 0.195
progress: 115.0 s, 283643.9 tps, lat 0.351 ms stddev 0.181


/usr/pgsql-9.4/bin/pgbench -c 100 -j 50 -P 5 -r -S -T 600 pgbench
progress: 105.0 s, 191263.4 tps, lat 0.521 ms stddev 0.785
progress: 110.0 s, 188921.0 tps, lat 0.528 ms stddev 0.781
progress: 115.0 s, 189826.8 tps, lat 0.525 ms stddev 0.813

о такая хуйня малята