!!! The continuation of request step #5 must be performed on the master server of the passive cluster side !!!
Postgres cluster #2:***************************
- db-pgsql03.oracak.com - master
9. Creating a clean schema for the application
[postgres]$>
# create backup schema
pg_dump -U stock -Fc -h db-pgsql01.oracak.com -f ./stock.dmp -s dbquik1 -n stock
recreate roles and database schema
# recreate database schema
pg_restore -d dbquik2 -s ./stock.dmp
!!! Continuing the request for step #5 on the server ogg-srv01.oracak.ru !!!
OGG server #1
***************************
- ogg-srv01.oracak.ru
10. Add the checkpoint table
[oracle] $> . ~/.profile.postgres.gg21
[oracle] $> $GG/ggsci
dblogin sourcedb gg_dbquik1 useridalias ggadmin
add checkpointtable ggadmin.ckpt_01
dblogin sourcedb gg_dbquik2 useridalias ggadmin
add checkpointtable ggadmin.ckpt_02
11. Enable extended logging on tables
-- Get the list of tables
-- SELECT 'add trandata stock."'||table_name||'"' FROM information_schema.tables WHERE table_schema = 'stock' and table_name like '%' order by table_name;
[oracle] $> $GG/ggsci
ggsci>>
dblogin sourcedb gg_dbquik1 useridalias ggadmin
--
add trandata ggadmin.HB
add trandata ggadmin.HB_TARGET
--
add trandata stock.bonds
add trandata stock.bonds_arch
add trandata stock.bonds_setting
add trandata stock.bonds_setting_arch
add trandata stock.bonds_zajvka
add trandata stock.bonds_zajvka_arch
add trandata stock.client_account
add trandata stock.client_account_arch
add trandata stock.dividents
add trandata stock.job_logs
add trandata stock.portfolio
add trandata stock.portfolio_arch
add trandata stock.quotes
add trandata stock.quotes_analyst_15m
add trandata stock.quotes_analyst_1d
add trandata stock.quotes_analyst_1h
add trandata stock.quotes_arch
add trandata stock.quotes_volume
add trandata stock.quotes_volume_arch
add trandata stock.report_benefit
add trandata stock.report_benefit_comparator
add trandata stock.report_edu
add trandata stock.report_edu_comparator
add trandata stock.sdelka
add trandata stock.sdelka_arch
add trandata stock.signal
add trandata stock.signal_arch
add trandata stock.trading_edu
add trandata stock.trading_prod
add trandata stock.trading_prod_arch
12. Enable extended logging on tables (for the second cluster)
-- Get the list of tables
-- SELECT 'add trandata stock."'||table_name||'"' FROM information_schema.tables WHERE table_schema = 'stock' and table_name like '%' order by table_name;
[oracle] $> $GG/ggsci
ggsci>>
dblogin sourcedb gg_dbquik2 useridalias ggadmin
--
add trandata ggadmin.HB
add trandata ggadmin.HB_TARGET
--
add trandata stock.bonds
add trandata stock.bonds_arch
add trandata stock.bonds_setting
add trandata stock.bonds_setting_arch
add trandata stock.bonds_zajvka
add trandata stock.bonds_zajvka_arch
add trandata stock.client_account
add trandata stock.client_account_arch
add trandata stock.dividents
add trandata stock.job_logs
add trandata stock.portfolio
add trandata stock.portfolio_arch
add trandata stock.quotes
add trandata stock.quotes_analyst_15m
add trandata stock.quotes_analyst_1d
add trandata stock.quotes_analyst_1h
add trandata stock.quotes_arch
add trandata stock.quotes_volume
add trandata stock.quotes_volume_arch
add trandata stock.report_benefit
add trandata stock.report_benefit_comparator
add trandata stock.report_edu
add trandata stock.report_edu_comparator
add trandata stock.sdelka
add trandata stock.sdelka_arch
add trandata stock.signal
add trandata stock.signal_arch
add trandata stock.trading_edu
add trandata stock.trading_prod
add trandata stock.trading_prod_arch
13. Registering the extract process (only for the active cluster)
[oracle] $> $GG/ggsci
ggsci>>
dblogin sourcedb gg_dbquik1 useridalias ggadmin
register extract e_quik1
INFO OGG-25355 Successfully created replication slot 'e_quik1_2d377917b79fbe11' for Extract group 'EQUK1' in database 'dbquik1'.
Note:
Please provide the names of the slots returned by the extract registration commands. These names will be used for configuring the Patroni cluster's slot names.
<<< Back Next >>>