diff --git a/.gitignore b/.gitignore
index a365694..a8caf02 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-SOURCES/postgresql-8.4.20.tar.bz2
-SOURCES/postgresql-9.2.15-US.pdf
-SOURCES/postgresql-9.2.15.tar.bz2
+SOURCES/postgresql-8.4.22.tar.bz2
+SOURCES/postgresql-9.2.18-US.pdf
+SOURCES/postgresql-9.2.18.tar.bz2
diff --git a/.postgresql.metadata b/.postgresql.metadata
index e3ae05b..9d3769c 100644
--- a/.postgresql.metadata
+++ b/.postgresql.metadata
@@ -1,3 +1,3 @@
-bad68fc70f90a28212459e5347c32ebbdfcf2c8e SOURCES/postgresql-8.4.20.tar.bz2
-4a0ab0ee2be5960b9d4be0442d29f932cf95cb85 SOURCES/postgresql-9.2.15-US.pdf
-73086d027966ffb190f650a468921e39f44120a4 SOURCES/postgresql-9.2.15.tar.bz2
+66a1286c4983121af35b76c97b97288013edc151 SOURCES/postgresql-8.4.22.tar.bz2
+83d52f97650e8302d8c353ad5359bd89e226f533 SOURCES/postgresql-9.2.18-US.pdf
+703f237f2d70df3809733852a9c2421e5b4fdba9 SOURCES/postgresql-9.2.18.tar.bz2
diff --git a/SOURCES/postgresql-setup b/SOURCES/postgresql-setup
index acf07f7..d41811f 100755
--- a/SOURCES/postgresql-setup
+++ b/SOURCES/postgresql-setup
@@ -106,6 +106,8 @@ else
     SU=su
 fi
 
+SU_L_POSTGRES="$SU -s /bin/sh -l postgres"
+
 script_result=0
 
 # code shared between initdb and upgrade actions
@@ -130,7 +132,7 @@ perform_initdb(){
     initdbcmd="$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'"
     initdbcmd+=" $PGSETUP_INITDB_OPTIONS"
 
-    $SU -l postgres -c "$initdbcmd" >> "$PGLOG" 2>&1 < /dev/null
+    $SU_L_POSTGRES -c "$initdbcmd" >> "$PGLOG" 2>&1 < /dev/null
 
     # Create directory for postmaster log files
     mkdir "$PGDATA/pg_log"
@@ -210,7 +212,7 @@ upgrade(){
     # Create empty new-format database
     if perform_initdb; then
         # Do the upgrade
-        $SU -l postgres -c "$PGENGINE/pg_upgrade \
+        $SU_L_POSTGRES -c "$PGENGINE/pg_upgrade \
                         '--old-bindir=$PREVPGENGINE' \
                         '--new-bindir=$PGENGINE' \
                         '--old-datadir=$PGDATAOLD' \
diff --git a/SPECS/postgresql.spec b/SPECS/postgresql.spec
index bf9466b..c15ba99 100644
--- a/SPECS/postgresql.spec
+++ b/SPECS/postgresql.spec
@@ -62,7 +62,7 @@
 Summary: PostgreSQL client programs
 Name: postgresql
 %global majorversion 9.2
-Version: 9.2.15
+Version: 9.2.18
 Release: 1%{?dist}
 
 # The PostgreSQL license is very similar to other MIT licenses, but the OSI
@@ -78,7 +78,7 @@ Url: http://www.postgresql.org/
 # in-place upgrade of an old database.  In most cases it will not be critical
 # that this be kept up with the latest minor release of the previous series;
 # but update when bugs affecting pg_dump output are fixed.
-%global prevversion 8.4.20
+%global prevversion 8.4.22
 %global prevmajorversion 8.4
 
 Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
@@ -1150,6 +1150,15 @@ fi
 %endif
 
 %changelog
+* Wed Aug 17 2016 Petr Kubat <pkubat@redhat.com> - 9.2.18-1
+- update to 9.2.18 per release notes
+  http://www.postgresql.org/docs/9.2/static/release-9-2-18.html
+  http://www.postgresql.org/docs/9.2/static/release-9-2-17.html
+  http://www.postgresql.org/docs/9.2/static/release-9-2-16.html
+
+* Thu Jun 30 2016 Petr Kubat <pkubat@redhat.com> - 9.2.15-2
+- fix postgresql-setup to work if postgres user is set to /bin/nologin (#1122143)
+
 * Fri Feb 12 2016 Pavel Kajaba <pkajaba@redhat.com> - 9.2.15-1
 - update to 9.2.15 per release notes
   http://www.postgresql.org/docs/9.2/static/release-9-2-15.html