feat: explain the configuration for copy_data retries#66
feat: explain the configuration for copy_data retries#66
Conversation
Deploying pgdog-docs with
|
| Latest commit: |
4779ffa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://df223eef.pgdog-docs.pages.dev |
| Branch Preview URL: | https://push-prqnkmuwyull.pgdog-docs.pages.dev |
|
|
||
| The two cases behave differently: | ||
|
|
||
| - **Destination shard down** — PgDog opens a fresh connection on the next attempt. |
There was a problem hiding this comment.
Let's use tables here, e.g.:
| Situation | Behavior |
|---|---|
| Destination shard down | PgDog opens a fresh connection on the next attempt. |
|
|
||
| Most drops are clean: table copies run inside an implicit transaction, so Postgres rolls back on disconnect and the destination is left empty. | ||
|
|
||
| The awkward case: the connection drops *after* `COPY` commits on some or all shards but before PgDog records it as done. The rows survive, and the next attempt hits primary key violations immediately. |
There was a problem hiding this comment.
The wording here is not ideal. We should be a bit more neutral about edge cases / bugs we haven't fixed yet :)
There was a problem hiding this comment.
did the rewording of the new sections it attempt to improve this
|
|
||
| ### Replication slot not dropped after abort | ||
|
|
||
| Aborting `COPY_DATA` without restarting it leaves the **permanent** replication slot sitting on the source. Postgres won't recycle WAL until it's gone. Drop it manually: |
There was a problem hiding this comment.
I'm not sure this is true or we have a bug. We do drop that slot on copy abort, but I guess it may not always work, so it's a good idea to have this documented nonetheless.
There was a problem hiding this comment.
warning is generated in any case https://github.com/pgdogdev/pgdog/blob/a6afd9b510c8aedf2d14cfe1882db5d27f856884/pgdog/src/admin/stop_task.rs#L37
| |-|-| | ||
| | [Pre-data](#pre-data-phase) | Create identical tables on all shards along with the primary key constraint (and index). Secondary indexes are _not_ created yet. | | ||
| | [Post-data](#post-data-phase) | Create secondary indexes on all tables and shards. This is done after [moving data](hash.md), as a separate step, because it's considerably faster to create indexes on whole tables than while inserting individual rows. | | ||
| | [Post-data](#post-data-phase) | Create secondary indexes on all tables and shards. This is done after [moving data](move.md), as a separate step, because it's considerably faster to create indexes on whole tables than while inserting individual rows. | |
There was a problem hiding this comment.
When changing URLs, make sure to add a redirect to mkdocs.yml
child of pgdogdev/pgdog#916