This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"key": "ctrl+shift+u", | |
"command": "editor.action.transformToUppercase", | |
"when": "editorTextFocus" | |
},{ | |
"key": "ctrl+shift+l", | |
"command": "editor.action.transformToLowercase", | |
"when": "editorTextFocus" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Mechanics of the estimation | |
- Divide the project in phases, each within its deliverable. | |
- Ask the people in the meeting what is the estimation of hours per each phase. | |
- Get the average of the _n_ hours on each vote | |
n | |
mu = 1/n (∑ x_i) | |
i=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In bash, copy the file into the datadir: | |
cp /usr/share/dict/words data/pg95/words.list | |
CREATE TABLE randomTable(id serial PRIMARY KEY, description text); | |
CREATE INDEX ON randomTable USING GIN(to_tsvector('english',description)); | |
CREATE OR REPLACE FUNCTION getNArrayS(el text[], count int) RETURNS text AS $$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Escaped with $ as this runs from bash! | |
bin/psql -p7777 -Upostgres <<EOF | |
\c postgres | |
DROP DATABASE IF EXISTS shard0; | |
CREATE DATABASE shard0; | |
\c shard0 | |
CREATE EXTENSION postgres_fdw; | |
CREATE SERVER shard0 FOREIGN DATA WRAPPER postgres_fdw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install libedit-dev libpam0g-dev libselinux1-dev | |
wal_level = 'logical' | |
max_worker_processes = 10 # one per database needed on provider node | |
# one per node needed on subscriber node | |
max_replication_slots = 10 # one per node needed on provider node | |
max_wal_senders = 10 # one per node needed on provider node | |
shared_preload_libraries = 'pglogical' | |
track_commit_timestamp = on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sharding within Foreign Data Wrappers and Inheritance [WIP] | |
Previous sources: | |
https://www.depesz.com/2015/04/02/waiting-for-9-5-allow-foreign-tables-to-participate-in-inheritance/ | |
http://snowman.net/slides/pgfdw_sharding.pdf | |
Postgres 10 next things: | |
https://wiki.postgresql.org/wiki/Built-in_Sharding | |
<logical replication> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also https://github.com/guriandoro/docker , same but dockerized. | |
alias ll='ls -lha' | |
alias ls='ls --color=auto' | |
alias lxc-attach='lxc-attach -P $PWD' | |
alias lxc-create='lxc-create -P $PWD' | |
alias lxc-destroy='lxc-destroy -P $PWD' | |
alias lxc-info='lxc-info -P $PWD' | |
alias lxc-ls='lxc-ls --fancy -P $PWD' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linkbench log: | |
``` | |
INFO 2016-11-08 16:27:41,756 [Thread-7]: 667264/10000000 id1s loaded (6.7% complete) at 467.66 id1s/sec avg. 2650991 links loaded at 1857.97 links/sec avg. | |
INFO 2016-11-08 16:27:48,497 [Thread-1]: 675456/10000000 id1s loaded (6.8% complete) at 471.17 id1s/sec avg. 2707233 links loaded at 1888.47 links/sec avg. | |
INFO 2016-11-08 16:28:15,157 [Thread-6]: 687744/10000000 id1s loaded (6.9% complete) at 470.99 id1s/sec avg. 2759075 links loaded at 1889.49 links/sec avg. | |
INFO 2016-11-08 16:29:09,943 [Thread-8]: 700032/10000000 id1s loaded (7.0% complete) at 462.06 id1s/sec avg. 2822366 links loaded at 1862.94 links/sec avg. | |
INFO 2016-11-08 16:29:35,518 [Thread-4]: 710272/10000000 id1s loaded (7.1% complete) at 461.04 id1s/sec avg. 2855556 links loaded at 1853.55 links/sec avg. | |
INFO 2016-11-08 16:30:45,513 [Thread-5]: 722560/10000000 id1s loaded (7.2% complete) at 448.63 id1s/sec avg. 2953569 links loaded at 1833.86 links/sec avg. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DT=$(ls /var/log/sa/sa[0-9][0-9] | tr '\n' ' ' | sed 's/\/var\/log\/sa\/sa/ /g') | |
rm /tmp/sar-$(hostname)*-multiple.txt | |
for i in $DT; do | |
LC_ALL=C sar -A -f /var/log/sa/sa$i >> /tmp/sar-$(hostname)-{$i}-multiple.txt | |
done | |
tar cf allsars.tar /tmp/sar-$(hostname)*multiple.txt | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE test ( FTS_DOC_ID bigint unsigned AUTO_INCREMENT, | |
mainPk bigint, other text, | |
PRIMARY KEY(mainPk), | |
UNIQUE(FTS_DOC_ID) | |
); |