Skip to content

Commit f3d6f62

Browse files
committed
default postgres.config.port to 6432
1 parent 1583976 commit f3d6f62

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

jobs/postgres/spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ consumes:
3333
properties:
3434
postgres.config:
3535
description: A map of postgresql.conf configuration directives, keyed by name.
36-
default: {}
36+
default:
37+
port: 6432
3738

3839
postgres.hba:
3940
description: A list of pg_hba.conf configuration acls. See Section 19.1 of the PostgreSQL manual.

jobs/postgres/templates/bin/ctl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
masterip = link("db").instances.first.address
55
replication = p('postgres.replication.enabled', false) && masterip != ''
66
master = replication && spec.index == 0
7-
port = p('postgres.config.port')
7+
port = p('postgres.config')["port"] || 6432
88

99
%>
1010
# first, some diagnostic info
@@ -107,8 +107,8 @@ EOF
107107
<% p('pgpool.users', []).each do |user| %>
108108
echo >>$LOG_DIR/$JOB_NAME.log "[postgres] setting up user <%= user['username'] %>"
109109
echo "[$(date)] setting up user <%= user['username'] %>"
110-
<% admin = '-DRS' %>
111-
<% admin = '-drs' if user["admin"] %>
110+
<% admin = '-DRS' %>
111+
<% admin = '-drs' if user["admin"] %>
112112
set -x
113113

114114
createuser -U vcap -p <%= port %> <%=admin %> -El <%= user['username'] %>

0 commit comments

Comments
 (0)