Hi,

I tried to access data following the PSPP documentation 9.4.2 Postgres
Database Queries
<https://www.gnu.org/software/pspp/manual/html_node/GET-DATA-_002fTYPE_003dPSQL.html>
section but got the following error.

PSPP> GET DATA /TYPE=PSQL
   > /CONNECT="host=127.0.0.1 port=5433 user=postgres dbname=postgres"

   > /SQL="SELECT * FROM tst"
   > /UNENCRYPTED.

error: Error from psql source: ERROR:  cannot use serializable mode in a hot
standby
HINT:  You can use REPEATABLE READ instead.

I pinned down to /src/data/psql-reader.c and found

ds_init_cstr (&query,
       "BEGIN READ ONLY ISOLATION LEVEL SERIALIZABLE; "
"DECLARE  pspp BINARY CURSOR FOR ");

It seems that PSPP can not query from a hot-standby database because the
isolation level is set to SERIALIZABLE in this line.

Is it possible to improve this?

Maybe set the isolation level to REPEATABLE READ instead of
SERIALIZABLE ( 'PostgreSQL:
Documentation: 9.5: SET TRANSACTION'
<https://www.postgresql.org/docs/9.5/static/sql-set-transaction.html> )?

Thank you.
_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users

Reply via email to