Skip to content
Noah Watkins edited this page Dec 19, 2016 · 7 revisions

Development Notes

Build and install PostgreSQL:

git clone git://github.com/postgres/postgres.git
pushd postgres
git checkout REL9_6_1
./configure --prefix=$HOME/install
make
make install
popd

Initialize, serve, and connect to a database:

initdb -D data -A trust
# data/postgres.conf: shared_preload_libraries = 'pg_zlog'
postgres -D data
psql postgres

Build and install

make
# or for non-standard dependency installation location
make SHLIB_LINK="-L$HOME/install/lib -lrados -lzlog" \
  PG_CPPFLAGS="-I$HOME/install/include"

make install

Setup

CREATE EXTENSION pg_zlog;
CREATE TABLE coordinates (x int, y int);
SELECT pgzlog_create_log('mylog344444444444444', 'rbd', null);
SELECT pgzlog_replicate_table('coordinates');
INSERT INTO coordinates VALUES (0, 0);
TRUNCATE coordinates;
Clone this wiki locally