pg 17 upgrade
This commit is contained in:
@@ -51,7 +51,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||||||
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
|
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
|
||||||
sudo apt update && \
|
sudo apt update && \
|
||||||
sudo apt-get install --no-install-recommends --no-install-suggests -qqy \
|
sudo apt-get install --no-install-recommends --no-install-suggests -qqy \
|
||||||
postgresql-client-15
|
postgresql-client-17
|
||||||
|
|
||||||
# Install & configure delta diff tool
|
# Install & configure delta diff tool
|
||||||
RUN wget -O- https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb > /tmp/git-delta.deb && \
|
RUN wget -O- https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb > /tmp/git-delta.deb && \
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
FROM postgres:15
|
FROM postgres:17
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
postgresql-15-pgvector \
|
postgresql-17-pgvector \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY create-tablespaces.bash /docker-entrypoint-initdb.d/00-create-tablespaces.bash
|
RUN echo "CREATE EXTENSION vector;" >> /docker-entrypoint-initdb.d/01-vector.sql
|
||||||
RUN echo "CREATE EXTENSION pgvector;" >> /docker-entrypoint-initdb.d/01-pgvector.sql
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash -ex
|
|
||||||
|
|
||||||
mkdir -p /tablespaces/mirai
|
|
||||||
chown postgres:postgres /tablespaces/mirai
|
|
||||||
chmod 750 /tablespaces/mirai
|
|
||||||
psql -v ON_ERROR_STOP=1 \
|
|
||||||
--username "$POSTGRES_USER" \
|
|
||||||
--dbname "$POSTGRES_DB" \
|
|
||||||
-c "CREATE TABLESPACE mirai LOCATION '/tablespaces/mirai'"
|
|
||||||
@@ -23,8 +23,7 @@ services:
|
|||||||
dockerfile: Dockerfile.postgres
|
dockerfile: Dockerfile.postgres
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-17-data:/var/lib/postgresql/data
|
||||||
- postgres-data-tablespaces:/tablespaces
|
|
||||||
- ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql
|
- ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
@@ -66,8 +65,7 @@ services:
|
|||||||
- devcontainer-redux-grafana-data:/var/lib/grafana
|
- devcontainer-redux-grafana-data:/var/lib/grafana
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-17-data:
|
||||||
postgres-data-tablespaces:
|
|
||||||
devcontainer-redux-gem-cache:
|
devcontainer-redux-gem-cache:
|
||||||
devcontainer-redux-blob-files:
|
devcontainer-redux-blob-files:
|
||||||
devcontainer-redux-grafana-data:
|
devcontainer-redux-grafana-data:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
id: task-69
|
id: task-69
|
||||||
title: Update devcontainer Dockerfile based on has_aux_table repo
|
title: Update devcontainer Dockerfile based on has_aux_table repo
|
||||||
status: To Do
|
status: Done
|
||||||
assignee: []
|
assignee: []
|
||||||
created_date: '2025-07-21'
|
created_date: '2025-07-21'
|
||||||
labels: []
|
labels: []
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
# SQLite. Versions 3.8.0 and up are supported.
|
|
||||||
# gem install sqlite3
|
|
||||||
#
|
|
||||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
||||||
# gem "sqlite3"
|
|
||||||
#
|
|
||||||
default: &default
|
default: &default
|
||||||
adapter: sqlite3
|
adapter: sqlite3
|
||||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
@@ -28,9 +22,6 @@ redux_dev: &redux_dev
|
|||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
host: db
|
host: db
|
||||||
port: 5432
|
port: 5432
|
||||||
# database: redux_development
|
|
||||||
# username: scraper_redux
|
|
||||||
# password: pdkFLqRmQwPUPaDDC4pX
|
|
||||||
database: postgres
|
database: postgres
|
||||||
username: postgres
|
username: postgres
|
||||||
password: postgres
|
password: postgres
|
||||||
@@ -41,8 +32,6 @@ local_redux_test: &local_redux_test
|
|||||||
host: db
|
host: db
|
||||||
port: 5432
|
port: 5432
|
||||||
database: redux_test<%= ENV['TEST_ENV_NUMBER'] %>
|
database: redux_test<%= ENV['TEST_ENV_NUMBER'] %>
|
||||||
# username: scraper_redux
|
|
||||||
# password: pdkFLqRmQwPUPaDDC4pX
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: postgres
|
password: postgres
|
||||||
pool: 4
|
pool: 4
|
||||||
|
|||||||
9
db/migrate/20250722060701_drop_indexed_posts.rb
Normal file
9
db/migrate/20250722060701_drop_indexed_posts.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class DropIndexedPosts < ActiveRecord::Migration[7.2]
|
||||||
|
def up
|
||||||
|
drop_table :indexed_posts
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
||||||
17
db/migrate/20250722152949_migrate_everything_out_of_mirai.rb
Normal file
17
db/migrate/20250722152949_migrate_everything_out_of_mirai.rb
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
class MigrateEverythingOutOfMirai < ActiveRecord::Migration[7.2]
|
||||||
|
def up
|
||||||
|
execute <<-SQL
|
||||||
|
ALTER TABLE ALL IN TABLESPACE mirai
|
||||||
|
SET tablespace pg_default;
|
||||||
|
SQL
|
||||||
|
|
||||||
|
execute <<-SQL
|
||||||
|
ALTER INDEX ALL IN TABLESPACE mirai
|
||||||
|
SET tablespace pg_default;
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
||||||
13
db/migrate/20250722153048_drop_mirai_tablespace.rb
Normal file
13
db/migrate/20250722153048_drop_mirai_tablespace.rb
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
class DropMiraiTablespace < ActiveRecord::Migration[7.2]
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def up
|
||||||
|
execute <<-SQL
|
||||||
|
DROP TABLESPACE mirai;
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
||||||
620
db/structure.sql
620
db/structure.sql
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user