8000 fix: execute sql files after PG startup by darora · Pull Request #166 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content
8000

fix: execute sql files after PG startup #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

vars:
sql_files:
- { source: "pgbouncer_config/pgbouncer_auth_schema.sql", dest: "00-schema.sql" }
- { source: "stat_extension.sql", dest: "01-extension.sql" }

environment:
Expand Down
12 changes: 0 additions & 12 deletions ansible/tasks/setup-pgbouncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,6 @@
- "host all pgbouncer 127.0.0.1/32 scram-sha-256"
- "# Connection configuration for pgbouncer user"

# Run PgBouncer SQL script
- name: Transfer init SQL files
copy:
src: files/pgbouncer_config/pgbouncer_auth_schema.sql
dest: /tmp/00-schema.sql

- name: Execute init SQL files
become: yes
become_user: postgres
shell:
cmd: /usr/lib/postgresql/bin/psql -f /tmp/00-schema.sql

# Add fail2ban filter
- name: import jail.d/pgbouncer.conf
template:
Expand Down
0