[HN Gopher] Moving tables across PostgreSQL instances
       ___________________________________________________________________
        
       Moving tables across PostgreSQL instances
        
       Author : ananthakumaran
       Score  : 76 points
       Date   : 2025-11-02 05:47 UTC (3 days ago)
        
 (HTM) web link (ananthakumaran.in)
 (TXT) w3m dump (ananthakumaran.in)
        
       | fourseventy wrote:
       | I'm in the middle of doing a major version upgrade of postgres
       | from pg15 to pg18 using the same logical replication techniques
       | that this article talks about. As this article mentions, dropping
       | the indexes on the new database before replication is key.
       | Otherwise the replication takes forever because each insert needs
       | to update the index as well.
        
         | dspillett wrote:
         | This is the same even if doing bulk or batched inserts. MS's
         | process of importing an exported DB (when using that method,
         | i.e. with Azure SQL rather than an on-prem restore to on-prem
         | where a page-level backup is of course _much_ more efficient)
         | doesn 't create indexes until after the full data import has
         | completed.
        
       | Zaheer wrote:
       | I recently learned that on RDS you can import data from S3. Handy
       | feature for accomplishing similar goal:
       | https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_...
        
       ___________________________________________________________________
       (page generated 2025-11-05 23:02 UTC)