[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-hackers
Subject:    [HACKERS] unexpected query result on hot standby server
From:       Pavel Stehule <pavel.stehule () gmail ! com>
Date:       2012-12-31 20:32:29
Message-ID: CAFj8pRBJ1FzuP4YPGaLixTbDGJ44=uvPZGsfj3WE2UHjuh8yGw () mail ! gmail ! com
[Download RAW message or body]

Hello

I am trying simulate hotstandby conflicts on 9.3, but without success.

I have a basic hot standby configuration - on slave just "hot_standby
= on", "standby_mode = on" and  "primary_conninfo"

hot standby node works well - but I would to generate conflict

I create table bubu on master and insert there value

-- master
create table bubu(a int);
insert into bubu values(10);

-- then on slave
select * from bubu union all select 1 from (select pg_sleep(40)) x
union all select * from bubu;

-- then on master (before slave query finishing);
delete from bubu;
vacuum full bubu;

-- this should to raise conflict, but I don't see conflict in select *
from pg_stat_database_conflicts;
-- query on slave returns two rows ???

postgres=# select * from bubu union all select 1 from (select
pg_sleep(40)) x union all select * from bubu;
 a
----
 10
  1
(2 rows)


strange - after setting hot_standby_feedback = on, previous query
returns two rows too

What I am doing wrong?

Regards

Pavel


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic