vi postgresql.conf listen_addresses = '*'# what IP address(es) to listen on; port = 11921# (change requires restart) max_connections = 500# (change requires restart) superuser_reserved_connections = 13# (change requires restart) unix_socket_directory = '.'# (change requires restart) unix_socket_permissions = 0700# begin with 0 to use octal notation tcp_keepalives_idle = 60# TCP_KEEPIDLE, in seconds; tcp_keepalives_interval = 10# TCP_KEEPINTVL, in seconds; tcp_keepalives_count = 10# TCP_KEEPCNT; shared_buffers = 2048MB # min 128kB max_prepared_transactions = 500# zero disables the feature vacuum_cost_delay = 10ms # 0-100 milliseconds vacuum_cost_limit = 10000# 1-10000 credits bgwriter_delay = 10ms # 10-10000ms between rounds shared_queues = 64# min 16 shared_queue_size = 262144# min 16KB wal_level = hot_standby # minimal, archive, or hot_standby synchronous_commit = off # synchronization level; wal_sync_method = fdatasync # the default is the first option wal_buffers = 16384kB # min 32kB, -1 sets based on shared_buffers wal_writer_delay = 10ms # 1-10000 milliseconds checkpoint_segments = 128# in logfile segments, min 1, 16MB each archive_mode = on # allows archiving to be done archive_command = '/bin/date'# command to use to archive a logfile segment max_wal_senders = 32# max number of walsender processes hot_standby = on # "on" allows queries during recovery max_standby_archive_delay = 300s # max delay before canceling queries max_standby_streaming_delay = 300s # max delay before canceling queries wal_receiver_status_interval = 1s # send replies at least this often hot_standby_feedback = on # send info from standby to prevent remote_query_cost = 100.0# same scale as above effective_cache_size = 96000MB log_destination = 'csvlog'# Valid values are combinations of logging_collector = on # Enable capturing of stderr and csvlog log_directory = 'pg_log'# directory where log files are written, log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'# log file name pattern, log_file_mode = 0600# creation mode for log files, log_truncate_on_rotation = on # If on, an existing log file with the log_min_duration_statement = 1s # -1 is disabled, 0 logs all statements log_checkpoints = on log_connections = on log_disconnections = on log_error_verbosity = verbose # terse, default, or verbose messages log_lock_waits = on # log lock waits >= deadlock_timeout log_statement = 'ddl'# none, ddl, mod, all log_timezone = 'PRC' autovacuum = on # Enable autovacuum subprocess? 'on' log_autovacuum_min_duration = 0# -1 disables, 0 logs all actions and autovacuum_vacuum_cost_delay = 10ms # default vacuum cost delay for datestyle = 'iso, mdy' timezone = 'PRC' lc_messages = 'C'# locale for system error message lc_monetary = 'C'# locale for monetary formatting lc_numeric = 'C'# locale for number formatting lc_time = 'C'# locale for time formatting default_text_search_config = 'pg_catalog.english' pooler_port = 21921# Pool Manager TCP port max_pool_size = 100# Maximum pool size pool_conn_keepalive = 60# Close connections if they are idle pool_maintenance_timeout = 30# Launch maintenance routine if pooler max_coordinators = 16# Maximum number of Coordinators max_datanodes = 16# Maximum number of Datanodes gtm_host = '127.0.0.1'# Host name or address of GTM gtm_port = 11926# Port of GTM pgxc_node_name = 'c11921'# Coordinator or Datanode name sequence_range = 10000
vi pg_hba.conf local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust
vi postgresql.conf listen_addresses = '*'# what IP address(es) to listen on; port = 11922# (change requires restart) max_connections = 500# (change requires restart) superuser_reserved_connections = 13# (change requires restart) unix_socket_directory = '.'# (change requires restart) unix_socket_permissions = 0700# begin with 0 to use octal notation tcp_keepalives_idle = 60# TCP_KEEPIDLE, in seconds; tcp_keepalives_interval = 10# TCP_KEEPINTVL, in seconds; tcp_keepalives_count = 10# TCP_KEEPCNT; shared_buffers = 2048MB # min 128kB max_prepared_transactions = 500# zero disables the feature vacuum_cost_delay = 10ms # 0-100 milliseconds vacuum_cost_limit = 10000# 1-10000 credits bgwriter_delay = 10ms # 10-10000ms between rounds shared_queues = 64# min 16 shared_queue_size = 262144# min 16KB wal_level = hot_standby # minimal, archive, or hot_standby synchronous_commit = off # synchronization level; wal_sync_method = fdatasync # the default is the first option wal_buffers = 16384kB # min 32kB, -1 sets based on shared_buffers wal_writer_delay = 10ms # 1-10000 milliseconds checkpoint_segments = 128# in logfile segments, min 1, 16MB each archive_mode = on # allows archiving to be done archive_command = 'cp %p /home/postgres/archive/%f'# command to use to archive a logfile segment max_wal_senders = 32# max number of walsender processes hot_standby = on # "on" allows queries during recovery max_standby_archive_delay = 300s # max delay before canceling queries max_standby_streaming_delay = 300s # max delay before canceling queries wal_receiver_status_interval = 1s # send replies at least this often hot_standby_feedback = on # send info from standby to prevent remote_query_cost = 100.0# same scale as above effective_cache_size = 96000MB log_destination = 'csvlog'# Valid values are combinations of logging_collector = on # Enable capturing of stderr and csvlog log_directory = 'pg_log'# directory where log files are written, log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'# log file name pattern, log_file_mode = 0600# creation mode for log files, log_truncate_on_rotation = on # If on, an existing log file with the log_min_duration_statement = 1s # -1 is disabled, 0 logs all statements log_checkpoints = on log_connections = on log_disconnections = on log_error_verbosity = verbose # terse, default, or verbose messages log_lock_waits = on # log lock waits >= deadlock_timeout log_statement = 'ddl'# none, ddl, mod, all log_timezone = 'PRC' autovacuum = on # Enable autovacuum subprocess? 'on' log_autovacuum_min_duration = 0# -1 disables, 0 logs all actions and autovacuum_vacuum_cost_delay = 10ms # default vacuum cost delay for datestyle = 'iso, mdy' timezone = 'PRC' lc_messages = 'C'# locale for system error message lc_monetary = 'C'# locale for monetary formatting lc_numeric = 'C'# locale for number formatting lc_time = 'C'# locale for time formatting default_text_search_config = 'pg_catalog.english' pooler_port = 21925# Pool Manager TCP port max_pool_size = 100# Maximum pool size pool_conn_keepalive = 60# Close connections if they are idle pool_maintenance_timeout = 30# Launch maintenance routine if pooler max_coordinators = 16# Maximum number of Coordinators max_datanodes = 16# Maximum number of Datanodes gtm_host = '10.100.5.3'# Host name or address of GTM gtm_port = 11926# Port of GTM pgxc_node_name = 'd_41_11922'# Coordinator or Datanode name