@@ -60,7 +60,7 @@ func (a App) progressOutput() io.Writer {
6060}
6161
6262func connector (dsn string ) func (context.Context ) (* pgx.Conn , error ) {
63- return func (ctx context.Context ) (* pgx.Conn , error ) { return pgx .Connect (ctx , dsn ) }
63+ return func (ctx context.Context ) (* pgx.Conn , error ) { return postgres .Connect (ctx , dsn ) }
6464}
6565
6666func loadFilter (path string ) (config.Filter , error ) {
@@ -89,7 +89,7 @@ func sourceFingerprint(ctx context.Context, dsn string) (string, error) {
8989}
9090
9191func inventory (ctx context.Context , cfg config.Config , filter config.Filter ) ([]pgcopy.Table , error ) {
92- conn , err := pgx .Connect (ctx , cfg .Source )
92+ conn , err := postgres .Connect (ctx , cfg .Source )
9393 if err != nil {
9494 return nil , fmt .Errorf ("connect source inventory: %w" , err )
9595 }
@@ -260,7 +260,7 @@ func loadCDCBinaryMode(ctx context.Context, store *state.Store) (bool, error) {
260260}
261261
262262func initializeTargetProgress (ctx context.Context , targetDSN , streamID , generation string ) error {
263- conn , err := pgx .Connect (ctx , targetDSN )
263+ conn , err := postgres .Connect (ctx , targetDSN )
264264 if err != nil {
265265 return err
266266 }
@@ -286,7 +286,7 @@ func initializeTargetProgress(ctx context.Context, targetDSN, streamID, generati
286286}
287287
288288func validateTargetProgress (ctx context.Context , targetDSN , streamID , generation string ) error {
289- conn , err := pgx .Connect (ctx , targetDSN )
289+ conn , err := postgres .Connect (ctx , targetDSN )
290290 if err != nil {
291291 return err
292292 }
@@ -338,7 +338,7 @@ func finalizeTargetCleanup(ctx context.Context, targetDSN string, store *state.S
338338 if err := validateTargetOnly (ctx , targetDSN , migration ); err != nil {
339339 return err
340340 }
341- target , err := pgx .Connect (ctx , targetDSN )
341+ target , err := postgres .Connect (ctx , targetDSN )
342342 if err != nil {
343343 return err
344344 }
@@ -572,7 +572,7 @@ func (a App) Run(ctx context.Context, cfg config.Config) (runErr error) {
572572 if err := pauseForCrashTest (groupCtx , state .PhaseIndexes ); err != nil {
573573 return err
574574 }
575- source , err := pgx .Connect (groupCtx , cfg .Source )
575+ source , err := postgres .Connect (groupCtx , cfg .Source )
576576 if err != nil {
577577 return err
578578 }
@@ -760,7 +760,7 @@ func resumeIndexes(ctx context.Context, cfg config.Config, store *state.Store) e
760760 for _ , table := range tables {
761761 selected [table .OID ] = true
762762 }
763- source , err := pgx .Connect (ctx , cfg .Source )
763+ source , err := postgres .Connect (ctx , cfg .Source )
764764 if err != nil {
765765 return err
766766 }
@@ -940,7 +940,7 @@ func dumpSelection(ctx context.Context, sourceDSN, snapshot string, tables []pgc
940940 selection .Tables [i ] = schema.QualifiedName {Schema : table .Schema , Name : table .Name }
941941 oids [i ] = table .OID
942942 }
943- conn , err := pgx .Connect (ctx , sourceDSN )
943+ conn , err := postgres .Connect (ctx , sourceDSN )
944944 if err != nil {
945945 return selection , err
946946 }
@@ -1125,7 +1125,7 @@ func dumpSelection(ctx context.Context, sourceDSN, snapshot string, tables []pgc
11251125
11261126func inspectDeferred (dir , sourceDSN string ) schema.DeferredInspector {
11271127 return func (ctx context.Context , target * pgx.Conn , entry schema.TOCEntry ) (schema.DeferredStatus , error ) {
1128- source , err := pgx .Connect (ctx , sourceDSN )
1128+ source , err := postgres .Connect (ctx , sourceDSN )
11291129 if err != nil {
11301130 return schema.DeferredStatus {}, err
11311131 }
@@ -1559,7 +1559,7 @@ func followChecks(ctx context.Context, cfg config.Config, store *state.Store, sl
15591559 if migration .Phase != state .PhaseFollow {
15601560 continue
15611561 }
1562- conn , err := pgx .Connect (ctx , cfg .Source )
1562+ conn , err := postgres .Connect (ctx , cfg .Source )
15631563 if err != nil {
15641564 _ = store .UpsertFinding (ctx , state.Finding {ID : "follow-source-health" , Kind : "health" , Severity : "error" , Message : err .Error ()})
15651565 continue
@@ -1714,7 +1714,7 @@ func monitorProgress(ctx context.Context, store *state.Store, targetDSN, streamI
17141714 defer ticker .Stop ()
17151715 nextLog := time .Now ()
17161716 for {
1717- conn , err := pgx .Connect (ctx , targetDSN )
1717+ conn , err := postgres .Connect (ctx , targetDSN )
17181718 if err != nil {
17191719 return err
17201720 }
@@ -1763,7 +1763,7 @@ func resetInterruptedBaseCopy(ctx context.Context, cfg config.Config, store *sta
17631763 if err != nil && ! errors .Is (err , os .ErrNotExist ) {
17641764 return fmt .Errorf ("read prior snapshot metadata: %w" , err )
17651765 }
1766- target , err := pgx .Connect (ctx , cfg .Target )
1766+ target , err := postgres .Connect (ctx , cfg .Target )
17671767 if err != nil {
17681768 return err
17691769 }
@@ -1912,7 +1912,7 @@ func resetInterruptedBaseCopy(ctx context.Context, cfg config.Config, store *sta
19121912}
19131913
19141914func recordTargetIdentity (ctx context.Context , targetDSN , sourceFingerprint , filterFingerprint , streamID , generation string ) error {
1915- conn , err := pgx .Connect (ctx , targetDSN )
1915+ conn , err := postgres .Connect (ctx , targetDSN )
19161916 if err != nil {
19171917 return err
19181918 }
@@ -1975,7 +1975,7 @@ func validateTargetIdentity(ctx context.Context, cfg config.Config, store *state
19751975}
19761976
19771977func validateTargetOnly (ctx context.Context , targetDSN string , migration state.Migration ) error {
1978- conn , err := pgx .Connect (ctx , targetDSN )
1978+ conn , err := postgres .Connect (ctx , targetDSN )
19791979 if err != nil {
19801980 return err
19811981 }
@@ -2085,7 +2085,7 @@ func verificationInventory(ctx context.Context, cfg config.Config, tables []stat
20852085 for _ , table := range tables {
20862086 selected [table .Schema + "\x00 " + table .Name ] = true
20872087 }
2088- source , err := pgx .Connect (ctx , cfg .Source )
2088+ source , err := postgres .Connect (ctx , cfg .Source )
20892089 if err != nil {
20902090 return nil , err
20912091 }
@@ -2118,7 +2118,7 @@ func waitTargetProgress(ctx context.Context, targetDSN, streamID, wanted string)
21182118 var reached pglogrepl.LSN
21192119 advancedAt := time .Now ()
21202120 for {
2121- conn , err := pgx .Connect (ctx , targetDSN )
2121+ conn , err := postgres .Connect (ctx , targetDSN )
21222122 if err != nil {
21232123 return err
21242124 }
@@ -2297,7 +2297,7 @@ func (a App) Cutover(ctx context.Context, cfg config.Config) error {
22972297 Sequences : selectedSequences ,
22982298 SequenceOffset : cfg .SequenceOffset ,
22992299 EmitBoundary : func (ctx context.Context ) (string , error ) {
2300- conn , err := pgx .Connect (ctx , cfg .Source )
2300+ conn , err := postgres .Connect (ctx , cfg .Source )
23012301 if err != nil {
23022302 return "" , err
23032303 }
@@ -2360,7 +2360,7 @@ func cleanupAfterCutover(ctx context.Context, cfg config.Config, store *state.St
23602360
23612361func waitSlotInactive (ctx context.Context , sourceDSN , slot string ) error {
23622362 for {
2363- conn , err := pgx .Connect (ctx , sourceDSN )
2363+ conn , err := postgres .Connect (ctx , sourceDSN )
23642364 if err != nil {
23652365 return err
23662366 }
0 commit comments