<div dir="ltr"><div>thank you,  Nakahira Kazumoto to response  my e-mail </div><div><br></div><div>I updated the ocf-shellfuncs however the automatic failover is not working. </div><div>the bases were out of sync and replication stopped working. </div>
<div><br></div><div>How I sync the bases again and test the automatic failover again</div><div><br></div><div>*******root@slave:~# tail -f /var/log/postgresql/postgresql-9.1-main.log</div><div><div>2014-03-13 18:01:26 PDT FATAL:  timeline 1 of the primary does not match recovery target timeline 3</div>
<div>2014-03-13 18:01:30 PDT LOG:  received fast shutdown request</div><div>2014-03-13 18:01:30 PDT LOG:  aborting any active transactions</div><div>2014-03-13 18:01:30 PDT LOG:  shutting down</div><div>2014-03-13 18:01:30 PDT LOG:  database system is shut down</div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 2:57 AM, NAKAHIRA Kazutomo <span dir="ltr"><<a href="mailto:nakahira_kazutomo_b1@lab.ntt.co.jp" target="_blank">nakahira_kazutomo_b1@lab.ntt.co.jp</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Thomaz<br>
<br>
If you use latest pgsql RA, then you must use latest<br>
resource-agents package.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mar 12 18:54:49 slave lrmd: [1058]: info: RA output:<br>
(res_pgsql_postgresql:0:<u></u>monitor:stderr)<br>
/usr/lib/ocf/resource.d//<u></u>heartbeat/pgsql: 1749:<br>
/usr/lib/ocf/resource.d//<u></u>heartbeat/pgsql:<br>
Mar 12 18:54:49 slave lrmd: [1058]: info: RA output:<br>
(res_pgsql_postgresql:0:<u></u>monitor:stderr) ocf_local_nodename: not found<br>
</blockquote>
<br>
These masseges means your resource-agents package have no<br>
ocf_local_nodename function.<br>
<br>
ocf_local_nodename was implemented into ocf-shellfuncs<br>
and pgsql RA at following commits.<br>
<br>
<a href="https://github.com/ClusterLabs/resource-agents/commit/abc1c3f6464f6e5e7a1e41cd7c9b8179896c1903" target="_blank">https://github.com/<u></u>ClusterLabs/resource-agents/<u></u>commit/<u></u>abc1c3f6464f6e5e7a1e41cd7c9b81<u></u>79896c1903</a><br>

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