Thread: PgPool - black_function_list problem
Hello,
I have a problem with black_function_list which seems to work badly
2 nodes PgSql 9.6.10 in hot_standby mode + Pgpool 3.7.5
primary : wal_level = hot_standby
standby : hot_standby = on
pgpool.conf :
load_balance_mode = on
ignore_leading_white_space = on
white_function_list = ''
black_function_list = 'curval,lastval,nextval,setval, copy_order_item.*,val_aurora_schema.copy_order_item.*,WITH ins_parent_order_item AS.*'
But error on slave node :
< 2018-09-12 14:59:33.901 CEST >>ERROR: cannot execute SELECT in a read-only transaction
< 2018-09-12 14:59:33.901 CEST >CONTEXT: SQL statement "WITH ins_parent_order_item AS (
INSERT INTO val_aurora_schema.order_item
SELECT (oi).* -- note the parentheses
FROM (
SELECT t #= hstore('id', uuid_generate_v4()::text)
#= hstore('item_ident', uuid_generate_v4()::text)
#= hstore('item_type', p_new_order_item_type::text)
#= hstore('parent_ident', v_new_parent_ident::text)
#= hstore('item_version', p_new_item_version::text)
#= hstore('subitem_number', p_new_subitem::text)
AS oi
FROM val_aurora_schema.order_item t
WHERE id = p_old_order_item_id
) sub
RETURNING id
)
select id from ins_parent_order_item"
PL/pgSQL function val_aurora_schema.copy_order_item(integer,character varying,character varying,boolean,boolean,integer) line 84 at SQL statement
< 2018-09-12 14:59:33.901 CEST >STATEMENT: select * from val_aurora_schema.copy_order_item($1,$2,$3,$4,$5,$6,$7) as result
I tried to put /*NO load balance*/ before the "WITH ins_xxx" statement, but still the same problem.
Can someone help me ?
Thanks
Frédéric BOULET