@@ -363,6 +363,57 @@ Equivalent Rake task:
363363bundle exec rake e2e:run
364364```
365365
366+ ## Transport lifecycle behavior
367+
368+ ` pgoutput-client ` owns PostgreSQL logical replication transport and lifecycle
369+ management. It opens the replication connection, optionally creates the logical
370+ replication slot, starts streaming, sends standby status feedback, and retries
371+ reconnectable failures.
372+
373+ ### Idle standby feedback
374+
375+ Long-running replication streams can be quiet for long periods when no WAL
376+ changes are produced. During those idle periods the client wakes periodically
377+ and sends standby status feedback so PostgreSQL does not terminate the walsender
378+ for replication timeout.
379+
380+ Control the feedback cadence with ` feedback_interval ` :
381+
382+ ``` ruby
383+ runner = Pgoutput ::Client ::Runner .new (
384+ database_url: ENV .fetch(" DATABASE_URL" ),
385+ slot_name: " mammoth_live" ,
386+ publication_names: [" mammoth_publication" ],
387+ feedback_interval: 10.0
388+ )
389+ ```
390+
391+ ### Idempotent automatic slot creation
392+
393+ When ` auto_create_slot ` is enabled, the client treats slot creation as
394+ "ensure this slot exists". Missing slots are created before streaming; existing
395+ slots are reused and do not cause startup failure.
396+
397+ ``` ruby
398+ runner = Pgoutput ::Client ::Runner .new (
399+ database_url: ENV .fetch(" DATABASE_URL" ),
400+ slot_name: " mammoth_live" ,
401+ publication_names: [" mammoth_publication" ],
402+ auto_create_slot: true ,
403+ temporary_slot: false
404+ )
405+ ```
406+
407+ Publication creation remains outside this gem. Create publications through
408+ application migrations, database bootstrap SQL, or infrastructure tooling.
409+
410+ ### Restart recovery
411+
412+ After a stream has connected successfully, transient PostgreSQL outages are
413+ retried through the reconnect lifecycle. This includes ordinary container or
414+ process restart windows where PostgreSQL temporarily refuses connections or
415+ reports that the database system is starting up.
416+
366417---
367418
368419## License
0 commit comments