<div dir="ltr">hello!<div><br></div><div><div><br></div><div>I configured the replication stream and trying to setup the pgsql I have that message in my /var/log/syslog</div></div><div><br></div><div><br></div><div>the two server is configured to ssh authorized_keys.<br>
</div><div><br></div><div><br></div><div><div><div><br></div><div><div>************root@slave:/var/lib/postgresql/9.1/main# tail -f /var/log/syslog ************</div><div>Mar 12 18:54:20 slave pgsql[3095]: WARNING: Can't get slave xlog location.</div>
<div>Mar 12 18:54:49 slave lrmd: [1058]: info: RA output: (res_pgsql_postgresql:0:monitor:stderr) /usr/lib/ocf/resource.d//heartbeat/pgsql: 1749: /usr/lib/ocf/resource.d//heartbeat/pgsql:</div><div>Mar 12 18:54:49 slave lrmd: [1058]: info: RA output: (res_pgsql_postgresql:0:monitor:stderr) ocf_local_nodename: not found</div>
<div>Mar 12 18:54:49 slave lrmd: [1058]: info: RA output: (res_pgsql_postgresql:0:monitor:stderr)</div><div>Mar 12 18:54:49 slave pgsql[4028]: INFO: Master does not exist.</div><div>Mar 12 18:54:49 slave pgsql[4028]: INFO: My data status=.</div>
<div>Mar 12 18:54:49 slave crm_attribute: [4135]: info: Invoked: /usr/sbin/crm_attribute -l reboot -N -n -v 0000000030000000 res_pgsql_postgresql-xlog-loc</div><div>Mar 12 18:54:49 slave lrmd: [1058]: info: RA output: (res_pgsql_postgresql:0:monitor:stderr) Could not map uname=-n to a UUID: The object/attribute does not exist</div>
<div>Mar 12 18:54:49 slave pgsql[4028]: WARNING: Can't get master xlog location.</div><div>Mar 12 18:54:49 slave pgsql[4028]: WARNING: Can't get slave xlog location.</div></div></div><div><br></div><div><br></div>
<div><div>******* root@slave:/var/lib/postgresql/9.1/main# tail -f /var/log/postgresql/postgresql-9.1-main.log **********</div><div>2014-03-12 18:42:39 PDT LOG: entering standby mode</div><div>cp: cannot stat `/var/lib/postgresql/9.1/main/pg_archive/00000001000000000000002D': No such file or directory</div>
<div>2014-03-12 18:42:39 PDT LOG: redo starts at 0/2D000078</div><div>2014-03-12 18:42:39 PDT LOG: consistent recovery state reached at 0/2E000000</div><div>2014-03-12 18:42:39 PDT LOG: database system is ready to accept read only connections</div>
<div>cp: cannot stat `/var/lib/postgresql/9.1/main/pg_archive/00000001000000000000002E': No such file or directory</div><div>2014-03-12 18:42:39 PDT LOG: unexpected pageaddr 0/25000000 in log file 0, segment 46, offset 0</div>
<div>cp: cannot stat `/var/lib/postgresql/9.1/main/pg_archive/00000001000000000000002E': No such file or directory</div><div>cp: cannot stat `/var/lib/postgresql/9.1/main/pg_archive/00000002.history': No such file or directory</div>
<div>2014-03-12 18:42:39 PDT LOG: streaming replication successfully connected to primary</div></div><div><br></div><div><br></div><div>************ crm_mon ***************</div><div><div>============</div><div>Last updated: Wed Mar 12 19:11:42 2014</div>
<div>Last change: Wed Mar 12 18:42:39 2014 via crm_resource on slave</div><div>Stack: openais</div><div>Current DC: slave - partition with quorum</div><div>Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c</div><div>
2 Nodes configured, 2 expected votes</div><div>3 Resources configured.</div><div>============</div><div><br></div><div>Online: [ slave master ]</div><div><br></div><div> Master/Slave Set: ms_pgsql_1 [res_pgsql_postgresql]</div>
<div> Slaves: [ slave ]</div><div> Stopped: [ res_pgsql_postgresql:1 ]</div><div>res_IPaddr2_1 (ocf::heartbeat:IPaddr2): Started master</div><div><br></div><div>Failed actions:</div><div> res_pgsql_postgresql:1_start_0 (node=master, call=45, rc=1, status=complete): unknown error</div>
</div><div><br></div><div><br></div><div><br></div><div>**************** crm cib ***********************</div><div><br></div><div><div><div>node master \</div><div><span class="" style="white-space:pre"> </span>attributes res_pgsql_postgresql-data-status="DISCONNECT" standby="off"</div>
<div>node slave \</div><div><span class="" style="white-space:pre"> </span>attributes res_pgsql_postgresql-data-status="DISCONNECT" standby="off"</div><div>primitive res_IPaddr2_1 ocf:heartbeat:IPaddr2 \</div>
<div><span class="" style="white-space:pre"> </span>params ip="172.70.65.71" nic="eth0:0" \</div><div><span class="" style="white-space:pre"> </span>operations $id="res_IPaddr2_1-operations" \</div>
<div><span class="" style="white-space:pre"> </span>op start interval="0" timeout="20" \</div><div><span class="" style="white-space:pre"> </span>op stop interval="0" timeout="20" \</div>
<div><span class="" style="white-space:pre"> </span>op monitor interval="10" timeout="20" start-delay="0"</div><div>primitive res_pgsql_postgresql ocf:heartbeat:pgsql \</div><div><span class="" style="white-space:pre"> </span>params pgctl="/usr/lib/postgresql/9.1/bin/pg_ctl" psql="/usr/lib/postgresql/9.1/bin/psql" pgdata="/var/lib/postgresql/9.1/main" monitor_user="postgres" monitor_password="postgres" config="/etc/postgresql/9.1/main/postgresql.conf" logfile="/var/log/postgresql/postgresql-9.1-main.log" socketdir="/var/run/postgresql" rep_mode="sync" node_list="master slave" restore_command="cp /var/lib/postgresql/9.1/main/pg_archive/%f %p" master_ip="172.70.65.61" restart_on_promote="true" \</div>
<div><span class="" style="white-space:pre"> </span>operations $id="res_pgsql_postgresql-operations" \</div><div><span class="" style="white-space:pre"> </span>op start interval="0" timeout="120" \</div>
<div><span class="" style="white-space:pre"> </span>op promote interval="0" timeout="120" \</div><div><span class="" style="white-space:pre"> </span>op demote interval="0" timeout="120" \</div>
<div><span class="" style="white-space:pre"> </span>op stop interval="0" timeout="120" \</div><div><span class="" style="white-space:pre"> </span>op monitor interval="29" timeout="30" start-delay="0" \</div>
<div><span class="" style="white-space:pre"> </span>op notify interval="0" timeout="90" \</div><div><span class="" style="white-space:pre"> </span>op methods interval="0" timeout="5" \</div>
<div><span class="" style="white-space:pre"> </span>meta target-role="started"</div><div>ms ms_pgsql_1 res_pgsql_postgresql \</div><div><span class="" style="white-space:pre"> </span>meta clone-max="2" notify="true" interleave="true"</div>
<div>property $id="cib-bootstrap-options" \</div><div><span class="" style="white-space:pre"> </span>default-resource-stickiness="100" \</div><div><span class="" style="white-space:pre"> </span>expected-quorum-votes="2" \</div>
<div><span class="" style="white-space:pre"> </span>stonith-enabled="false" \</div><div><span class="" style="white-space:pre"> </span>dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \</div>
<div><span class="" style="white-space:pre"> </span>no-quorum-policy="ignore" \</div><div><span class="" style="white-space:pre"> </span>cluster-infrastructure="openais" \</div><div><span class="" style="white-space:pre"> </span>last-lrm-refresh="1394676975"</div>
</div></div><div><br></div><div><br></div><div><br></div><div><div>if deactive the pgsql the replication work fine. </div><div>following the configure files.</div></div><div><br></div><div><br></div><div><br></div><div>******** SLAVE ********</div>
<div><br></div><div><div>******* root@slave:/var/lib/postgresql/9.1/main# cat recovery.conf</div><div><br></div><div>standby_mode = 'on'</div><div>primary_conninfo = 'host=172.70.65.61 port=5432 user=postgres application_name= '</div>
<div>restore_command = 'cp /var/lib/postgresql/9.1/main/pg_archive/%f %p'</div><div>recovery_target_timeline = 'latest'</div></div><div><br></div><div><br></div><div>******** root@slave:/var/lib/postgresql/9.1/main# cat /etc/postgresql/9.1/main/postgresql.conf<br>
</div><div><div># -----------------------------</div><div># PostgreSQL configuration file</div><div># -----------------------------</div><div>#</div><div># This file consists of lines of the form:</div><div>#</div><div># name = value</div>
<div>#</div><div># (The "=" is optional.) Whitespace may be used. Comments are introduced with</div><div># "#" anywhere on a line. The complete list of parameter names and allowed</div><div># values can be found in the PostgreSQL documentation.</div>
<div>#</div><div># The commented-out settings shown in this file represent the default values.</div><div># Re-commenting a setting is NOT sufficient to revert it to the default value;</div><div># you need to reload the server.</div>
<div>#</div><div># This file is read on server startup and when the server receives a SIGHUP</div><div># signal. If you edit the file on a running system, you have to SIGHUP the</div><div># server for the changes to take effect, or use "pg_ctl reload". Some</div>
<div># parameters, which are marked below, require a server shutdown and restart to</div><div># take effect.</div><div>#</div><div># Any parameter can also be given as a command-line option to the server, e.g.,</div><div>
# "postgres -c log_connections=on". Some parameters can be changed at run time</div><div># with the "SET" SQL command.</div><div>#</div><div># Memory units: kB = kilobytes Time units: ms = milliseconds</div>
<div># MB = megabytes s = seconds</div><div># GB = gigabytes min = minutes</div><div># h = hours</div>
<div># d = days</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div><div># FILE LOCATIONS</div><div>
#------------------------------------------------------------------------------</div><div><br></div><div># The default values of these variables are driven from the -D command-line</div><div># option or PGDATA environment variable, represented here as ConfigDir.</div>
<div><br></div><div>data_directory = '/var/lib/postgresql/9.1/main' # use data in another directory</div><div> # (change requires restart)</div><div>hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' # host-based authentication file</div>
<div> # (change requires restart)</div><div>ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' # ident configuration file</div><div> # (change requires restart)</div>
<div><br></div><div># If external_pid_file is not explicitly set, no extra PID file is written.</div><div>external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID file</div></div><div><div>
# (change requires restart)</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div><div># CONNECTIONS AND AUTHENTICATION</div>
<div>#------------------------------------------------------------------------------</div><div><br></div><div># - Connection Settings -</div><div><br></div><div>listen_addresses = '*' # what IP address(es) to listen on;</div>
<div> # comma-separated list of addresses;</div><div> # defaults to 'localhost', '*' = all</div><div> # (change requires restart)</div>
<div>port = 5432 # (change requires restart)</div><div>max_connections = 100 # (change requires restart)</div><div># Note: Increasing max_connections costs ~400 bytes of shared memory per</div>
<div># connection slot, plus lock space (see max_locks_per_transaction).</div><div>#superuser_reserved_connections = 3 # (change requires restart)</div><div>unix_socket_directory = '/var/run/postgresql' # (change requires restart)</div>
<div>#unix_socket_group = '' # (change requires restart)</div><div>#unix_socket_permissions = 0777 # begin with 0 to use octal notation</div><div> # (change requires restart)</div>
<div>#bonjour = off # advertise server via Bonjour</div><div> # (change requires restart)</div><div>#bonjour_name = '' # defaults to the computer name</div>
<div> # (change requires restart)</div><div><br></div><div># - Security and Authentication -</div><div><br></div><div>#authentication_timeout = 1min # 1s-600s</div><div>ssl = true # (change requires restart)</div>
<div>#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers</div><div> # (change requires restart)</div><div>#ssl_renegotiation_limit = 512MB # amount of data between renegotiations</div>
<div>#password_encryption = on</div><div>#db_user_namespace = off</div><div><br></div><div># Kerberos and GSSAPI</div><div>#krb_server_keyfile = ''</div><div>#krb_srvname = 'postgres' # (Kerberos only)</div>
<div>#krb_caseins_users = off</div><div><br></div><div># - TCP Keepalives -</div><div># see "man 7 tcp" for details</div><div><br></div><div>#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;</div>
<div> # 0 selects the system default</div><div>#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;</div><div> # 0 selects the system default</div>
</div><div><div>#tcp_keepalives_count = 0 # TCP_KEEPCNT;</div><div> # 0 selects the system default</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div>
<div># RESOURCE USAGE (except WAL)</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Memory -</div><div><br></div><div>shared_buffers = 24MB # min 128kB</div>
<div> # (change requires restart)</div><div>#temp_buffers = 8MB # min 800kB</div><div>#max_prepared_transactions = 0 # zero disables the feature</div><div>
# (change requires restart)</div><div># Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory</div><div># per transaction slot, plus lock space (see max_locks_per_transaction).</div>
<div># It is not advisable to set max_prepared_transactions nonzero unless you</div><div># actively intend to use prepared transactions.</div><div>#work_mem = 1MB # min 64kB</div><div>#maintenance_work_mem = 16MB # min 1MB</div>
<div>#max_stack_depth = 2MB # min 100kB</div><div><br></div><div># - Kernel Resource Usage -</div><div><br></div><div>#max_files_per_process = 1000 # min 25</div><div> # (change requires restart)</div>
<div>#shared_preload_libraries = '' # (change requires restart)</div><div><br></div><div># - Cost-Based Vacuum Delay -</div><div><br></div><div>#vacuum_cost_delay = 0ms # 0-100 milliseconds</div>
<div>#vacuum_cost_page_hit = 1 # 0-10000 credits</div><div>#vacuum_cost_page_miss = 10 # 0-10000 credits</div><div>#vacuum_cost_page_dirty = 20 # 0-10000 credits</div><div>#vacuum_cost_limit = 200 # 1-10000 credits</div>
<div><br></div><div># - Background Writer -</div><div><br></div><div>#bgwriter_delay = 200ms # 10-10000ms between rounds</div><div>#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round</div>
<div>#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round</div><div><br></div><div># - Asynchronous Behavior -</div><div><br></div><div>#effective_io_concurrency = 1 # 1-1000. 0 disables prefetching</div>
</div><div><div>#------------------------------------------------------------------------------</div><div># WRITE AHEAD LOG</div><div>#------------------------------------------------------------------------------</div><div>
<br></div><div># - Settings -</div><div><br></div><div>#wal_level = minimal # minimal, archive, or hot_standby</div><div> # (change requires restart)</div><div>#fsync = on # turns forced synchronization on or off</div>
<div>#synchronous_commit = on # synchronization level; on, off, or local</div><div>#wal_sync_method = fsync # the default is the first option</div><div> # supported by the operating system:</div>
<div> # open_datasync</div><div> # fdatasync (default on Linux)</div><div> # fsync</div><div> # fsync_writethrough</div>
<div> # open_sync</div><div>#full_page_writes = on # recover from partial page writes</div><div>#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers</div>
<div> # (change requires restart)</div><div>#wal_writer_delay = 200ms # 1-10000 milliseconds</div><div><br></div><div>#commit_delay = 0 # range 0-100000, in microseconds</div>
<div>#commit_siblings = 5 # range 1-1000</div><div><br></div><div># - Checkpoints -</div><div><br></div><div>#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each</div><div>#checkpoint_timeout = 5min # range 30s-1h</div>
<div>#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0</div><div>#checkpoint_warning = 30s # 0 disables</div><div><br></div><div># - Archiving -</div><div><br></div><div>#archive_mode = off # allows archiving to be done</div>
<div> # (change requires restart)</div><div>#archive_command = '' # command to use to archive a logfile segment</div><div>#archive_timeout = 0 # force a logfile segment switch after this</div>
<div> # number of seconds; 0 disables</div></div><div><div>#------------------------------------------------------------------------------</div><div># REPLICATION</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Master Server -</div><div><br></div><div># These settings are ignored on a standby server</div><div><br></div><div>#max_wal_senders = 0 # max number of walsender processes</div><div> # (change requires restart)</div>
<div>#wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds</div><div>#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables</div><div>#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed</div>
<div>#replication_timeout = 60s # in milliseconds; 0 disables</div><div>#synchronous_standby_names = '' # standby servers that provide sync rep</div><div> # comma-separated list of application_name</div>
<div> # from standby(s); '*' = all</div><div><br></div><div># - Standby Servers -</div><div><br></div><div># These settings are ignored on a master server</div><div><br></div><div>hot_standby = on # "on" allows queries during recovery</div>
<div> # (change requires restart)</div><div>#max_standby_archive_delay = 30s # max delay before canceling queries</div><div> # when reading WAL from archive;</div>
<div> # -1 allows indefinite delay</div><div>#max_standby_streaming_delay = 30s # max delay before canceling queries</div><div> # when reading streaming WAL;</div>
<div> # -1 allows indefinite delay</div><div>#wal_receiver_status_interval = 10s # send replies at least this often</div><div> # 0 disables</div>
<div>#hot_standby_feedback = off # send info from standby to prevent</div><div> # query conflicts</div></div><div><div>#------------------------------------------------------------------------------</div>
<div># QUERY TUNING</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Planner Method Configuration -</div><div><br></div><div>#enable_bitmapscan = on</div>
<div>#enable_hashagg = on</div><div>#enable_hashjoin = on</div><div>#enable_indexscan = on</div><div>#enable_material = on</div><div>#enable_mergejoin = on</div><div>#enable_nestloop = on</div><div>#enable_seqscan = on</div>
<div>#enable_sort = on</div><div>#enable_tidscan = on</div><div><br></div><div># - Planner Cost Constants -</div><div><br></div><div>#seq_page_cost = 1.0 # measured on an arbitrary scale</div><div>#random_page_cost = 4.0 # same scale as above</div>
<div>#cpu_tuple_cost = 0.01 # same scale as above</div><div>#cpu_index_tuple_cost = 0.005 # same scale as above</div><div>#cpu_operator_cost = 0.0025 # same scale as above</div><div>
#effective_cache_size = 128MB</div><div><br></div><div># - Genetic Query Optimizer -</div><div><br></div><div>#geqo = on</div><div>#geqo_threshold = 12</div><div>#geqo_effort = 5 # range 1-10</div><div>
#geqo_pool_size = 0 # selects default based on effort</div><div>#geqo_generations = 0 # selects default based on effort</div><div>#geqo_selection_bias = 2.0 # range 1.5-2.0</div>
<div>#geqo_seed = 0.0 # range 0.0-1.0</div><div><br></div><div># - Other Planner Options -</div><div><br></div><div>#default_statistics_target = 100 # range 1-10000</div><div>#constraint_exclusion = partition # on, off, or partition</div>
<div>#cursor_tuple_fraction = 0.1 # range 0.0-1.0</div><div>#from_collapse_limit = 8</div><div>#join_collapse_limit = 8 # 1 disables collapsing of explicit</div><div> # JOIN clauses</div>
</div><div><div>#------------------------------------------------------------------------------</div><div># ERROR REPORTING AND LOGGING</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Where to Log -</div><div><br></div><div>#log_destination = 'stderr' # Valid values are combinations of</div><div> # stderr, csvlog, syslog, and eventlog,</div>
<div> # depending on platform. csvlog</div><div> # requires logging_collector to be on.</div><div><br></div><div># This is used when logging to stderr:</div>
<div>#logging_collector = off # Enable capturing of stderr and csvlog</div><div> # into log files. Required to be on for</div><div> # csvlogs.</div>
<div> # (change requires restart)</div><div><br></div><div># These are only used if logging_collector is on:</div><div>#log_directory = 'pg_log' # directory where log files are written,</div>
<div> # can be absolute or relative to PGDATA</div><div>#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,</div><div> # can include strftime() escapes</div>
<div>#log_file_mode = 0600 # creation mode for log files,</div><div> # begin with 0 to use octal notation</div><div>#log_truncate_on_rotation = off # If on, an existing log file with the</div>
<div> # same name as the new log file will be</div><div> # truncated rather than appended to.</div><div> # But such truncation only occurs on</div>
<div> # time-driven rotation, not on restarts</div><div> # or size-driven rotation. Default is</div><div> # off, meaning append to existing files</div>
<div> # in all cases.</div><div>#log_rotation_age = 1d # Automatic rotation of logfiles will</div><div> # happen after that time. 0 disables.</div>
<div>#log_rotation_size = 10MB # Automatic rotation of logfiles will</div><div> # happen after that much log output.</div><div> # 0 disables.</div>
<div><br></div><div># These are relevant when logging to syslog:</div><div>#syslog_facility = 'LOCAL0'</div><div>#syslog_ident = 'postgres'</div><div><br></div><div>#silent_mode = off # Run server silently.</div>
<div> # DO NOT USE without syslog or</div><div> # logging_collector</div><div> # (change requires restart)</div>
</div><div><div># - When to Log -</div><div><br></div><div>#client_min_messages = notice # values in order of decreasing detail:</div><div> # debug5</div><div> # debug4</div>
<div> # debug3</div><div> # debug2</div><div> # debug1</div><div> # log</div>
<div> # notice</div><div> # warning</div><div> # error</div><div><br></div><div>#log_min_messages = warning # values in order of decreasing detail:</div>
<div> # debug5</div><div> # debug4</div><div> # debug3</div><div> # debug2</div>
<div> # debug1</div><div> # info</div><div> # notice</div><div> # warning</div>
<div> # error</div><div> # log</div><div> # fatal</div><div> # panic</div>
<div><br></div><div>#log_min_error_statement = error # values in order of decreasing detail:</div><div> # debug5</div><div> # debug4</div>
<div> # debug3</div><div> # debug2</div><div> # debug1</div><div> # info</div>
<div> # notice</div><div> # warning</div><div> # error</div><div> # log</div>
<div> # fatal</div><div> # panic (effectively off)</div><div><br></div><div>#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements</div>
<div> # and their durations, > 0 logs only</div><div> # statements running at least this number</div><div> # of milliseconds</div>
</div><div><div># - What to Log -</div><div><br></div><div>#debug_print_parse = off</div><div>#debug_print_rewritten = off</div><div>#debug_print_plan = off</div><div>#debug_pretty_print = on</div><div>#log_checkpoints = off</div>
<div>#log_connections = off</div><div>#log_disconnections = off</div><div>#log_duration = off</div><div>#log_error_verbosity = default # terse, default, or verbose messages</div><div>#log_hostname = off</div><div>
log_line_prefix = '%t ' # special values:</div><div> # %a = application name</div><div> # %u = user name</div><div>
# %d = database name</div><div> # %r = remote host and port</div><div> # %h = remote host</div><div>
# %p = process ID</div><div> # %t = timestamp without milliseconds</div><div> # %m = timestamp with milliseconds</div>
<div> # %i = command tag</div><div> # %e = SQL state</div><div> # %c = session ID</div><div> # %l = session line number</div>
<div> # %s = session start timestamp</div><div> # %v = virtual transaction ID</div><div> # %x = transaction ID (0 if none)</div>
<div> # %q = stop here in non-session</div><div> # processes</div><div> # %% = '%'</div>
<div> # e.g. '<%u%%%d> '</div><div>#log_lock_waits = off # log lock waits >= deadlock_timeout</div><div>#log_statement = 'none' # none, ddl, mod, all</div>
<div>#log_temp_files = -1 # log temporary files equal or larger</div><div> # than the specified size in kilobytes;</div><div> # -1 disables, 0 logs all temp files</div>
<div>#log_timezone = '(defaults to server environment setting)'</div></div><div><div>#------------------------------------------------------------------------------</div><div># RUNTIME STATISTICS</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Query/Index Statistics Collector -</div><div><br></div><div>#track_activities = on</div><div>#track_counts = on</div><div>#track_functions = none # none, pl, all</div><div>#track_activity_query_size = 1024 # (change requires restart)</div>
<div>#update_process_title = on</div><div>#stats_temp_directory = 'pg_stat_tmp'</div><div><br></div><div><br></div><div># - Statistics Monitoring -</div><div><br></div><div>#log_parser_stats = off</div><div>#log_planner_stats = off</div>
<div>#log_executor_stats = off</div><div>#log_statement_stats = off</div></div><div><div>#------------------------------------------------------------------------------</div><div># AUTOVACUUM PARAMETERS</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div>#autovacuum = on # Enable autovacuum subprocess? 'on'</div><div> # requires track_counts to also be on.</div><div>#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and</div>
<div> # their durations, > 0 logs only</div><div> # actions running at least this number</div><div> # of milliseconds.</div>
<div>#autovacuum_max_workers = 3 # max number of autovacuum subprocesses</div><div> # (change requires restart)</div><div>#autovacuum_naptime = 1min # time between autovacuum runs</div>
<div>#autovacuum_vacuum_threshold = 50 # min number of row updates before</div><div> # vacuum</div><div>#autovacuum_analyze_threshold = 50 # min number of row updates before</div>
<div> # analyze</div><div>#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum</div><div>#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze</div>
<div>#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum</div><div> # (change requires restart)</div><div>#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for</div>
<div> # autovacuum, in milliseconds;</div><div> # -1 means use vacuum_cost_delay</div><div>#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for</div>
<div> # autovacuum, -1 means use</div><div> # vacuum_cost_limit</div></div><div><div>#------------------------------------------------------------------------------</div>
<div># CLIENT CONNECTION DEFAULTS</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Statement Behavior -</div><div><br></div><div>#search_path = '"$user",public' # schema names</div>
<div>#default_tablespace = '' # a tablespace name, '' uses the default</div><div>#temp_tablespaces = '' # a list of tablespace names, '' uses</div><div> # only default tablespace</div>
<div>#check_function_bodies = on</div><div>#default_transaction_isolation = 'read committed'</div><div>#default_transaction_read_only = off</div><div>#default_transaction_deferrable = off</div><div>#session_replication_role = 'origin'</div>
<div>#statement_timeout = 0 # in milliseconds, 0 is disabled</div><div>#vacuum_freeze_min_age = 50000000</div><div>#vacuum_freeze_table_age = 150000000</div><div>#bytea_output = 'hex' # hex, escape</div>
<div>#xmlbinary = 'base64'</div><div>#xmloption = 'content'</div><div><br></div><div># - Locale and Formatting -</div><div><br></div><div>datestyle = 'iso, mdy'</div><div>#intervalstyle = 'postgres'</div>
<div>#timezone = '(defaults to server environment setting)'</div><div>#timezone_abbreviations = 'Default' # Select the set of available time zone</div><div> # abbreviations. Currently, there are</div>
<div> # Default</div><div> # Australia</div><div> # India</div><div> # You can create your own file in</div>
<div> # share/timezonesets/.</div><div>#extra_float_digits = 0 # min -15, max 3</div><div>#client_encoding = sql_ascii # actually, defaults to database</div>
<div> # encoding</div><div><br></div><div># These settings are initialized by initdb, but they can be changed.</div><div>lc_messages = 'en_US.UTF-8' # locale for system error message</div>
<div> # strings</div><div>lc_monetary = 'en_US.UTF-8' # locale for monetary formatting</div><div>lc_numeric = 'en_US.UTF-8' # locale for number formatting</div>
<div>lc_time = 'en_US.UTF-8' # locale for time formatting</div><div><br></div><div># default configuration for text search</div><div>default_text_search_config = 'pg_catalog.english'</div>
</div><div><div># - Other Defaults -</div><div><br></div><div>#dynamic_library_path = '$libdir'</div><div>#local_preload_libraries = ''</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div>
<div># LOCK MANAGEMENT</div><div>#------------------------------------------------------------------------------</div><div><br></div><div>#deadlock_timeout = 1s</div><div>#max_locks_per_transaction = 64 # min 10</div>
<div> # (change requires restart)</div><div># Note: Each lock table slot uses ~270 bytes of shared memory, and there are</div><div># max_locks_per_transaction * (max_connections + max_prepared_transactions)</div>
<div># lock table slots.</div><div>#max_pred_locks_per_transaction = 64 # min 10</div><div> # (change requires restart)</div><div><br></div><div>#------------------------------------------------------------------------------</div>
<div># VERSION/PLATFORM COMPATIBILITY</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Previous PostgreSQL Versions -</div><div><br></div><div>#array_nulls = on</div>
<div>#backslash_quote = safe_encoding # on, off, or safe_encoding</div><div>#default_with_oids = off</div><div>#escape_string_warning = on</div><div>#lo_compat_privileges = off</div><div>#quote_all_identifiers = off</div>
<div>#sql_inheritance = on</div><div>#standard_conforming_strings = on</div><div>#synchronize_seqscans = on</div><div><br></div><div># - Other Platforms and Clients -</div><div><br></div><div>#transform_null_equals = off</div>
</div><div><div>#------------------------------------------------------------------------------</div><div># ERROR HANDLING</div><div>#------------------------------------------------------------------------------</div><div>
<br></div><div>#exit_on_error = off # terminate session on any error?</div><div>#restart_after_crash = on # reinitialize after backend crash?</div><div><br></div><div><br></div>
<div>#------------------------------------------------------------------------------</div><div># CUSTOMIZED OPTIONS</div><div>#------------------------------------------------------------------------------</div><div><br></div>
<div>#custom_variable_classes = '' # list of custom variable class names</div><div>include '/var/lib/pgsql/tmp/rep_mode.conf' # added by pgsql RA</div></div><div><br></div><div><br></div><div><div>
******** root@slave:/var/lib/postgresql/9.1/main# cat /var/lib/pgsql/tmp/rep_mode.conf</div><div>synchronous_standby_names = ''</div></div><div><br></div><div><br></div><div><br></div><div><div>******** root@slave:/var/lib/postgresql/9.1/main# cat /etc/corosync/corosync.conf</div>
<div># Please read the openais.conf.5 manual page</div><div><br></div><div>totem {</div><div> version: 2</div><div><br></div><div> # How long before declaring a token lost (ms)</div><div> token: 3000</div>
<div><br></div><div> # How many token retransmits before forming a new configuration</div><div> token_retransmits_before_loss_const: 10</div><div><br></div><div> # How long to wait for join messages in the membership protocol (ms)</div>
<div> join: 60</div><div><br></div><div> # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms)</div><div> consensus: 3600</div><div><br></div><div>
# Turn off the virtual synchrony filter</div><div> vsftype: none</div><div><br></div><div> # Number of messages that may be sent by one processor on receipt of the token</div><div> max_messages: 20</div>
<div><br></div><div> # Limit generated nodeids to 31-bits (positive signed integers)</div><div> clear_node_high_bit: yes</div><div><br></div><div> # Disable encryption</div><div> secauth: off</div>
<div><br></div><div> # How many threads to use for encryption/decryption</div><div> threads: 0</div><div><br></div><div> # Optionally assign a fixed node id (integer)</div><div> # nodeid: 1234</div>
<div><br></div><div> # This specifies the mode of redundant ring, which may be none, active, or passive.</div><div> rrp_mode: none</div><div><br></div><div> interface {</div><div> # The following values need to be set based on your environment</div>
<div> ringnumber: 0</div><div> bindnetaddr: 172.70.65.71</div><div> mcastaddr: 226.94.1.1</div><div> mcastport: 5405</div><div> }</div><div>}</div><div><br>
</div><div>amf {</div><div> mode: disabled</div><div>}</div><div><br></div><div>service {</div><div> # Load the Pacemaker Cluster Resource Manager</div><div> ver: 0</div><div> name: pacemaker</div>
<div>}</div><div><br></div><div>aisexec {</div><div> user: root</div><div> group: root</div><div>}</div><div><br></div><div>logging {</div><div> fileline: off</div><div> to_stderr: yes</div>
<div> to_logfile: no</div><div> to_syslog: yes</div><div> syslog_facility: daemon</div><div> debug: off</div><div> timestamp: on</div><div> logger_subsys {</div><div> subsys: AMF</div>
<div> debug: off</div><div> tags: enter|leave|trace1|trace2|trace3|trace4|trace6</div><div> }</div><div>}</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br>
</div><div>*************** MASTER ******************************</div><div><br></div><div>********** root@master:/etc/postgresql/9.1/main# cat postgresql.conf </div><div><br></div><div><div># -----------------------------</div>
<div># PostgreSQL configuration file</div><div># -----------------------------</div><div>#</div><div># This file consists of lines of the form:</div><div>#</div><div># name = value</div><div>#</div><div># (The "=" is optional.) Whitespace may be used. Comments are introduced with</div>
<div># "#" anywhere on a line. The complete list of parameter names and allowed</div><div># values can be found in the PostgreSQL documentation.</div><div>#</div><div># The commented-out settings shown in this file represent the default values.</div>
<div># Re-commenting a setting is NOT sufficient to revert it to the default value;</div><div># you need to reload the server.</div><div>#</div><div># This file is read on server startup and when the server receives a SIGHUP</div>
<div># signal. If you edit the file on a running system, you have to SIGHUP the</div><div># server for the changes to take effect, or use "pg_ctl reload". Some</div><div># parameters, which are marked below, require a server shutdown and restart to</div>
<div># take effect.</div><div>#</div><div># Any parameter can also be given as a command-line option to the server, e.g.,</div><div># "postgres -c log_connections=on". Some parameters can be changed at run time</div>
<div># with the "SET" SQL command.</div><div>#</div><div># Memory units: kB = kilobytes Time units: ms = milliseconds</div><div># MB = megabytes s = seconds</div><div>
# GB = gigabytes min = minutes</div><div># h = hours</div><div># d = days</div><div>
<br></div><div><br></div><div>#------------------------------------------------------------------------------</div><div># FILE LOCATIONS</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># The default values of these variables are driven from the -D command-line</div><div># option or PGDATA environment variable, represented here as ConfigDir.</div><div><br></div><div>data_directory = '/var/lib/postgresql/9.1/main' # use data in another directory</div>
<div> # (change requires restart)</div><div>hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' # host-based authentication file</div><div> # (change requires restart)</div>
<div>ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' # ident configuration file</div><div> # (change requires restart)</div><div><br></div><div># If external_pid_file is not explicitly set, no extra PID file is written.</div>
<div>external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID file</div></div><div><div> # (change requires restart)</div><div><br></div><div><br>
</div><div>#------------------------------------------------------------------------------</div><div># CONNECTIONS AND AUTHENTICATION</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Connection Settings -</div><div><br></div><div>listen_addresses = '*' # what IP address(es) to listen on;</div><div> # comma-separated list of addresses;</div>
<div> # defaults to 'localhost', '*' = all</div><div> # (change requires restart)</div><div>port = 5432 # (change requires restart)</div>
<div>max_connections = 100 # (change requires restart)</div><div># Note: Increasing max_connections costs ~400 bytes of shared memory per</div><div># connection slot, plus lock space (see max_locks_per_transaction).</div>
<div>#superuser_reserved_connections = 3 # (change requires restart)</div><div>unix_socket_directory = '/var/run/postgresql' # (change requires restart)</div><div>#unix_socket_group = '' # (change requires restart)</div>
<div>#unix_socket_permissions = 0777 # begin with 0 to use octal notation</div><div> # (change requires restart)</div><div>#bonjour = off # advertise server via Bonjour</div>
<div> # (change requires restart)</div><div>#bonjour_name = '' # defaults to the computer name</div><div> # (change requires restart)</div>
<div><br></div><div># - Security and Authentication -</div><div><br></div><div>#authentication_timeout = 1min # 1s-600s</div><div>ssl = true # (change requires restart)</div><div>#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers</div>
<div> # (change requires restart)</div><div>#ssl_renegotiation_limit = 512MB # amount of data between renegotiations</div><div>#password_encryption = on</div><div>#db_user_namespace = off</div>
<div><br></div><div># Kerberos and GSSAPI</div><div>#krb_server_keyfile = ''</div><div>#krb_srvname = 'postgres' # (Kerberos only)</div><div>#krb_caseins_users = off</div><div><br></div><div>
# - TCP Keepalives -</div><div># see "man 7 tcp" for details</div><div><br></div><div>#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;</div><div> # 0 selects the system default</div>
<div>#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;</div><div> # 0 selects the system default</div></div><div><div>#tcp_keepalives_count = 0 # TCP_KEEPCNT;</div>
<div> # 0 selects the system default</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div><div># RESOURCE USAGE (except WAL)</div>
<div>#------------------------------------------------------------------------------</div><div><br></div><div># - Memory -</div><div><br></div><div>shared_buffers = 24MB # min 128kB</div><div> # (change requires restart)</div>
<div>#temp_buffers = 8MB # min 800kB</div><div>#max_prepared_transactions = 0 # zero disables the feature</div><div> # (change requires restart)</div><div>
# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory</div><div># per transaction slot, plus lock space (see max_locks_per_transaction).</div><div># It is not advisable to set max_prepared_transactions nonzero unless you</div>
<div># actively intend to use prepared transactions.</div><div>#work_mem = 1MB # min 64kB</div><div>#maintenance_work_mem = 16MB # min 1MB</div><div>#max_stack_depth = 2MB # min 100kB</div>
<div><br></div><div># - Kernel Resource Usage -</div><div><br></div><div>#max_files_per_process = 1000 # min 25</div><div> # (change requires restart)</div><div>#shared_preload_libraries = '' # (change requires restart)</div>
<div><br></div><div># - Cost-Based Vacuum Delay -</div><div><br></div><div>#vacuum_cost_delay = 0ms # 0-100 milliseconds</div><div>#vacuum_cost_page_hit = 1 # 0-10000 credits</div><div>#vacuum_cost_page_miss = 10 # 0-10000 credits</div>
<div>#vacuum_cost_page_dirty = 20 # 0-10000 credits</div><div>#vacuum_cost_limit = 200 # 1-10000 credits</div><div><br></div><div># - Background Writer -</div><div><br></div><div>#bgwriter_delay = 200ms # 10-10000ms between rounds</div>
<div>#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round</div><div>#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round</div><div><br></div><div># - Asynchronous Behavior -</div>
<div><br></div><div>#effective_io_concurrency = 1 # 1-1000. 0 disables prefetching</div></div><div><div>#------------------------------------------------------------------------------</div><div># WRITE AHEAD LOG</div>
<div>#------------------------------------------------------------------------------</div><div><br></div><div># - Settings -</div><div><br></div><div>wal_level = hot_standby # minimal, archive, or hot_standby</div>
<div> # (change requires restart)</div><div>#fsync = on # turns forced synchronization on or off</div><div>#synchronous_commit = on # synchronization level; on, off, or local</div>
<div>#wal_sync_method = fsync # the default is the first option</div><div> # supported by the operating system:</div><div> # open_datasync</div>
<div> # fdatasync (default on Linux)</div><div> # fsync</div><div> # fsync_writethrough</div><div>
# open_sync</div><div>#full_page_writes = on # recover from partial page writes</div><div>#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers</div>
<div> # (change requires restart)</div><div>#wal_writer_delay = 200ms # 1-10000 milliseconds</div><div><br></div><div>#commit_delay = 0 # range 0-100000, in microseconds</div>
<div>#commit_siblings = 5 # range 1-1000</div><div><br></div><div># - Checkpoints -</div><div><br></div><div>#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each</div><div>#checkpoint_timeout = 5min # range 30s-1h</div>
<div>#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0</div><div>#checkpoint_warning = 30s # 0 disables</div><div><br></div><div># - Archiving -</div><div><br></div><div>archive_mode = on # allows archiving to be done</div>
<div> # (change requires restart)</div><div>archive_command = 'rsync -a %p -e root@slave:/var/lib/postgresql/9.1/main/pg_archive/%f' # command to use to archive a logfile segment</div>
<div>archive_timeout = 10 # force a logfile segment switch after this</div><div> # number of seconds; 0 disables</div><div><div>#------------------------------------------------------------------------------</div>
<div># REPLICATION</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Master Server -</div><div><br></div><div># These settings are ignored on a standby server</div>
<div><br></div><div>max_wal_senders = 5 # max number of walsender processes</div><div> # (change requires restart)</div><div>#wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds</div>
<div>wal_keep_segments = 32 # in logfile segments, 16MB each; 0 disables</div><div>#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed</div><div>#replication_timeout = 60s # in milliseconds; 0 disables</div>
<div>#synchronous_standby_names = '' # standby servers that provide sync rep</div><div> # comma-separated list of application_name</div><div> # from standby(s); '*' = all</div>
<div><br></div><div># - Standby Servers -</div><div><br></div><div># These settings are ignored on a master server</div><div><br></div><div>#hot_standby = off # "on" allows queries during recovery</div>
<div> # (change requires restart)</div><div>#max_standby_archive_delay = 30s # max delay before canceling queries</div><div> # when reading WAL from archive;</div>
<div> # -1 allows indefinite delay</div><div>#max_standby_streaming_delay = 30s # max delay before canceling queries</div><div> # when reading streaming WAL;</div>
<div> # -1 allows indefinite delay</div><div>#wal_receiver_status_interval = 10s # send replies at least this often</div><div> # 0 disables</div>
<div>#hot_standby_feedback = off # send info from standby to prevent</div><div> # query conflicts</div></div></div><div><div>#------------------------------------------------------------------------------</div>
<div># QUERY TUNING</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Planner Method Configuration -</div><div><br></div><div>#enable_bitmapscan = on</div>
<div>#enable_hashagg = on</div><div>#enable_hashjoin = on</div><div>#enable_indexscan = on</div><div>#enable_material = on</div><div>#enable_mergejoin = on</div><div>#enable_nestloop = on</div><div>#enable_seqscan = on</div>
<div>#enable_sort = on</div><div>#enable_tidscan = on</div><div><br></div><div># - Planner Cost Constants -</div><div><br></div><div>#seq_page_cost = 1.0 # measured on an arbitrary scale</div><div>#random_page_cost = 4.0 # same scale as above</div>
<div>#cpu_tuple_cost = 0.01 # same scale as above</div><div>#cpu_index_tuple_cost = 0.005 # same scale as above</div><div>#cpu_operator_cost = 0.0025 # same scale as above</div><div>
#effective_cache_size = 128MB</div><div><br></div><div># - Genetic Query Optimizer -</div><div><br></div><div>#geqo = on</div><div>#geqo_threshold = 12</div><div>#geqo_effort = 5 # range 1-10</div><div>
#geqo_pool_size = 0 # selects default based on effort</div><div>#geqo_generations = 0 # selects default based on effort</div><div>#geqo_selection_bias = 2.0 # range 1.5-2.0</div>
<div>#geqo_seed = 0.0 # range 0.0-1.0</div><div><br></div><div># - Other Planner Options -</div><div><br></div><div>#default_statistics_target = 100 # range 1-10000</div><div>#constraint_exclusion = partition # on, off, or partition</div>
<div>#cursor_tuple_fraction = 0.1 # range 0.0-1.0</div><div>#from_collapse_limit = 8</div><div>#join_collapse_limit = 8 # 1 disables collapsing of explicit</div><div> # JOIN clauses</div>
</div><div><div>#------------------------------------------------------------------------------</div><div># ERROR REPORTING AND LOGGING</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Where to Log -</div><div><br></div><div>#log_destination = 'stderr' # Valid values are combinations of</div><div> # stderr, csvlog, syslog, and eventlog,</div>
<div> # depending on platform. csvlog</div><div> # requires logging_collector to be on.</div><div><br></div><div># This is used when logging to stderr:</div>
<div>#logging_collector = off # Enable capturing of stderr and csvlog</div><div> # into log files. Required to be on for</div><div> # csvlogs.</div>
<div> # (change requires restart)</div><div><br></div><div># These are only used if logging_collector is on:</div><div>#log_directory = 'pg_log' # directory where log files are written,</div>
<div> # can be absolute or relative to PGDATA</div><div>#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,</div><div> # can include strftime() escapes</div>
<div>#log_file_mode = 0600 # creation mode for log files,</div><div> # begin with 0 to use octal notation</div><div>#log_truncate_on_rotation = off # If on, an existing log file with the</div>
<div> # same name as the new log file will be</div><div> # truncated rather than appended to.</div><div> # But such truncation only occurs on</div>
<div> # time-driven rotation, not on restarts</div><div> # or size-driven rotation. Default is</div><div> # off, meaning append to existing files</div>
<div> # in all cases.</div><div>#log_rotation_age = 1d # Automatic rotation of logfiles will</div><div> # happen after that time. 0 disables.</div>
<div>#log_rotation_size = 10MB # Automatic rotation of logfiles will</div><div> # happen after that much log output.</div><div> # 0 disables.</div>
<div><br></div><div># These are relevant when logging to syslog:</div><div>#syslog_facility = 'LOCAL0'</div><div>#syslog_ident = 'postgres'</div><div><br></div><div>#silent_mode = off # Run server silently.</div>
<div> # DO NOT USE without syslog or</div><div> # logging_collector</div><div> # (change requires restart)</div>
</div><div><div># - When to Log -</div><div><br></div><div>#client_min_messages = notice # values in order of decreasing detail:</div><div> # debug5</div><div> # debug4</div>
<div> # debug3</div><div> # debug2</div><div> # debug1</div><div> # log</div>
<div> # notice</div><div> # warning</div><div> # error</div><div><br></div><div>#log_min_messages = warning # values in order of decreasing detail:</div>
<div> # debug5</div><div> # debug4</div><div> # debug3</div><div> # debug2</div>
<div> # debug1</div><div> # info</div><div> # notice</div><div> # warning</div>
<div> # error</div><div> # log</div><div> # fatal</div><div> # panic</div>
<div><br></div><div>#log_min_error_statement = error # values in order of decreasing detail:</div><div> # debug5</div><div> # debug4</div>
<div> # debug3</div><div> # debug2</div><div> # debug1</div><div> # info</div>
<div> # notice</div><div> # warning</div><div> # error</div><div> # log</div>
<div> # fatal</div><div> # panic (effectively off)</div><div><br></div><div>#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements</div>
<div> # and their durations, > 0 logs only</div><div> # statements running at least this number</div><div> # of milliseconds</div>
</div><div><div># - What to Log -</div><div><br></div><div>#debug_print_parse = off</div><div>#debug_print_rewritten = off</div><div>#debug_print_plan = off</div><div>#debug_pretty_print = on</div><div>#log_checkpoints = off</div>
<div>#log_connections = off</div><div>#log_disconnections = off</div><div>#log_duration = off</div><div>#log_error_verbosity = default # terse, default, or verbose messages</div><div>#log_hostname = off</div><div>
log_line_prefix = '%t ' # special values:</div><div> # %a = application name</div><div> # %u = user name</div><div>
# %d = database name</div><div> # %r = remote host and port</div><div> # %h = remote host</div><div>
# %p = process ID</div><div> # %t = timestamp without milliseconds</div><div> # %m = timestamp with milliseconds</div>
<div> # %i = command tag</div><div> # %e = SQL state</div><div> # %c = session ID</div><div> # %l = session line number</div>
<div> # %s = session start timestamp</div><div> # %v = virtual transaction ID</div><div> # %x = transaction ID (0 if none)</div>
<div> # %q = stop here in non-session</div><div> # processes</div><div> # %% = '%'</div>
<div> # e.g. '<%u%%%d> '</div><div>#log_lock_waits = off # log lock waits >= deadlock_timeout</div><div>#log_statement = 'none' # none, ddl, mod, all</div>
<div>#log_temp_files = -1 # log temporary files equal or larger</div><div> # than the specified size in kilobytes;</div><div> # -1 disables, 0 logs all temp files</div>
<div>#log_timezone = '(defaults to server environment setting)'</div></div><div><div>#------------------------------------------------------------------------------</div><div># RUNTIME STATISTICS</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div># - Query/Index Statistics Collector -</div><div><br></div><div>#track_activities = on</div><div>#track_counts = on</div><div>#track_functions = none # none, pl, all</div><div>#track_activity_query_size = 1024 # (change requires restart)</div>
<div>#update_process_title = on</div><div>#stats_temp_directory = 'pg_stat_tmp'</div><div><br></div><div><br></div><div># - Statistics Monitoring -</div><div><br></div><div>#log_parser_stats = off</div><div>#log_planner_stats = off</div>
<div>#log_executor_stats = off</div><div>#log_statement_stats = off</div></div><div><div>#------------------------------------------------------------------------------</div><div># AUTOVACUUM PARAMETERS</div><div>#------------------------------------------------------------------------------</div>
<div><br></div><div>#autovacuum = on # Enable autovacuum subprocess? 'on'</div><div> # requires track_counts to also be on.</div><div>#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and</div>
<div> # their durations, > 0 logs only</div><div> # actions running at least this number</div><div> # of milliseconds.</div>
<div>#autovacuum_max_workers = 3 # max number of autovacuum subprocesses</div><div> # (change requires restart)</div><div>#autovacuum_naptime = 1min # time between autovacuum runs</div>
<div>#autovacuum_vacuum_threshold = 50 # min number of row updates before</div><div> # vacuum</div><div>#autovacuum_analyze_threshold = 50 # min number of row updates before</div>
<div> # analyze</div><div>#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum</div><div>#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze</div>
<div>#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum</div><div> # (change requires restart)</div><div>#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for</div>
<div> # autovacuum, in milliseconds;</div><div> # -1 means use vacuum_cost_delay</div><div>#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for</div>
<div> # autovacuum, -1 means use</div><div> # vacuum_cost_limit</div></div><div><div>#------------------------------------------------------------------------------</div>
<div># CLIENT CONNECTION DEFAULTS</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Statement Behavior -</div><div><br></div><div>#search_path = '"$user",public' # schema names</div>
<div>#default_tablespace = '' # a tablespace name, '' uses the default</div><div>#temp_tablespaces = '' # a list of tablespace names, '' uses</div><div> # only default tablespace</div>
<div>#check_function_bodies = on</div><div>#default_transaction_isolation = 'read committed'</div><div>#default_transaction_read_only = off</div><div>#default_transaction_deferrable = off</div><div>#session_replication_role = 'origin'</div>
<div>#statement_timeout = 0 # in milliseconds, 0 is disabled</div><div>#vacuum_freeze_min_age = 50000000</div><div>#vacuum_freeze_table_age = 150000000</div><div>#bytea_output = 'hex' # hex, escape</div>
<div>#xmlbinary = 'base64'</div><div>#xmloption = 'content'</div><div><br></div><div># - Locale and Formatting -</div><div><br></div><div>datestyle = 'iso, mdy'</div><div>#intervalstyle = 'postgres'</div>
<div>#timezone = '(defaults to server environment setting)'</div><div>#timezone_abbreviations = 'Default' # Select the set of available time zone</div><div> # abbreviations. Currently, there are</div>
<div> # Default</div><div> # Australia</div><div> # India</div><div> # You can create your own file in</div>
<div> # share/timezonesets/.</div><div>#extra_float_digits = 0 # min -15, max 3</div><div>#client_encoding = sql_ascii # actually, defaults to database</div>
<div> # encoding</div><div><br></div><div># These settings are initialized by initdb, but they can be changed.</div><div>lc_messages = 'en_US.UTF-8' # locale for system error message</div>
<div> # strings</div><div>lc_monetary = 'en_US.UTF-8' # locale for monetary formatting</div><div>lc_numeric = 'en_US.UTF-8' # locale for number formatting</div>
<div>lc_time = 'en_US.UTF-8' # locale for time formatting</div><div><br></div><div># default configuration for text search</div><div>default_text_search_config = 'pg_catalog.english'</div>
</div><div><div># - Other Defaults -</div><div><br></div><div>#dynamic_library_path = '$libdir'</div><div>#local_preload_libraries = ''</div><div><br></div><div><br></div><div>#------------------------------------------------------------------------------</div>
<div># LOCK MANAGEMENT</div><div>#------------------------------------------------------------------------------</div><div><br></div><div>#deadlock_timeout = 1s</div><div>#max_locks_per_transaction = 64 # min 10</div>
<div> # (change requires restart)</div><div># Note: Each lock table slot uses ~270 bytes of shared memory, and there are</div><div># max_locks_per_transaction * (max_connections + max_prepared_transactions)</div>
<div># lock table slots.</div><div>#max_pred_locks_per_transaction = 64 # min 10</div><div> # (change requires restart)</div><div><br></div><div>#------------------------------------------------------------------------------</div>
<div># VERSION/PLATFORM COMPATIBILITY</div><div>#------------------------------------------------------------------------------</div><div><br></div><div># - Previous PostgreSQL Versions -</div><div><br></div><div>#array_nulls = on</div>
<div>#backslash_quote = safe_encoding # on, off, or safe_encoding</div><div>#default_with_oids = off</div><div>#escape_string_warning = on</div><div>#lo_compat_privileges = off</div><div>#quote_all_identifiers = off</div>
<div>#sql_inheritance = on</div><div>#standard_conforming_strings = on</div><div>#synchronize_seqscans = on</div><div><br></div><div># - Other Platforms and Clients -</div><div><br></div><div>#transform_null_equals = off</div>
</div><div><div>#------------------------------------------------------------------------------</div><div># ERROR HANDLING</div><div>#------------------------------------------------------------------------------</div><div>
<br></div><div>#exit_on_error = off # terminate session on any error?</div><div>#restart_after_crash = on # reinitialize after backend crash?</div><div><br></div><div><br></div>
<div>#------------------------------------------------------------------------------</div><div># CUSTOMIZED OPTIONS</div><div>#------------------------------------------------------------------------------</div><div><br></div>
<div>#custom_variable_classes = '' # list of custom variable class names</div><div>include '/var/lib/pgsql/tmp/rep_mode.conf' # added by pgsql RA</div></div><div><br></div><div><br></div><div><br>
</div><div><br></div><div>******** root@master:/etc/postgresql/9.1/main# cat /var/lib/pgsql/tmp/rep_mode.conf</div><div>synchronous_standby_names = ''</div><div><br></div><div><br></div><div>********* root@master:/etc/corosync# cat corosync.conf</div>
<div># Please read the openais.conf.5 manual page</div><div><br></div><div>totem {</div><div> version: 2</div><div><br></div><div> # How long before declaring a token lost (ms)</div><div> token: 3000</div>
<div><br></div><div> # How many token retransmits before forming a new configuration</div><div> token_retransmits_before_loss_const: 10</div><div><br></div><div> # How long to wait for join messages in the membership protocol (ms)</div>
<div> join: 60</div><div><br></div><div> # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms)</div><div> consensus: 3600</div><div><br></div><div>
# Turn off the virtual synchrony filter</div><div> vsftype: none</div><div><br></div><div> # Number of messages that may be sent by one processor on receipt of the token</div><div> max_messages: 20</div>
<div><br></div><div> # Limit generated nodeids to 31-bits (positive signed integers)</div><div> clear_node_high_bit: yes</div><div><br></div><div> # Disable encryption</div><div> secauth: off</div>
<div><br></div><div> # How many threads to use for encryption/decryption</div><div> threads: 0</div><div><br></div><div> # Optionally assign a fixed node id (integer)</div><div> # nodeid: 1234</div>
<div><br></div><div> # This specifies the mode of redundant ring, which may be none, active, or passive.</div><div> rrp_mode: none</div><div><br></div><div> interface {</div><div> # The following values need to be set based on your environment</div>
<div> ringnumber: 0</div><div> bindnetaddr: 172.70.65.71</div><div> mcastaddr: 226.94.1.1</div><div> mcastport: 5405</div><div> }</div><div>}</div><div><br>
</div><div>amf {</div><div> mode: disabled</div><div>}</div><div><br></div><div>service {</div><div> # Load the Pacemaker Cluster Resource Manager</div><div> ver: 0</div><div> name: pacemaker</div>
<div>}</div><div><br></div><div>aisexec {</div><div> user: root</div><div> group: root</div><div>}</div><div><br></div><div>logging {</div><div> fileline: off</div><div> to_stderr: yes</div>
<div> to_logfile: no</div><div> to_syslog: yes</div><div> syslog_facility: daemon</div><div> debug: off</div><div> timestamp: on</div><div> logger_subsys {</div><div> subsys: AMF</div>
<div> debug: off</div><div> tags: enter|leave|trace1|trace2|trace3|trace4|trace6</div><div> }</div><div>}</div><div><br></div><div><br></div><div><br></div>-- <br>------------------------------<br>
Thomaz Luiz Santos<br>Linux User: #359356<br><a href="http://thomaz.santos.googlepages.com/">http://thomaz.santos.googlepages.com/</a>
</div></div>