mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-14 18:18:35 +02:00
filer: default the filemeta CREATE TABLE for postgres2/mysql2 when createTable is unset (#10232)
* postgres2: default the filemeta CREATE TABLE when createTable is unset An empty createTable rendered through fmt.Sprintf produced %!(EXTRA string=filemeta), which Postgres rejected with a syntax error at init. Fall back to a working template so a minimal config bootstraps. * mysql2: default the filemeta CREATE TABLE when createTable is unset Same empty-template failure the postgres2 path had: an unset createTable rendered to %!(EXTRA string=filemeta) and MySQL rejected it at init. Fall back to a working template.
This commit is contained in:
1 parent
c332323b01
commit
873705baf9
6 files changed
+36
No files matched your search
@@ -63,6 +63,9 @@ func (store *PostgresStore2) Initialize(configuration util.Configuration, prefix
|
||||
func (store *PostgresStore2) initialize(createTable, upsertQuery string, enableUpsert bool, user, password, hostname string, port int, database, schema, sslmode, sslcert, sslkey, sslrootcert, sslcrl string, pgbouncerCompatible bool, maxIdle, maxOpen, maxLifetimeSeconds int) (err error) {
|
||||
|
||||
store.SupportBucketTable = true
|
||||
if createTable == "" {
|
||||
createTable = postgres.DefaultCreateTableQuery
|
||||
}
|
||||
if !enableUpsert {
|
||||
upsertQuery = ""
|
||||
} else if upsertQuery == "" {
|
||||
|
||||
Reference in new issue
Block a user