-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathpgdog.toml
127 lines (108 loc) · 2.19 KB
/
pgdog.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
# minimal pgDog configuration for a single user, single
# primary database running on the same host.
#
[general]
host = "0.0.0.0"
port = 6432
shutdown_timeout = 1_000
openmetrics_port = 9090
query_timeout = 1_000
checkout_timeout = 1_000
connect_timeout = 1_000
passthrough_auth = "enabled_plain"
#
# Admin database password.
#
[admin]
password = "pgdog"
#
# Simple database.
#
[[databases]]
name = "pgdog"
host = "127.0.0.1"
port = 5432
role = "primary"
[[databases]]
name = "pgdog"
host = "127.0.0.1"
port = 5432
role = "replica"
[[databases]]
name = "mastodon_development"
host = "127.0.0.1"
role = "primary"
[[databases]]
name = "mastodon_development"
host = "127.0.0.1"
role = "replica"
[tcp]
retries = 3
time = 1000
interval = 1000
user_timeout = 1000
#
# Sharded cluster with two primaries.
#
[[databases]]
name = "pgdog_sharded"
host = "127.0.0.1"
database_name = "shard_0"
shard = 0
[[databases]]
name = "pgdog_sharded"
host = "127.0.0.1"
database_name = "shard_1"
shard = 1
[[databases]]
name = "failover"
host = "127.0.0.1"
port = 5435
role = "primary"
database_name = "pgdog"
[[databases]]
name = "failover"
host = "127.0.0.1"
port = 5436
role = "replica"
database_name = "pgdog"
#
# Read/write access to theses tables will be automatically
# sharded.
#
[[sharded_tables]]
database = "pgdog_sharded"
name = "sharded"
column = "id"
data_type = "bigint"
primary = true
[[sharded_tables]]
database = "pgdog_sharded"
name = "users"
data_type = "bigint"
column = "id"
primary = true
[[sharded_tables]]
database = "pgdog_sharded"
name = "embeddings"
data_type = "vector"
column = "embedding"
centroids_path = "examples/pgvector/centroids.json"
#
# ActiveRecord sends these queries
# at startup to figure out the schema.
#
# This will route them to only one shard instead of issuing
# cross-shard queries and getting incorrect results.
#
[[manual_queries]]
fingerprint = "e78fe2c08de5f079" #[16685804461073231993]
[[manual_queries]]
fingerprint = "43258d068030bb3e" #[4838428433739463486]
[[manual_queries]]
fingerprint = "08aab2cee482a97d" #[624508100011010429]
[[manual_queries]]
fingerprint = "23cd60d5972d1712" #[2579824632033777426]
[[manual_queries]]
fingerprint = "bb38525ebeb46656" #[13490623250668217942]