/*
 * configuration parameters
 */
typedef struct {
    char *listen_addresses;            /* hostnames/IP addresses to listen on */
    int    port;                        /* port # to bind */
    char *pcp_listen_addresses;        /* PCP listen address to listen on */
    int pcp_port;                    /* PCP port # to bind */
    char *socket_dir;                /* pgpool socket directory */
    char *wd_ipc_socket_dir;        /* watchdog command IPC socket directory */
    char *pcp_socket_dir;            /* PCP socket directory */
    int    num_init_children;            /* # of children initially pre-forked */
    int    listen_backlog_multiplier;    /* determines the size of the connection queue */
    bool serialize_accept;            /* if non 0, serialize call to accept() to avoid thundering herd problem */
    int    child_life_time;            /* if idle for this seconds, child exits */
    int    connection_life_time;        /* if idle for this seconds, connection closes */
    int    child_max_connections;        /* if max_connections received, child exits */
    int client_idle_limit;            /* If client_idle_limit is n (n > 0), the client is forced to be
                                     *disconnected after n seconds idle */
    int authentication_timeout;        /* maximum time in seconds to complete client authentication */
    int    max_pool;                    /* max # of connection pool per child */
    char *logdir;                    /* logging directory */
    char *log_destination;            /* log destination: stderr or syslog */
    int syslog_facility;            /* syslog facility: LOCAL0, LOCAL1, ... */
    char *syslog_ident;                /* syslog ident string: pgpool */
    char *pid_file_name;            /* pid file name */
    bool replication_mode;            /* replication mode */
    bool log_connections;            /* logs incoming connections */
    bool log_hostname;                /* resolve hostname */
    bool enable_pool_hba;            /* enables pool_hba.conf file authentication */
    char *pool_passwd;                /* pool_passwd file name. "" disables pool_passwd */
    bool load_balance_mode;            /* load balance mode */

bool replication_stop_on_mismatch;    /* if there's a data mismatch between master and secondary
                                         * start degeneration to stop replication mode
                                         */
    bool failover_if_affected_tuples_mismatch;    /* If there's a disagreement with the number of affected tuples in
                                                 * UPDATE/DELETE, then degenerate the node which is most likely
                                                 * "minority".  # If false, just abort the transaction to keep the
                                                 * consistency.
                                                 */
    bool replicate_select;            /* replicate SELECT statement when load balancing is disabled. */
    char **reset_query_list;        /* comma separated list of queries to be issued at the end of session */
    char **white_function_list;        /* list of functions with no side effects */
    char **black_function_list;        /* list of functions with side effects */
    char *log_line_prefix;            /* printf-style string to output at beginning of each log line */
    int log_error_verbosity;        /* controls how much detail about error should be emitted */
    int client_min_messages;        /* controls which message should be sent to client */
    int log_min_messages;            /* controls which message should be emitted to server log */
    bool master_slave_mode;            /* operate in master/slave mode */
    MasterSlaveSubModes master_slave_sub_mode;        /* either "slony" or "stream" */
    int64 delay_threshold;            /* If the standby server delays more than delay_threshold,
                                     * any query goes to the primary only. The unit is in bytes.
                                     * 0 disables the check. Default is 0.
                                     * Note that health_check_period required to be greater than 0
                                     * to enable the functionality.
                                     */
    LogStandbyDelayModes log_standby_delay;    /* how to log standby lag */
    bool connection_cache;                    /* cache connection pool? */
    int health_check_timeout;                /* health check timeout */
    int health_check_period;                /* health check period */
    char *health_check_user;                /* PostgreSQL user name for health check */
    char *health_check_password;            /* password for health check username */
    char *health_check_database;            /* database name for health check username */
    int health_check_max_retries;            /* health check max retries */
    int health_check_retry_delay;            /* amount of time to wait between retries */
    int connect_timeout;                    /* timeout value before giving up connecting to backend */
    int sr_check_period;                    /* streaming replication check period */
    char *sr_check_user;                    /* PostgreSQL user name for streaming replication check */
    char *sr_check_password;                /* password for sr_check_user */
    char *sr_check_database;                /* PostgreSQL database name for streaming replication check */
    char *failover_command;                    /* execute command when failover happens */
    char *follow_master_command;            /* execute command when failover is ended */
    char *failback_command;                    /* execute command when failback happens */

bool    fail_over_on_backend_error;        /* If true, trigger fail over when writing to the backend
                                             * communication socket fails. This is the same behavior of
                                             * pgpool-II 2.2.x or earlier. If set to false, pgpool will report
                                             * an error and disconnect the session.
                                             */

char *recovery_user;                    /* PostgreSQL user name for online recovery */
    char *recovery_password;                /* PostgreSQL user password for online recovery */
    char *recovery_1st_stage_command;        /* Online recovery command in 1st stage */
    char *recovery_2nd_stage_command;        /* Online recovery command in 2nd stage */
    int recovery_timeout;                    /* maximum time in seconds to wait for remote start-up */
    int search_primary_node_timeout;        /* maximum time in seconds to search for new primary
                                             * node after failover
                                             */
    int client_idle_limit_in_recovery;        /* If > 0, the client is forced to be
                                             *  disconnected after n seconds idle
                                             *  This parameter is only valid while in recovery 2nd stage
                                             */
    bool insert_lock;                        /* automatically locking of table with INSERT to keep SERIAL data consistency?
                                             */
    bool ignore_leading_white_space;        /* ignore leading white spaces of each query */
     bool log_statement;                        /* logs all SQL statements */
     bool log_per_node_statement;            /* logs per node detailed SQL statements */
    char *lobj_lock_table;                    /* table name to lock for rewriting lo_creat */

int debug_level;                        /* debug message verbosity level.
                                             * 0: no message, 1 <= : more verbose
                                              */

BackendDesc *backend_desc;                /* PostgreSQL Server description. Placed on shared memory */

LOAD_BALANCE_STATUS    load_balance_status[MAX_NUM_BACKENDS];    /* to remember which DB node is selected for load balancing */

/* followings till syslog, does not exist in the configuration file */
    int num_reset_queries;                    /* number of queries in reset_query_list */
    int num_white_function_list;            /* number of functions in white_function_list */
    int num_black_function_list;            /* number of functions in black_function_list */
    int num_white_memqcache_table_list;        /* number of functions in white_memqcache_table_list */
    int num_black_memqcache_table_list;        /* number of functions in black_memqcache_table_list */
    int num_wd_monitoring_interfaces_list;  /* number of items in wd_monitoring_interfaces_list */
    int logsyslog;                            /* flag used to start logging to syslog */

/* ssl configuration */
    bool ssl;                                /* if non 0, activate ssl support (frontend+backend) */
    char *ssl_cert;                            /* path to ssl certificate (frontend only) */
    char *ssl_key;                            /* path to ssl key (frontend only) */
    char *ssl_ca_cert;                        /* path to root (CA) certificate */
    char *ssl_ca_cert_dir;                    /* path to directory containing CA certificates */

int64 relcache_expire;                    /* relation cache life time in seconds */
    int relcache_size;                        /* number of relation cache life entry */
    bool check_temp_table;                    /* enable temporary table check */
    bool check_unlogged_table;                /* enable unlogged table check */

/* followings are for regex support and do not exist in the configuration file */
    RegPattern *lists_patterns;                /* Precompiled regex patterns for black/white lists */
    int pattc;                                /* number of regexp pattern */
    int current_pattern_size;                /* size of the regex pattern array */

bool memory_cache_enabled;                /* if true, use the memory cache functionality, false by default */
    MemCacheMethod memqcache_method;        /* Cache store method. Either 'shmem'(shared memory) or 'memcached'. 'shmem' by default */
    char *memqcache_memcached_host;            /* Memcached host name. Mandatory if memqcache_method=memcached. */
    int memqcache_memcached_port;            /* Memcached port number. Mandatory if memqcache_method=memcached. */
    int64 memqcache_total_size;                /* Total memory size in bytes for storing memory cache. Mandatory if memqcache_method=shmem. */
    int memqcache_max_num_cache;            /* Total number of cache entries. Mandatory if memqcache_method=shmem. */
    int memqcache_expire;                    /* Memory cache entry life time specified in seconds. 60 by default. */
    bool memqcache_auto_cache_invalidation; /* If true, invalidation of query cache is triggered by corresponding */
                                            /* DDL/DML/DCL(and memqcache_expire).  If false, it is only triggered */
                                            /* by memqcache_expire.  True by default. */
    int memqcache_maxcache;                    /* Maximum SELECT result size in bytes. */
    int memqcache_cache_block_size;            /* Cache block size in bytes. 8192 by default */
    char *memqcache_oiddir;                    /* Temporary work directory to record table oids */
    char **white_memqcache_table_list;        /* list of tables to memqcache */
    char **black_memqcache_table_list;        /* list of tables not to memqcache */

RegPattern *lists_memqcache_table_patterns; /* Precompiled regex patterns for black/white lists */
    int memqcache_table_pattc;                    /* number of regexp pattern */
    int current_memqcache_table_pattern_size;    /* size of the regex pattern array */

/*
     * database_redirect_preference_list = 'postgres:primary,mydb[0-4]:1,mydb[5-9]:2'
     */
    char *database_redirect_preference_list;    /* raw string in pgpool.conf */
    RegArray *redirect_dbnames;                    /* Precompiled regex patterns for db prefrence list */
    Left_right_tokens *db_redirect_tokens;        /* db redirect for dbname and node string */

/*
     * app_name_redirect_preference_list = 'psql:primary,myapp[0-4]:1,myapp[5-9]:standby'
     */
    char *app_name_redirect_preference_list;    /* raw string in pgpool.conf */
    RegArray *redirect_app_names;                /* Precompiled regex patterns for app name prefrence list */
    Left_right_tokens *app_name_redirect_tokens;/* app name redirect for app_name and node string */

bool allow_sql_comments;        /* if on, ignore SQL comments when judging if load balance or query cache
                                     * is possible. If off, SQL comments effectively prevent the judgment
                                     * (pre 3.4 behavior). For backward compatibilty sake, default is off.
                                     */
    /*
     * add for watchdog
     */
    bool use_watchdog;                        /* Enables watchdog */
    WdLifeCheckMethod wd_lifecheck_method;    /* method of lifecheck. 'heartbeat' or 'query' */
    bool clear_memqcache_on_escalation;        /* Clear query cache on shmem when escalating ?*/
    char *wd_escalation_command;            /* Executes this command at escalation on new active pgpool.*/
    char *wd_de_escalation_command;            /* Executes this command when master pgpool goes down.*/
    char *wd_hostname;                        /* watchdog hostname */
    int wd_port;                            /* watchdog port */
    int wd_priority;                        /* watchdog node priority, during leader election*/
    WdRemoteNodesConfig wd_remote_nodes;    /* watchdog lists */
    char * trusted_servers;                    /* icmp reachable server list (A,B,C) */
    char * delegate_IP;                        /* delegate IP address */
    int  wd_interval;                        /* lifecheck interval (sec) */
    char *wd_authkey;                        /* Authentication key for watchdog communication */
    char * ping_path;                        /* path to ping command */
    char * if_cmd_path;                        /* path to interface up/down command */
    char * if_up_cmd;                        /* ifup command */
    char * if_down_cmd;                        /* ifdown command */
    char * arping_path;                        /* path to arping command */
    char * arping_cmd;                        /* arping command */
    int  wd_life_point;                        /* life point (retry times at lifecheck) */
    char *wd_lifecheck_query;                /* lifecheck query */
    char *wd_lifecheck_dbname;                /* Database name connected for lifecheck */
    char *wd_lifecheck_user;                /* PostgreSQL user name for watchdog */
    char *wd_lifecheck_password;            /* password for watchdog user */
    int wd_heartbeat_port;                    /* Port number for heartbeat lifecheck */
    int wd_heartbeat_keepalive;                /* Interval time of sending heartbeat signal (sec) */
    int wd_heartbeat_deadtime;                /* Deadtime interval for heartbeat signal (sec) */
    WdHbIf hb_if[WD_MAX_IF_NUM];            /* interface devices */
    int num_hb_if;                            /* number of interface devices */
    char **wd_monitoring_interfaces_list;    /* network interface name list to be monitored by watchdog */
} POOL_CONFIG;

pgpool中的配置参数的定义的更多相关文章

  1. 读取xml文件中的配置参数实例_java - JAVA

    文章来源:嗨学网 敏而好学论坛www.piaodoo.com 欢迎大家相互学习 paras.xml文件 <?xml version="1.0" encoding=" ...

  2. MySQL中的配置参数interactive_timeout和wait_timeout(可能导致过多sleep进程的两个参数)

    1)interactive_timeout:参数含义:服务器关闭交互式连接前等待活动的秒数.交互式客户端定义为在mysql_real_connect()中使用CLIENT_INTERACTIVE选项的 ...

  3. 项目中Zookeeper配置参数笔记

    ZooKeeper是以Fast Paxos算法为基础的,Paxos 算法存在活锁的问题,即当有多个proposer交错提交时,有可能互相排斥导致没有一个proposer能提交成功,而Fast Paxo ...

  4. Webpack中SplitChunksPlugin 配置参数详解

    代码分割本身和 webpack 没有什么关系,但是由于使用 webpack 可以非常轻松地实现代码分割,所以提到代码分割首先就会想到使用 webopack 实现. 在 webpack 中是使用 Spl ...

  5. Spring Boot(二):Spring Boot中的配置参数

    Spring Boot 配置参数 Spring Boot 帮助我们完成了许许多多的自动化配置 如果我们需要根据自己的需求修改配置 也是可以的 可以使用.properties 和 .yml 格式配置 这 ...

  6. Linux中ifcfg-eth0配置参数解释

    Linux中设置IP地址经常使用到ifcfg-eth0这个文件.  vi /etc/sysconfig/network-scripts/ifcfg-eth0 附录文件中的内容: DEVICE=eth0 ...

  7. java中可变长参数的定义及使用方法

    JAVA中可以为方法定义可变长参数( Varargs)来匹配不确定数量的多个参数,其定义用“...”表示.其实,这类似于为方法传了一个数组,且在使用方法上也和数组相同,如下: public void ...

  8. Tomcat server.xml中Connector配置参数详解

    Tomcat中Connector常用配置 Tomcat中server.xml有些配置信息是需要我们了解的,最起码知道如何进行简单的调试. <Connector port="8080&q ...

  9. [FreeRTOS入门] 1.CubeMX中FreeRTOS配置参数及理解

    1.有关优先级 1.1 Configuration --> FreeRTOS MAX_PRIORITIES 设置任务优先级的数量:配置应用程序有效的优先级数目.任何数量的任务都可以共享一个优先级 ...

随机推荐

  1. Auto Layout压缩阻力及内容吸附讲解

    Auto Layout压缩阻力及内容吸附讲解 本文为投稿文章,作者:梁炜V 在Auto Layout的使用中,有两个很重要的布局概念:Content Compression Resistance 和  ...

  2. Eclipse 中的 Bulid Path

    什么是Build Path? Build Path是指定Java工程所包含的资源属性集合. 在一个成熟的Java工程中,不仅仅有自己编写的源代码,还需要引用系统运行库(JRE).第三方的功能扩展库.工 ...

  3. RESTful API设计方法

    1.如果已经开始逐步的接触到了RESTful API设计方法的朋友,首先要对HTTP/HTTPS有一个大致的了解,虽然本身和RESTful API没有什么关系.但是对于增加网站的安全性还是十分重要的, ...

  4. 用SufaceGO加微软全家桶做个遥控车(一)

    作为一个dotnet技术的新手我是不好意思写帖子的,原因就是本人技术太水了,写出的帖子肯定会让人笑话.所以这次我是厚着脸皮写出这个帖子的,希望大佬们轻喷了.我的目标就是用SurfaceGo实现一个和我 ...

  5. 【原创】Vue.js 中 axios 跨域访问错误

    1.假如访问的接口地址为 http://www.test.com/apis/index.php  (php api 接口) 2.而开发地址为http://127.0.0.1:8080,当axios发起 ...

  6. nyoj314-斐波那契数列四吧

    斐波那契数列四吧 时间限制:3000 ms  |  内存限制:65535 KB 难度:2 描述 斐波那契数列为:0,1,1,2,3,5,8,13....,常规递推公式为f(n)=f(n-1)+f(n- ...

  7. NOI 2016 循环之美 (莫比乌斯反演+杜教筛)

    题目大意:略 洛谷传送门 鉴于洛谷最近总崩,附上良心LOJ链接 任何形容词也不够赞美这一道神题 $\sum\limits_{i=1}^{N}\sum\limits_{j=1}^{M}[gcd(i,j) ...

  8. [luogu4053 JSOI2007] 建筑抢修 (贪心 优先队列)

    传送门 题目描述 小刚在玩JSOI提供的一个称之为"建筑抢修"的电脑游戏:经过了一场激烈的战斗,T部落消灭了所有z部落的入侵者.但是T部落的基地里已经有N个建筑设施受到了严重的损伤 ...

  9. 02023_Arrays类的方法练习

    1.定义一个方法,接收一个数组,数组中存储10个学生考试分数,该方法要求返回考试分数最低的后三名考试分数. public static int[] method(double[] arr){ Arra ...

  10. 【ACM-ICPC 2018 南京赛区网络预赛 I】Skr

    [链接] 我是链接,点我呀:) [题意] 让你把一个字符串的所有回文子串加起来.(当做数字加起来) 求他们的和. [题解] 回文树. 从两个根节点分别遍历整棵回文树. 按照每个节点的定义. 得到每个节 ...