Skip to content

Commit

Permalink
Merge pull request #3210 from szarnyasg/iss3208
Browse files Browse the repository at this point in the history
Postgres scanner: Document pg_use_ctid_scan
  • Loading branch information
szarnyasg authored Jul 1, 2024
2 parents e008928 + a6aea4e commit 5e42c47
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions docs/extensions/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ dbname=postgresscanner
host=localhost port=5432 dbname=mydb connect_timeout=10
```

| Name | Description | Default |
|------------|--------------------------------------|------------------|
| `dbname` | Database name | [user] |
| `host` | Name of host to connect to | `localhost` |
| `hostaddr` | Host IP address | `localhost` |
| `passfile` | Name of file passwords are stored in | `~/.pgpass` |
| `password` | Postgres password | (empty) |
| `port` | Port number | `5432` |
| `user` | Postgres user name | current user |
| Name | Description | Default |
| ---------- | ------------------------------------ | ------------ |
| `dbname` | Database name | [user] |
| `host` | Name of host to connect to | `localhost` |
| `hostaddr` | Host IP address | `localhost` |
| `passfile` | Name of file passwords are stored in | `~/.pgpass` |
| `password` | Postgres password | (empty) |
| `port` | Port number | `5432` |
| `user` | Postgres user name | current user |

An example URI is `postgresql://username@hostname/dbname`.

Expand Down Expand Up @@ -89,7 +89,7 @@ SHOW ALL TABLES;
<div class="narrow_table monospace_table"></div>

| name |
|-------|
| ----- |
| uuids |

```sql
Expand All @@ -98,8 +98,8 @@ SELECT * FROM uuids;

<div class="narrow_table monospace_table"></div>

| u |
|--------------------------------------|
| u |
| ------------------------------------ |
| 6d3d2541-710b-4bde-b3af-4711738636bf |
| NULL |
| 00000000-0000-0000-0000-000000000001 |
Expand Down Expand Up @@ -154,9 +154,9 @@ INSERT INTO postgres_db.tbl VALUES (42, 'DuckDB');
SELECT * FROM postgres_db.tbl;
```

| id | name |
|---:|--------|
| 42 | DuckDB |
| id | name |
| ---: | ------ |
| 42 | DuckDB |

### `COPY`

Expand Down Expand Up @@ -237,9 +237,9 @@ INSERT INTO postgres_db.s1.integers VALUES (42);
SELECT * FROM postgres_db.s1.integers;
```

| i |
|---:|
| 42 |
| i |
| ---: |
| 42 |

```sql
DROP SCHEMA postgres_db.s1;
Expand All @@ -262,9 +262,9 @@ SELECT * FROM postgres_db.tmp;

This returns:

| i |
|---:|
| 42 |
| i |
| ---: |
| 42 |

```sql
ROLLBACK;
Expand Down Expand Up @@ -299,8 +299,8 @@ SELECT * FROM postgres_query('postgres_db', 'SELECT * FROM cars LIMIT 3');
;
-->

| brand | model | color |
|--------------|------------|-------|
| brand | model | color |
| ------------ | ---------- | ----- |
| Ferrari | Testarossa | red |
| Aston Martin | DB2 | blue |
| Bentley | Mulsanne | gray |
Expand All @@ -321,15 +321,16 @@ CALL postgres_execute('postgres_db', 'CREATE TABLE my_table (i INTEGER)');

The extension exposes the following configuration parameters.

| Name | Description | Default |
|-----------------------------------|----------------------------------------------------------------------------|-----------|
| `pg_debug_show_queries` | DEBUG SETTING: print all queries sent to Postgres to stdout | `false` |
| `pg_connection_cache` | Whether or not to use the connection cache | `true` |
| `pg_experimental_filter_pushdown` | Whether or not to use filter pushdown (currently experimental) | `false` |
| `pg_array_as_varchar` | Read Postgres arrays as varchar - enables reading mixed dimensional arrays | `false` |
| `pg_connection_limit` | The maximum amount of concurrent Postgres connections | `64` |
| `pg_pages_per_task` | The amount of pages per task | `1000` |
| `pg_use_binary_copy` | Whether or not to use BINARY copy to read data | `true` |
| Name | Description | Default |
| --------------------------------- | -------------------------------------------------------------------------- | ------- |
| `pg_array_as_varchar` | Read Postgres arrays as varchar - enables reading mixed dimensional arrays | `false` |
| `pg_connection_cache` | Whether or not to use the connection cache | `true` |
| `pg_connection_limit` | The maximum amount of concurrent Postgres connections | `64` |
| `pg_debug_show_queries` | DEBUG SETTING: print all queries sent to Postgres to stdout | `false` |
| `pg_experimental_filter_pushdown` | Whether or not to use filter pushdown (currently experimental) | `false` |
| `pg_pages_per_task` | The amount of pages per task | `1000` |
| `pg_use_binary_copy` | Whether or not to use BINARY copy to read data | `true` |
| `pg_use_ctid_scan` | Whether or not to parallelize scanning using table ctids | `true` |

## Schema Cache

Expand Down

0 comments on commit 5e42c47

Please sign in to comment.