journeytosilius opened a new issue, #198:
URL: https://github.com/apache/arrow-flight-sql-postgresql/issues/198
container conf:
```
postgres_ts_flight:
image: 'postgres_ts_flight'
container_name: postgres_ts_flight
shm_size: 1gb
ports:
- "5432:5432"
- "127.0.0.1:15432:15432"
volumes:
-
./postgresql_ts_flight_tuned.conf:/etc/postgresql/17/main/postgresql.conf
- ./pg_hba.conf:/etc/postgresql/17/main/pg_hba.conf
- ./init-password.txt:/init-password.txt
- /dbpool/prospectdata/data:/var/lib/postgresql/17/main/data
- /dbpool/prospectdata/run/postgresql:/var/run/postgresql
user: "postgres:postgres"
command: >
bash -c "if [ ! -f /var/lib/postgresql/17/main/data/PG_VERSION ]; then
/usr/lib/postgresql/17/bin/initdb --username=postgres
--auth=md5 --pwfile=/init-password.txt
--pgdata=/var/lib/postgresql/17/main/data;
fi &&
# Ensure the directory permissions for /var/run/postgresql
sudo mkdir -p /var/run/postgresql && sudo chown
postgres:postgres /var/run/postgresql &&
# Change perms for snakeoil custom_network
sudo chown postgres:ssl-cert /etc/ssl/private/ &&
sudo chown postgres:postgres
/etc/ssl/private/ssl-cert-snakeoil.key &&
sudo chmod 0600 /etc/ssl/private/ssl-cert-snakeoil.key &&
# Start PostgreSQL with the specified config file
/usr/lib/postgresql/17/bin/postgres -c
config_file=/etc/postgresql/17/main/postgresql.conf"
# command: ["tail", "-f", "/dev/null"]
networks:
custom_network:
ipv4_address: 172.18.0.100
```
at postgres logs :` 2025-02-06 01:03:40.314 UTC [27] LOG: listening on
grpc://127.0.0.1:15432 for Apache Arrow Flight SQL`
simple code :
```
db_kwargs={
"username": FLIGHT_USER,
"password": FLIGHT_PASSWORD,
"adbc.flight.sql.rpc.call_header.x-flight-sql-database": FLIGHT_DB
}
with flight_sql.connect(uri="grpc://127.0.0.1:15432",db_kwargs=db_kwargs) as
conn:
with conn.cursor() as cur:
cur.execute(QUERY)
x = cur.fetch_arrow_table()
print(x)
```
error:
```
Traceback (most recent call last):
File "/home/xavier/projects/plotter/plot_ohlc_v2_ca_arrow.py", line 47, in
<module>
with
flight_sql.connect(uri="grpc://127.0.0.1:15432",db_kwargs=db_kwargs) as conn:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/xavier/projects/plotter/env/lib/python3.12/site-packages/adbc_driver_flightsql/dbapi.py",
line 120, in connect
conn = adbc_driver_manager.AdbcConnection(db, **(conn_kwargs or {}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "adbc_driver_manager/_lib.pyx", line 705, in
adbc_driver_manager._lib.AdbcConnection.__init__
File "adbc_driver_manager/_lib.pyx", line 260, in
adbc_driver_manager._lib.check_error
adbc_driver_manager.OperationalError: IO: [FlightSQL] connection error: desc
= "error reading server preface: read tcp 127.0.0.1:60576->127.0.0.1:15432:
read: connection reset by peer" (Unavailable; AuthenticateBasicToken)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]