kevinbrill,
@kevinbrill@gamepad.club avatar

sigh The #postgresql logical replication process that has been running for around 3 weeks failed upon completion last night.

ERROR: table copy could not finish transaction on publisher: FATAL: terminating connection due to idle-in-transaction timeout
SSL connection has been closed unexpectedly

Time for google I suppose and an email to our on-retainer postgres expert.

Moving billions of records from one database to another is a PITA yo.

argv_minus_one,
@argv_minus_one@mstdn.party avatar

@kevinbrill

It held open a transaction for 3 weeks? 😳

ascherbaum,
@ascherbaum@mastodon.social avatar

@argv_minus_one @kevinbrill my question as well. WAL must be huge on the primary.

kevinbrill,
@kevinbrill@gamepad.club avatar

@ascherbaum @argv_minus_one Yeah. We’ve got 1.5 billion records that we’re trying to move from one AWS RDS instance to another and the pub is v12 and the sub is v16. From what I’ve read having the pub be v12 limits us on the options and tooling we have at our disposal to reduce records to replicate.

FWIW I had created a user which is executing the replication and set the statement_timeout to 0. And I was wrong, I think this takes about 10 days to do.

kevinbrill,
@kevinbrill@gamepad.club avatar

@ascherbaum @argv_minus_one Full disclosure: I’m not a DBA at all. Just a software eng trying my best!

ascherbaum,
@ascherbaum@mastodon.social avatar

@kevinbrill @argv_minus_one Sounds complicated.

How many of these rows are changing? And this is logical replication, right?

Could be worth figuring out if you can copy the old rows either before, or afterwards, in chunks, but not in the same transaction.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • PostgreSQL
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • tacticalgear
  • slotface
  • rosin
  • thenastyranch
  • kavyap
  • Durango
  • ethstaker
  • JUstTest
  • modclub
  • cubers
  • osvaldo12
  • normalnudes
  • ngwrru68w68
  • khanakhh
  • cisconetworking
  • tester
  • Leos
  • megavids
  • provamag3
  • anitta
  • lostlight
  • All magazines