database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 7679 게시물 읽기
No. 7679
pgpool 관련 질문 드립니다
작성자
김태규
작성일
2009-04-09 17:55ⓒ
2009-04-09 17:56ⓜ
조회수
7,371

두대의 서버에 각각 설치하고 replicate 테스트중인데요

한대의 서버를 랜선을 제거 후 한곳 서버에 5432포트로 접속하여 데이터를 수정하면 특정 테이블만 가끔 수정이 되지 않습니다

제가 설정을 잘못한건지... 

제 pgpool.conf 설정입니다. 양쪽 모두 똑같이 설정해줬는데 이게 맞는건지요?

지금 설정은 양쪽 모두 설정이 같게 해놨습니다. 

 

"pgpool.conf" 143 행, 4556 문자

     1  #

     2  # pgpool configuration file sample

     3  # $Header: /cvsroot/pgpool/pgpool/pgpool.conf.sample,v 1.9 2007/07/19 05:29:57 y-asaba Exp $

     4

     5  # Host name or IP address to listen on: '*' for all, '' for no TCP/IP

     6  # connections

     7  listen_addresses = '*'

     8

     9  # Port number for pgpool

    10  port = 9999

    11

    12  # Unix domain socket path.  (The Debian package defaults to

    13  # /var/run/postgresql.)

    14  socket_dir = '/data/pgpool/tmp'

    15

    16  # Host name where PostgreSQL server is running on.  '' means localhost

    17  # using Unix domain socket.

    18  backend_host_name = 'svr1'

    19

    20  # port number PostgreSQL server is running on

    21  backend_port = 5432

    22

    23  # Unix domain socket path for the backend.  (The Debian package defaults

    24  # to /var/run/postgresql.)

    25  backend_socket_dir = '/data/pgpool/tmp'

    26

    27  # Host name where secondary PostgreSQL server is running on.  '' means

    28  # localhost using Unix domain socket.

    29  secondary_backend_host_name = 'svr2'

    30

    31  # Port number secondary PostgreSQL server is running on.  0 means no

    32  # secondary PostgreSQL.

    33  secondary_backend_port = 5432

    34

    35  # Number of pre-forked child processes

    36  num_init_children = 32

    37

    38  # Number of connection pools allowed for a child process

    39  max_pool = 4

    40 

    41  # If idle for this many seconds, child exits.  0 means no timeout.

    42  child_life_time = 300

    43 

    44  # If idle for this many seconds, connection to PostgreSQL closes.

    45  # 0 means no timeout.

    46  connection_life_time = 0

    47 

    48  # If child_max_connections connections were received, child exits.

    49  # 0 means no exit.

    50  child_max_connections = 0

    51 

    52  # Logging directory

    53  logdir = '/tmp'

    54 

    55  # Replication mode

    56  replication_mode = true

    57 

    58  # Set this to true if you want to avoid deadlock situations when

    59  # replication is enabled.  There will, however, be a noticable performance

    60  # degration.  A workaround is to set this to false and insert a /*STRICT*/

    61  # comment at the beginning of the SQL command.

    62  replication_strict = true

    63 

    64  # When replication_strict is set to false, there will be a chance for

    65  # deadlocks.  Set this to nonzero (in milliseconds) to detect this

    66  # situation and resolve the deadlock by aborting current session.

    67  replication_timeout = 5000

    68 

    69  # Load balancing mode, i.e., all SELECTs except in a transaction block

    70  # are load balanced.  This is ignored if replication_mode is false.

    71  load_balance_mode = false

    72 

    73  # Load balance weight for master and secondary.  The actual weight is

    74  # calculated by weight_master divided by weight_secondary.  For

    75  # example both

    76  #

    77  # weight_master = 10 and weight_secondary = 5

    78  # weight_master = 4 and weight_secondary = 2

    79  #

    80  # are regarded as the master having double the weight compared to the

    81  # secondary.  Master and secondary have the same weight in the default.

    82  weight_master = 0.5

    83  weight_secondary = 0.5

    84 

    85  # If there is a data mismatch between master and secondary, start

    86  # degeneration to stop replication mode.

    87  replication_stop_on_mismatch = true

    88 

    89  # If true, replicate SELECT statement when load balancing is disabled.

    90  # If false, it is only sended to the master node.

    91  replicate_select = false

    92 

    93  # Semicolon separated list of queries to be issued at the end of a session

    94  reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'

    95 

    96  # If true print time stamp on each log line.

    97  print_timestamp = true

    98 

    99  # If true, operate in master/slave mode.

   100  master_slave_mode = false

   101 

   102  # If true, cache connection pool.

   103  connection_cache = true

   104 

   105  # Health check timeout.  0 means no timeout.

   106  health_check_timeout = 20

   107 

   108  # Health check period.  0 means no health check.

   109  health_check_period = 0

   110 

   111  # Health check user

   112  health_check_user = 'nobody'

   113 

   114  # If true, automatically lock table with INSERT statements to keep SERIAL

   115  # data consistency.  An /*INSERT LOCK*/ comment has the same effect.  A

   116  # /NO INSERT LOCK*/ comment disables the effect.

   117  insert_lock = false

   118 

   119  # If true, ignore leading white spaces of each query while pgpool judges

   120  # whether the query is a SELECT so that it can be load balanced.  This

   121  # is useful for certain APIs such as DBI/DBD which is known to adding an

   122  # extra leading white space.

   123  ignore_leading_white_space = false

   124 

   125  # - What to Log -

   126 

   127  # If true, print all statements to the log.  Like the log_statement option

   128  # to PostgreSQL, this allows for observing queries without engaging in full

   129  # debugging.

   130  log_statement = false

   131 

   132  # If true, incoming connections will be printed to the log.

   133  log_connections = false

   134 

   135  # If true, hostname will be shown in ps status. Also shown in

   136  # connection log if log_connections = true.

   137  # Be warned that this feature will add overhead to look up hostname.

   138  log_hostname = false

   139 

   140  # - HBA -

   141 

   142  # If true, use pool_hba.conf for client authentication.

   143  enable_pool_hba = true




아니면 첫번째 서버의 backend_host_name = 'svr1'   secondary_backend_host_name = 'svr2'

두번째 서버의 설정은 backend_host_name = 'svr2'   secondary_backend_host_name = 'svr1'

이렇게 해주는게 맞는지요?  

[Top]
No.
제목
작성자
작성일
조회
7683pgpool 문의
김태규
2009-04-13
7160
7682특정 db에 통째로 select 권한을 줄수 없나요? [3]
문태준
2009-04-13
8285
7681메모리 때문일까요? [4]
souler
2009-04-12
6705
7679pgpool 관련 질문 드립니다
김태규
2009-04-09
7371
7678create function 내에 BEGIN TRANSACTION 처리 [1]
박춘삼
2009-04-08
7248
7677BITAND [1]
박춘삼
2009-04-08
7012
7676쿼리를 어떻게 만들면 빠르게 조회가 가능할까요. [1]
이기자
2009-04-06
6697
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다