Configuration#

shared_preload_libraries#

You must add arrow_flight_sql to shared_preload_libraries.

You need to restart your PostgreSQL after changing shared_preload_libraries.

arrow_flight_sql.uri#

The endpoint URI for Apache Arrow Flight SQL.

The default is grpc://127.0.0.1:15432.

If you want to use TLS to connect the Apache Arrow Flight SQL endpoint, you need to do the followings:

  1. Use grpc+tls schema such as grpc+tls://127.0.0.1:15432 for arrow_flight_sql.uri

  2. Prepare the standard PostgreSQL TLS configurations such as ssl, ssl_ca_file. Apache Arrow Flight SQL adapter for PostgreSQL uses the PostgreSQL’s TLS configurations. So you don’t need to prepare TLS related things only for Apache Arrow Flight SQL for PostgreSQL. See also the PostgreSQL’s Secure TCP/IP Connections with SSL documentation.

Note that you also need to setup client side. For example, see the following documentations for the C++ implementation of Apache Arrow Flight SQL client:

Note

mTLS (mutual-TLS) isn’t implemented yet. If you’re interested in mTLS, please see the issue for it: apache/arrow-flight-sql-postgresql#79

arrow_flight_sql.session_timeout#

The maximum session duration in seconds.

The default is 300 seconds.

-1 means no timeout.

If no query is executed during the timeout, the session is closed automatically.

arrow_flight_sql.max_n_rows_per_record_batch#

The maximum number of rows per record batch.

The default is 1 * 1024 * 1024 rows.

If this value is small, total data exchange time will be slower.

If this value is larger, latency will be larger.