Skip to content

Commit

Permalink
Upgrade to Postgres 9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickey Burks committed Feb 18, 2016
1 parent 1b4e5d7 commit 1a26a9f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV REFRESHED_AT 2015-11-10
RUN apt-get update -y && apt-get install -y wget ca-certificates lsb-release git build-essential cmake zlib1g-dev libssl-dev python python-pip python-dev nginx supervisor python-setuptools
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y postgresql-9.4 postgresql-plpython-9.4 postgresql-server-dev-9.4 pgxnclient fuse libfuse-dev
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y postgresql-9.5 postgresql-plpython-9.5 postgresql-server-dev-9.5 pgxnclient fuse libfuse-dev
RUN pgxn install multicorn
RUN pip install requests sphinx sphinx-autobuild fusepy
RUN locale-gen "en_US.UTF-8" && dpkg-reconfigure locales
Expand All @@ -39,7 +39,7 @@ RUN cd /tmp && git clone https://github.com/qpfiffer/libwebsockets.git && \
RUN cd /s/aquameta/core/004-aquameta_endpoint/servers/background_worker && make && make install

#shared_preload_libraries = 'pg_http'
RUN sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'pg_http'/" /etc/postgresql/9.4/main/postgresql.conf
RUN sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = 'pg_http'/" /etc/postgresql/9.5/main/postgresql.conf



Expand All @@ -64,9 +64,9 @@ RUN mkdir /mnt/aquameta

#################### build aquameta ###############################
USER postgres
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.4/main/pg_hba.conf && \
sed -i "s/^local all.*$/local all all trust/" /etc/postgresql/9.4/main/pg_hba.conf && \
echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf && \
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf && \
sed -i "s/^local all.*$/local all all trust/" /etc/postgresql/9.5/main/pg_hba.conf && \
echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf && \
/etc/init.d/postgresql start && \
cd /s/aquameta && \
./build.sh && \
Expand Down
2 changes: 1 addition & 1 deletion core/000-meta/001-meta_catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ create view meta.role as
pgr.rolinherit as inherit,
pgr.rolcreaterole as create_role,
pgr.rolcreatedb as create_db,
pgr.rolcatupdate as catalog_update,
--pgr.rolcatupdate as catalog_update,
pgr.rolcanlogin as can_login,
pgr.rolreplication as replication,
pgr.rolconnlimit as connection_limit,
Expand Down
10 changes: 5 additions & 5 deletions core/000-meta/test/000-meta.sql
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ select ok(
);

-- insert defaults
insert into meta.role (name, superuser, inherit, create_role, create_db, catalog_update, can_login, replication, connection_limit, password, valid_until)
insert into meta.role (name, superuser, inherit, create_role, create_db, /*catalog_update,*/ can_login, replication, connection_limit, password, valid_until)
values ('test_user_2', false, false, false, false, false, false, false, -1, '', null);
select ok(
exists(
Expand All @@ -459,7 +459,7 @@ select ok(
);

-- insert with all fields set
insert into meta.role (name, superuser, inherit, create_role, create_db, catalog_update, can_login, replication, connection_limit, password, valid_until)
insert into meta.role (name, superuser, inherit, create_role, create_db, /*catalog_update,*/ can_login, replication, connection_limit, password, valid_until)
values ('test_user_3', true, true, true, true, true, true, true, 5, 'foobar', '1997-08-29 02:14:00-07');
select ok(
exists(
Expand All @@ -477,7 +477,7 @@ update meta.role set name = 'test_user_4',
inherit = true,
create_role = true,
create_db = true,
catalog_update = true,
--catalog_update = true,
can_login = true,
replication = true,
connection_limit = 10,
Expand All @@ -501,7 +501,7 @@ update meta.role set name = 'test_user_4',
inherit = false,
create_role = false,
create_db = false,
catalog_update = false,
--catalog_update = false,
can_login = false,
replication = false,
connection_limit = null,
Expand All @@ -524,7 +524,7 @@ update meta.role set superuser = false,
inherit = false,
create_role = false,
create_db = false,
catalog_update = false,
--catalog_update = false,
can_login = false,
replication = false,
connection_limit = null,
Expand Down
2 changes: 1 addition & 1 deletion docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nodaemon = true

[program:postgres]
user = postgres
command = /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf
command = /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
stdout_events_enabled=true
stderr_events_enabled=true

Expand Down

0 comments on commit 1a26a9f

Please sign in to comment.