Skip to content

Commit 331be9a

Browse files
authored
Merge pull request #4428 from ClickHouse/pg-pipe-fix-col-add
Postgres schema changes: mention columns are added only after table is updated
2 parents a2653cc + cb2ddc3 commit 331be9a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/integrations/data-ingestion/clickpipes/postgres/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To set the replica identity to FULL, you can use the following SQL command:
3232
```sql
3333
ALTER TABLE your_table_name REPLICA IDENTITY FULL;
3434
```
35-
REPLICA IDENTITY FULL also enabled replication of unchanged TOAST columns. More on that [here](./toast).
35+
REPLICA IDENTITY FULL also enables replication of unchanged TOAST columns. More on that [here](./toast).
3636

3737
Note that using `REPLICA IDENTITY FULL` can have performance implications and also faster WAL growth, especially for tables without a primary key and with frequent updates or deletes, as it requires more data to be logged for each change. If you have any doubts or need assistance with setting up primary keys or replica identities for your tables, please reach out to our support team for guidance.
3838

docs/integrations/data-ingestion/clickpipes/postgres/schema-changes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ClickPipes for Postgres can detect schema changes in the source tables and, in s
1010

1111
| Schema Change Type | Behaviour |
1212
| ----------------------------------------------------------------------------------- | ------------------------------------- |
13-
| Adding a new column (`ALTER TABLE ADD COLUMN ...`) | Propagated automatically. The new column(s) will be populated for all rows replicated after the schema change |
14-
| Adding a new column with a default value (`ALTER TABLE ADD COLUMN ... DEFAULT ...`) | Propagated automatically. The new column(s) will be populated for all rows replicated after the schema change, but existing rows will not show the default value without a full table refresh |
13+
| Adding a new column (`ALTER TABLE ADD COLUMN ...`) | Propagated automatically once the table gets an insert/update/delete. The new column(s) will be populated for all rows replicated after the schema change |
14+
| Adding a new column with a default value (`ALTER TABLE ADD COLUMN ... DEFAULT ...`) | Propagated automatically once the table gets an insert/update/delete. The new column(s) will be populated for all rows replicated after the schema change, but existing rows will not show the default value without a full table refresh |
1515
| Dropping an existing column (`ALTER TABLE DROP COLUMN ...`) | Detected, but **not** propagated. The dropped column(s) will be populated with `NULL` for all rows replicated after the schema change |
16+
17+
Note that column addition will be propagated at the end of a batch's sync, which could occur after the sync interval or pull batch size is reached. More information on controlling syncs [here](./controlling_sync.md)

0 commit comments

Comments
 (0)