PostgreSQL streaming replication yog dab tsi?
PostgreSQL streaming replication yog dab tsi?

Video: PostgreSQL streaming replication yog dab tsi?

Video: PostgreSQL streaming replication yog dab tsi?
Video: PostgreSQL Streaming Replication Tutorial 2024, Kaum ib hlis
Anonim

Los ntawm PostgreSQL wiki

Streaming Replication (SR) muab lub peev xwm los txuas ntxiv nkoj thiab siv WAL XLOG cov ntaub ntawv rau qee tus naj npawb ntawm cov servers nyob rau hauv thiaj li yuav khaws lawv tam sim no. Qhov no feature tau ntxiv rau PostgreSQL 9.0

Cov lus nug tseem yog, PostgreSQL replication ua haujlwm li cas?

Tshaj tawm rov ua dua hauv PostgreSQL ua haujlwm ntawm log shipping. Txhua qhov kev hloov pauv hauv postgres yog sau rau ib daim ntawv teev npe hu ua WAL (sau-ua ntej log) kom ua tau raws li kev ua haujlwm ntev. Ib tug qhev siv cov ntu WAL mus txuas ntxiv rov ua dua hloov los ntawm nws tus tswv.

Tom qab ntawd, lo lus nug yog, muaj pes tsawg hom replication muaj nyob rau hauv PostgreSQL? PostgreSQL los nrog peb txawv replication txoj kev. Raws li nrog ntau yam, cwb rov ua dua txoj kev muaj nws cov pros thiab cons. Qhov thib peb txoj hauv kev rov tsim kho qhov tshiab thib ob los ntawm kev rov ua cov ntawv sau ua ntej (WAL) los ntawm blob cia xws li S3.

Ib yam li ib tug yuav nug, puas yog PostgreSQL txhawb nqa rov ua dua?

Features nyob rau hauv lub Core ntawm PostgreSQL Kub Standby / streaming Replication yog muaj li ntawm PostgreSQL 9.0 thiab muab asynchronous binary rov ua dua rau ib qho lossis ntau dua standbys. Standbys kuj tseem tuaj yeem ua qhov kub standbys txhais tau tias lawv ua tau yuav queried raws li ib tug nyeem nkaus xwb database.

Max_wal_senders yog dab tsi?

max_wal_senders (integer) Qhia txog tus lej siab tshaj plaws ntawm kev sib txuas sib txuas los ntawm cov servers standby lossis streaming hauv paus backup cov neeg siv khoom (piv txwv li, qhov siab tshaj plaws ntawm ib txhij khiav WAL cov txheej txheem xa tawm). Lub neej ntawd yog xoom, lub ntsiab lus replication yog neeg xiam.

Pom zoo: