Changeset 327

Show
Ignore:
Timestamp:
02/10/12 20:20:46 (2 years ago)
Author:
phil
Message:

augment regex to alter default config

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/pgbrew/pgbrew

    r326 r327  
    129129 
    130130patch_sources() { 
    131     perl -pi -e "s/^.*?log_line_prefix\s?=\s?'.*?'/log_line_prefix = '%t \[%r\] \[%p\]: \[%l-1\] user=%u,db=%d,e=%e: '/" "$work_dir/source/src/backend/utils/misc/postgresql.conf.sample" 
     131    perl -pi -e " 
     132        s/\A \s* (?: [#] \s* )? listen_addresses \s* = \s* '.*?'/listen_addresses = '*'/x; 
     133        s/\A \s* (?: [#] \s* )? log_destination s* = \s* '.*?'/log_destination = 'stderr'/x; 
     134        s/\A \s* (?: [#] \s* )? log_min_duration_statement \s* = \s* -?\d+/log_min_duration_statement = 0/x; 
     135        s/\A \s* (?: [#] \s* )? log_line_prefix \s* = \s* '.*?'/log_line_prefix = '%t \[%r\] \[%p\]: \[%l-1\] user=%u,db=%d,e=%e: '/x; 
     136        s/\A \s* (?: [#] \s* )? log_temp_files \s* = \s* \d+/log_temp_files = 0/x; 
     137        s/\A \s* (?: [#] \s* )? (logging_collector|log_checkpoints|log_connections|log_disconnections|log_lock_waits|archive_mode) \s* = \s* (?: on|off)/\1 = on/x; 
     138        s/\A \s* (?: [#] \s* )? wal_level \s* = \s* (?: minimal|archive|hot_standby)/wal_level = hot_standby/x; 
     139        s/\A \s* (?: [#] \s* )? archive_command \s* = \s* '.*?'/archive_command = '\/bin\/true'/x; 
     140    " "$work_dir/source/src/backend/utils/misc/postgresql.conf.sample" 
    132141} 
    133142