Created
October 5, 2017 17:52
-
-
Save fj/c2dd12080078cd87a776dbc951288203 to your computer and use it in GitHub Desktop.
This file contains 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
-- full-text search in JSON/JSONB columns | |
CREATE INDEX transactions_fts ON transactions | |
USING gin (( to_tsvector('english', transactions) )) | |
-- parallelism now supported or improved in: | |
-- * bitmap heap scans | |
-- * merge joins | |
-- * btree index scans | |
-- partitioning | |
CREATE TABLE integers (x INTEGER) PARTITION BY RANGE (x); | |
CREATE TABLE naturals PARTITION OF integers FOR VALUES FROM (0) TO (UNBOUNDED); | |
INSERT INTO integers VALUES (-500), (-123), (0), (123), (456); | |
SELECT * FROM naturals; | |
-- x | |
-- ---- | |
-- 0 | |
-- 123 | |
-- 456 | |
-- logical replication | |
-- on cluster one | |
CREATE PUBLICATION channel FOR TABLE jobs; | |
-- on cluster two | |
CREATE SUBSCRIPTION worker CONNECTION 'port=5432 dbname=worker_db' PUBLICATION channel; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment