mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-16 18:41:03 +01:00
Add comment with example of creating index concurrently
This commit is contained in:
parent
fca2b1441f
commit
4c1479b920
@ -68,6 +68,8 @@ func (db *DB) CreateIndices() error {
|
|||||||
// Note: If adding a new index here, consider manually running it on the prod DB using CONCURRENTLY to
|
// Note: If adding a new index here, consider manually running it on the prod DB using CONCURRENTLY to
|
||||||
// make server startup non-blocking. The benefit of this function is primarily for other people so they
|
// make server startup non-blocking. The benefit of this function is primarily for other people so they
|
||||||
// don't have to manually create these indexes.
|
// don't have to manually create these indexes.
|
||||||
|
// Example:
|
||||||
|
// CREATE INDEX CONCURRENTLY IF NOT EXISTS redact_idx ON enc_history_entries USING btree(user_id, device_id, date)
|
||||||
indices := []struct {
|
indices := []struct {
|
||||||
name string
|
name string
|
||||||
table string
|
table string
|
||||||
|
Loading…
Reference in New Issue
Block a user