Linux replication to FreeBSD problem

From: Jov <amutu(at)amutu(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Linux replication to FreeBSD problem
Date: 2014-08-20 14:53:19
Message-ID: CADyrUxOjwgKh4GhXW2HEqetfAPiwZaYj9uWG34bhyiFxLrM1bA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 <http://amutu.com/blog>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-08-20 15:17:00 Re: Linux replication to FreeBSD problem
Previous Message Tom Lane 2014-08-20 14:21:12 Re: create function : change name of input parameter