File tree Expand file tree Collapse file tree 6 files changed +285
-14
lines changed Expand file tree Collapse file tree 6 files changed +285
-14
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ variable "load_balancer" {
27
27
}
28
28
29
29
variable "certs_configmap_name" {
30
- type = string
30
+ type = string
31
31
default = " pgbouncer-certs"
32
32
}
33
33
@@ -41,22 +41,22 @@ variable "pg_bouncer_user_settings" {
41
41
}
42
42
43
43
variable "pg_bouncer_auth_user_password" {
44
- type = string
44
+ type = string
45
45
default = " "
46
46
}
47
47
48
48
variable "postgres_secret_name" {
49
- type = string
49
+ type = string
50
50
default = " "
51
51
}
52
52
53
53
variable "instance_role" {
54
- type = string
54
+ type = string
55
55
default = " pgbouncer"
56
56
}
57
57
58
58
variable "postgres_instance_name" {
59
- type = string
59
+ type = string
60
60
default = " postgres-dbsync-v3-ar9"
61
61
}
62
62
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "kubernetes_deployment_v1" "pgbouncer" {
10
10
}
11
11
12
12
spec {
13
- replicas = 1
13
+ replicas = var . pg_bouncer_replicas
14
14
15
15
strategy {
16
16
rolling_update {
Original file line number Diff line number Diff line change @@ -84,9 +84,8 @@ resource "kubernetes_stateful_set_v1" "postgres" {
84
84
}
85
85
86
86
volume_mount {
87
- mount_path = " /etc/postgresql/postgresql.conf "
87
+ mount_path = " /etc/postgresql"
88
88
name = " config"
89
- sub_path = " postgresql.conf"
90
89
}
91
90
92
91
volume_mount {
Original file line number Diff line number Diff line change 1
1
listen_addresses = '*'
2
- max_connections = 100
3
- shared_buffers = 12GB
4
- effective_cache_size = 36GB
2
+ max_connections = 125
3
+ shared_buffers = 15GB
4
+ effective_cache_size = 45GB
5
5
maintenance_work_mem = 2GB
6
6
checkpoint_completion_target = 0.9
7
7
wal_buffers = 16MB
Original file line number Diff line number Diff line change 1
1
-- create pg bouncer role and user_search function - add to each database
2
2
3
3
CREATE ROLE pgbouncer WITH PASSWORD ' pgbounceruserpass' ;
4
+ ALTER ROLE pgbouncer WITH LOGIN;
4
5
5
6
CREATE OR REPLACE FUNCTION user_search (uname TEXT ) RETURNS TABLE (usename name, passwd text ) as
6
7
$$
@@ -724,7 +725,7 @@ CREATE INDEX IF NOT EXISTS idx_tx_metadata_collection_offers ON public.tx_metada
724
725
725
726
726
727
727
- CREATE INDEX stake_address_idx ON stake_address(" view" );
728
+ CREATE INDEX IF NOT EXISTS stake_address_idx ON stake_address(" view" );
728
729
729
730
730
731
-- - BLOCKFROST
@@ -762,7 +763,7 @@ CREATE INDEX IF NOT EXISTS bf_idx_reference_tx_in_tx_in_id ON reference_tx_in (t
762
763
CREATE INDEX IF NOT EXISTS bf_idx_collateral_tx_in_tx_in_id ON collateral_tx_in (tx_in_id);
763
764
764
765
765
- CREATE INDEX CONCURRENTLY IF NOT EXISTS bf_idx_redeemer_script_hash ON redeemer USING HASH (encode(script_hash, ' hex' ));
766
+ CREATE INDEX IF NOT EXISTS bf_idx_redeemer_script_hash ON redeemer USING HASH (encode(script_hash, ' hex' ));
766
767
767
768
768
769
CREATE INDEX IF NOT EXISTS bf_idx_redeemer_tx_id ON redeemer USING btree (tx_id);
@@ -774,4 +775,4 @@ CREATE INDEX IF NOT EXISTS bf_idx_col_tx_out ON collateral_tx_out USING btree (t
774
775
CREATE INDEX IF NOT EXISTS bf_idx_ma_tx_mint_ident ON ma_tx_mint USING btree (ident);
775
776
776
777
777
- CREATE INDEX CONCURRENTLY IF NOT EXISTS bf_idx_ma_tx_out_ident ON ma_tx_out USING btree (ident);
778
+ CREATE INDEX IF NOT EXISTS bf_idx_ma_tx_out_ident ON ma_tx_out USING btree (ident);
You can’t perform that action at this time.
0 commit comments