Skip to content

Commit

Permalink
Simplify CTID_TABLE_BLOCK_SIZE query for Postgres integration (#48126) (
Browse files Browse the repository at this point in the history
#49469)

Co-authored-by: Tom <tom@tom.kiwi>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 16, 2024
1 parent 7d91ed7 commit 3af71ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: decd338e-5647-4c0b-adf4-da0e75f5a750
dockerImageTag: 3.6.23
dockerImageTag: 3.6.24
dockerRepository: airbyte/source-postgres
documentationUrl: https://docs.airbyte.com/integrations/sources/postgres
githubIssueLabel: source-postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ SELECT pg_relation_filenode('%s')
public static final String TOTAL_BYTES_RESULT_COL = "totalbytes";

/**
* Query returns the size table data takes on DB server disk (not incling any index or other
* Query returns the size table data takes on DB server disk (not including any index or other
* metadata) And the size of each page used in (page, tuple) ctid. This helps us evaluate how many
* pages we need to read to traverse the entire table.
*/
public static final String CTID_TABLE_BLOCK_SIZE =
"""
WITH block_sz AS (SELECT current_setting('block_size')::int), rel_sz AS (select pg_relation_size('%s')) SELECT * from block_sz, rel_sz
SELECT current_setting('block_size')::int, pg_relation_size('%s')
""";

/**
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ According to Postgres [documentation](https://www.postgresql.org/docs/14/datatyp

| Version | Date | Pull Request | Subject |
|---------|------------|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 3.6.24 | 2024-12-16 | [49469](https://github.com/airbytehq/airbyte/pull/49469) | Simplify CTID_TABLE_BLOCK_SIZE query for Postgres integration |
| 3.6.23 | 2024-11-13 | [\#48482](https://github.com/airbytehq/airbyte/pull/48482) | Convert large integer typed using NUMERIC(X, 0) into a BigInteger. l
| 3.6.22 | 2024-10-02 | [46900](https://github.com/airbytehq/airbyte/pull/46900) | Fixed a bug where source docs won't render on Airbyte 1.1 |
| 3.6.21 | 2024-10-02 | [46322](https://github.com/airbytehq/airbyte/pull/46322) | Support CDC against a read-replica (continuation) |
Expand Down

0 comments on commit 3af71ab

Please sign in to comment.