[ The imperialist Japanese military must officially acknowledge and apologize for the coercion of young women into sexual slaves. / êꪤҳàõªòàõªÎÒ¿Ö˪˪·ª¿ð¨ÏÐñ«ëùìíÜâÏÚªÎ?ð¤àõªòÍëãÒªËìãªá¡¢Þóñªª·ªÊª±ªìªÐªÊªéªÊª¤. ]

»ç¿ëÀÚ

ID:
PW:

INDEX
01.°Ô½ÃÆÇ
°Ô½ÃÆÇ [72]
02.File Book
File ÀÚ·á½Ç [96]
Site Link [14]
°³ÀÎÆú´õ [200]
03.Field Book
Altibase [19]
Tibero [31]
MS-SQL [32]
MySQL [47]
DB2 [79]
ORACLE [3121]
PSQL [139]
CUBRID [5]
±âŸÁ¤º¸ [178]
¿î¿µÃ¼Á¦ [618]
04.Q/A Book
Q/A [53]
05.¹æ¸í·Ï
¹æ¸í·Ï [54]
·¹º§¾÷ [37]
±¸ÀÎ/±¸Á÷ [2]

±â³äÀÏ
Search
LINK
+ °¡Á· Hompy
+ DNSEver
IOTN :: Field Book :: PostgreSQL

 È¸¿ø°¡ÀÔ

psql HA
ÃÖ±æÈ£ [LIST]   2023-02-05 08:24:22, Á¶È¸ : 539

psql HA ±¸Ãà

##  master
------------------------------------------------
vi $PGDATA/postgresql.conf
listen_addresses =  '*'

vi $PGDATA/postgresql.auto.conf
wal_level = hot_standby
max_wal_senders = 2 # +1

grep 127 $PGDATA/pg_hba.conf
host    replication     all             127.0.0.1/32            trust

CREATE ROLE replication WITH REPLICATION PASSWORD 'postgrespwd' LOGIN;
alter user postgres password 'postgrespwd';


##  slave
------------------------------------------------
export PGDATA=/home/postgres/ha
rm -rf /home/postgres/ha/*
pg_basebackup -h localhost -D /home/postgres/ha -U replication -v -P -X stream
chmod 750 $PGDATA

## standby_mode º¯°æ to $PGDATA/standby.signal
touch $PGDATA/standby.signal
touch $PGDATA/recovery.signal

## $PGDATA/recovery.conf
## recovery.conf Á¦°Å to recovery.signal , standby.signal
## FATAL:  using recovery command file "recovery.conf" is not supported

vi $PGDATA/postgresql.auto.conf
hot_standby = 'on'
hot_standby_feedback = 'on'
port = 5433
## standby_mode = 'on' ## LOG:  unrecognized configuration parameter "standby_mode"
primary_conninfo='host=localhost port=5432 user=replication password=postgrespwd'
#promotion_trigger_file=

tail -f $PGDATA/log/postgresql-Sun.log
export PGDATA=/home/postgres/ha
pg_ctl start
psql -p 5433

## pg_controldata
master
pg_controldata -D $PGDATA | grep clu
Database cluster state:               in production
slave
pg_controldata -D /home/postgres/ha | grep clu
Database cluster state:               in archive recovery

## master
postgres=# select usename,client_addr,state,sync_state,reply_time from pg_stat_replication;
   usename   | client_addr |   state   | sync_state |          reply_time          
-------------+-------------+-----------+------------+-------------------------------
replication | 127.0.0.1   | streaming | async      | 2023-02-06 09:59:00.812877+09
(1 row)
## slave
postgres=# select sender_host,status,latest_end_time from pg_stat_wal_receiver;
sender_host |  status   |        latest_end_time        
-------------+-----------+-------------------------------
localhost   | streaming | 2023-02-06 09:52:07.390205+09


18.97.9.172


  LIST

Á¦¸ñ ÀÛ¼ºÀÚ ÀÛ¼ºÀÏ Á¶È¸
Admin  CentOS 5 ¼³Ä¡ °¡´É psql 11.22 ¼³Ä¡    ÃÖ±æÈ£ 2024/11/21 1
Admin  ERROR: permission denied: "RI_ConstraintTrigger_331308" is a system trigger / violates foreign key constraint    ÃÖ±æÈ£ 2024/10/28 6
Admin  ³¯Â¥ ¼ýÀÚ date unix epoch    ÃÖ±æÈ£ 2024/09/02 6
Admin  pg_backup_start / pg_backup_stop / psql ¼¼¼Ç À¯Áö / WARNING: aborting backup due to backend exiting before pg_backup_stop was called    ÃÖ±æÈ£ 2023/12/21 55
Admin  psql 10.7 oracle dblink [ oracle_fdw db link ]    ÃÖ±æÈ£ 2023/07/25 58
Admin  HA º¹±¸ test    ÃÖ±æÈ£ 2023/03/03 1856
Admin  log: COPY public.xxxx (xxx, xxx, xxx) TO stdout; / pg_dump ¹é¾÷½Ã ¹ß»ý    ÃÖ±æÈ£ 2023/03/03 43
Admin  requested timeline x is not a child of this server's history    ÃÖ±æÈ£ 2023/03/02 51
Admin  recovery_target_action / archive log ¹Þ¾Æ¼­ °è¼Ó º¹±¸    ÃÖ±æÈ£ 2023/02/28 56
Admin  recovery_target_action = 'pause' / select pg_wal_replay_pause(); / select pg_get_wal_replay_pause_state();    ÃÖ±æÈ£ 2023/02/27 40
Admin  memory buffer cache    ÃÖ±æÈ£ 2023/02/06 40
Admin  active session, pid, lock sql , kill pid / pg_terminate_backend    ÃÖ±æÈ£ 2023/02/06 105
Admin  psql HA    ÃÖ±æÈ£ 2023/02/05 539
Admin  pg_ctl start -D . | postmaster.pid | /tmp/.s.PGSQL.5432 |    ÃÖ±æÈ£ 2023/02/03 67
Admin  pg_waldump    ÃÖ±æÈ£ 2023/02/03 45
Troubleshoot  $PGDATA/pg_wal/00000002.history ¾ø´Â°æ¿ì [ ERROR: could not open file "pg_wal/00000002.history": ENOENT ]    ÃÖ±æÈ£ 2023/02/02 60
Admin  shmem_exit(0): 0 before_shmem_exit callbacks to make [ ·Î±× ±â·Ï¿ë ]    ÃÖ±æÈ£ 2023/02/01 97

    ¸ñ·Ïº¸±â   ´ÙÀ½ÆäÀÌÁö 1 [2][3][4][5][6][7]
       

Copyright 1999-2024 Zeroboard / skin by ÃÖ±æÈ£(gilho.kr@gmail.com)
ÃÖ±Ù ´ñ±Û
ÃÖ±Ù °Ô½Ã¹°
11/21
[PSQL]
CentOS 5 ¼³Ä¡ °¡´É psql 11.22 ¼³Ä¡.
by ÃÖ±æÈ£
10/28
[PSQL]
ERROR: permission denied: "RI....
by ÃÖ±æÈ£
10/25
[¿î¿µÃ¼Á¦]
yum install / "Could not resol....
by ÃÖ±æÈ£