You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rootCmd.PersistentFlags().IntVar(&opts.MaxConnections, "max-connections", getIntVar("PG_TUNE_MAX_CONNECTIONS"), "Max connections for pg_tune (0 = auto-calculate)")
109
-
rootCmd.PersistentFlags().IntVar(&opts.MemoryMB, "memory", getIntVar("PG_TUNE_MEMORY"), "Override detected memory in MB for pg_tune")
110
-
rootCmd.PersistentFlags().IntVar(&opts.Cores, "cpus", getIntVar("PG_TUNE_CPUS"), "Override detected CPU count for pg_tune")
111
-
rootCmd.PersistentFlags().StringVar(&opts.DBType, "type", "web", "Database type for pg_tune: web, oltp, dw, desktop, mixed")
112
-
rootCmd.PersistentFlags().StringVar(&authMethod, "auth-method", lo.CoalesceOrEmpty(os.Getenv("PG_AUTH_METHOD"), string(pkg.AuthScramSHA)), "Authentication method for pg_hba.conf (auto-detected if not specified)")
109
+
113
110
clicky.BindAllFlags(rootCmd.PersistentFlags())
114
111
115
112
// Add command groups
@@ -140,22 +137,26 @@ This command can automatically:
140
137
- Reset the superuser password
141
138
142
139
Examples:
143
-
pgconfig auto-start Start PostgreSQL normally
144
-
pgconfig auto-start --auto-init Initialize and start if needed
145
-
pgconfig auto-start --pg-tune Optimize config before starting
146
-
pgconfig auto-start --auto-upgrade Upgrade if needed, then start
147
-
pgconfig auto-start --auto-reset-password Reset password, then start
148
-
pgconfig auto-start --auto-init --pg-tune Initialize, optimize, then start
149
-
pgconfig auto-start --dry-run Validate permissions without starting`,
140
+
postgres-cli auto-start Start PostgreSQL normally
141
+
postgres-cli auto-start --auto-init Initialize and start if needed
142
+
postgres-cli auto-start --pg-tune Optimize config before starting
143
+
postgres-cli auto-start --auto-upgrade Upgrade if needed, then start
144
+
postgres-cli auto-start --auto-reset-password Reset password, then start
145
+
postgres-cli auto-start --auto-init --pg-tune Initialize, optimize, then start
146
+
postgres-cli auto-start --dry-run Validate permissions without starting`,
150
147
RunE: runAutoStart,
151
148
}
152
149
153
-
cmd.Flags().Bool("auto-init", true, "Automatically initialize database if data directory doesn't exist")
154
-
cmd.Flags().Bool("pg-tune", true, "Run pg_tune to optimize postgresql.conf before starting")
150
+
cmd.Flags().IntVar(&opts.MaxConnections, "max-connections", getIntVar("PG_TUNE_MAX_CONNECTIONS"), "Max connections for pg_tune (0 = auto-calculate)")
151
+
cmd.Flags().IntVar(&opts.MemoryMB, "memory", getIntVar("PG_TUNE_MEMORY"), "Override detected memory in MB for pg_tune")
152
+
cmd.Flags().IntVar(&opts.Cores, "cpus", getIntVar("PG_TUNE_CPUS"), "Override detected CPU count for pg_tune")
153
+
cmd.Flags().StringVar(&opts.DBType, "type", "web", "Database type for pg_tune: web, oltp, dw, desktop, mixed")
154
+
cmd.Flags().StringVar(&authMethod, "auth-method", lo.CoalesceOrEmpty(os.Getenv("PG_AUTH_METHOD"), string(pkg.AuthScramSHA)), "Authentication method for pg_hba.conf (auto-detected if not specified)")
155
+
cmd.Flags().BoolVar(&opts.Enabled, "pg-tune", true, "Run pg_tune to optimize postgresql.conf before starting")
155
156
cmd.Flags().Bool("auto-upgrade", true, "Automatically upgrade PostgreSQL if version mismatch detected")
156
157
cmd.Flags().Bool("auto-reset-password", true, "Reset postgres superuser password on start")
158
+
cmd.Flags().Bool("auto-init", true, "Automatically initialize database if data directory doesn't exist")
157
159
cmd.Flags().Int("upgrade-to", 0, "Target PostgreSQL version for upgrade (default: auto-detect latest)")
158
-
cmd.Flags().Bool("dry-run", false, "Validate permissions and configuration without making changes")
0 commit comments