I setup a PG 9.3.5 master on CentOS 6 x86_64,and 2 screaming replicaton slaves,one on CentOS6 x86_64,the other on FreeBSD 10 amd64.
The replication work fine for a week,But today I find a problem on sql running on FreeBSD:simple sql use index do not return result.If I disable the index ,use seqscan,then I can get correct result.
psql (9.3.5)
Type "help" for help. ^
xx=> explain analyze verbose select order_id from orders where order_id = 'AAGJfwAAAAJYUzD3';
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on public.orders (cost=4.47..31.06 rows=7 width=17) (actual time=0.317..0.317 rows=0 loops=1)
Output: order_id
Recheck Cond: ((orders.order_id)::text = 'AAGJfwAAAAJYUzD3'::text)
-> Bitmap Index Scan on orders_order_id_idx (cost=0.00..4.47 rows=7 width=0) (actual time=0.252..0.252 rows=0 loops=1)
Index Cond: ((orders.order_id)::text = 'AAGJfwAAAAJYUzD3'::text)
Total runtime: 0.753 ms
(6 rows)
xx=> set enable_indexonlyscan to f;
SET
xx=> set enable_indexscan to f;
SET
xx=> set enable_bitmapscan to f;
SET
forex=> explain analyze verbose select order_id from orders where order_id = 'AAGJfwAAAAJYUzD3';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------
Seq Scan on public.orders (cost=0.00..2185.69 rows=7 width=17) (actual time=70.003..71.238 rows=1 loops=1)
Output: order_id
Filter: ((orders.order_id)::text = 'AAGJfwAAAAJYUzD3'::text)
Rows Removed by Filter: 63481
Total runtime: 71.379 ms
(5 rows)
So,Is this a un-support replication method?
Jov
blog: http:amutu.com/blog