Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
28.12. Quick Setup
Prev UpChapter 28. Logical ReplicationHome Next

28.12. Quick Setup#

First set the configuration options inpostgresql.conf:

wal_level = logical

The other required settings have default values that are sufficient for a basic setup.

pg_hba.conf needs to be adjusted to allow replication (the values here depend on your actual network configuration and user you want to use for connecting):

host     all     repuser     0.0.0.0/0     md5

Then on the publisher database:

CREATE PUBLICATION mypub FOR TABLE users, departments;

And on the subscriber database:

CREATE SUBSCRIPTION mysub CONNECTION 'dbname=foo host=bar user=repuser' PUBLICATION mypub;

The above will start the replication process, which synchronizes the initial table contents of the tablesusers anddepartments and then starts replicating incremental changes to those tables.


Prev Up Next
28.11. Configuration Settings Home Chapter 29. Just-in-Time Compilation (JIT)
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp