@@ -48,7 +48,13 @@ const (
48
48
49
49
var (
50
50
// List of original parameters to synchronize on restore.
51
- originalParamsToRestore = []string {"max_connections" }
51
+ originalParamsToRestore = map [string ]string {
52
+ "max_connections" : "max_connections" ,
53
+ "max_prepared_xacts" : "max_prepared_transactions" ,
54
+ "max_locks_per_xact" : "max_locks_per_transaction" ,
55
+ "max_worker_processes" : "max_worker_processes" ,
56
+ "track_commit_timestamp" : "track_commit_timestamp" ,
57
+ }
52
58
)
53
59
54
60
// RestoreJob describes a job for physical restoring.
@@ -502,7 +508,7 @@ func (r *RestoreJob) extractInitParams(ctx context.Context, read io.Reader) (map
502
508
503
509
responseLine := scanner .Text ()
504
510
505
- for _ , param := range originalParamsToRestore {
511
+ for param , configName := range originalParamsToRestore {
506
512
extractedName := param + settingSuffix
507
513
508
514
if ! strings .HasPrefix (responseLine , extractedName ) {
@@ -511,7 +517,7 @@ func (r *RestoreJob) extractInitParams(ctx context.Context, read io.Reader) (map
511
517
512
518
value := strings .TrimSpace (strings .TrimPrefix (responseLine , extractedName ))
513
519
514
- extractedConfigs [param ] = value
520
+ extractedConfigs [configName ] = value
515
521
}
516
522
517
523
if len (originalParamsToRestore ) == len (extractedConfigs ) {
0 commit comments