[pgpool-hackers: 2004] Re: Proposal to make backend node failover mechanism quorum aware
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Jan 25 13:22:15 JST 2017
> You can also understand "auto-failover" as preserving the connection. Right
> now if you have a connection with a master and a stand-by node, the pgpool
> "show pool_nodes" gives you this...
>
> [ec2-user at ip-172-25-1-32 bin]$ ./edb-psql edb -p 9999 -U ec2-user
>
> edb-psql (9.6.1.6, server 9.5.3.8)
>
> Type "help" for help.
>
> edb=# show pool_nodes;
>
> node_id | hostname | port | status | lb_weight | role | select_cnt |
> load_balance_node | replication_delay
>
> ---------+-------------+------+--------+-----------+---------+------------+-------------------+-------------------
>
> 0 | 172.25.1.33 | 5444 | up | 0.500000 | primary | 0 |
> false | 0
>
> 1 | 172.25.1.34 | 5444 | up | 0.500000 | standby | 0 |
> true | 0
> (2 rows)
>
> if you bring down the stand-by node, the health-check will kick in and if
> you run the same query again it will fail.
That's only happens if the client uses the standby.
> What i mean by auto-failover is if the master (primary server) is
> available, the auto-failover feature should failover to the master instead
> of throwing an error.
>
> Does that make sense?
To make it possible we need to think about followings:
1) We need to migrate all the session properties set in the previous
session to the new master connection.
2) If the client was receiving data row from Pgpool-II, it's hard to
continue it in the new session.
3) If the client was in the middle of a transaction, it's hard to
continue it in the new session.
These are not trivial, and I think it's not worth the problem, to be
honest.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-hackers
mailing list