[pgpool-general: 4905] Re: failover command return new_master_id -1

Tatsuo Ishii ishii at sraoss.co.jp
Sat Aug 13 01:16:52 JST 2016


> Other info: tooi-as-0005 who his shown as MASTER has delegate IP who
> is coonected to the read-only postresql server which is the one from
> the standby server!
> 
> My test id following: 3 sessions connected to delegate_IP port 5432,
> master server port 55432 standby server port 55432. I tried to drop a
> table in my test database on delegate IP which give me on the terminal

That's because you are using streaming replication while you set 
> master_slave mode = off and switch back to replication mode = on

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> WARNING: packet kind of backend 1 ['E'] does not match with
> master/majority nodes packet kind ['C']
> FATAL:  failed to read kind from backend
> DETAIL: kind mismatch among backends. Possible last query was: "drop
> table moi;" kind details are: 0[C] 1[E: cannot execute DROP TABLE in a
> read-only transaction]
> HINT:  check data consistency among db nodes
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
> 
> and in logs from standby server
> 
> 2016-08-12 17:30:19 CEST [14434-1] postgres at test ERROR: cannot execute
> DROP TABLE in a read-only transaction
> 2016-08-12 17:30:19 CEST [14434-2] postgres at test STATEMENT: drop table
> moi3;
> 
> I did the same on both other sessions which are connected to
> postgresql server, only the one from the master server accepted to
> drop the table.
> 
> How is this possible and how to tell to pgpool delegate IP to always
> connect to read/write database ?
> 
> Le 12/08/2016 à 16:10, Daniel Huhardeaux a écrit :
>> Hi,
>>
>> I finally got some script to be executed by setting value
>> health_check_period (and sr_check_period in master/slave mode). I know
>> put master_slave mode = off and switch back to replication mode = on
>>
>> Command which are executed: failover_command, wd_escaladation_command
>> and wd_de_escaladation_command. To get this result I created a small
>> script which is executed in each command stanza from pgpool.conf
>> creating a file in /tmp containing the name of the command who
>> executed
>> this script.
>>
>> This means that there is no recovery mode available (stage 1 nor 2) :(
>>
>> There is also problem with pcp_watchdog_info and values returned by
>> failover.sh. Here is an output after having restarted the 2 servers.
>> tooi-as-0005 was master before the reboot, the postgresql server on it
>> was stopped. tooi-as-0006 never became the new master despite the fact
>> that the trigger file was created! I then restarted tooi-as-0005 then
>> tooi-as-006.
>>
>> Hereunder the datas received from failover.sh command. How should I
>> interprete this?
>>
>> vendredi 12 août 2016, 14:47:10 (UTC+0200)
>> Failed node ID .... 1
>> Failed Hostname ... tooi-as-0006
>> Failed_port ....... 55432
>> Failed_db_cluster . /var/lib/postgresql/9.5/main
>> New_master_ID ..... -1
>> Old_master_ID ..... 1
>> New_master_hostname
>> Old_primary_node_ID 1
>>
>> pcp_watchdog_info on tooi-as-0005 who took master state
>>
>> 2 YES Linux_TOOI-AS-0005_5432 tooi-as-0005
>>
>> Linux_TOOI-AS-0005_5432 tooi-as-0005 5432 9000 4 MASTER
>> Linux_TOOI-AS-0006_5432 tooi-as-0006 5432 9000 7 STANDBY
>>
>>
>> In the standby postgres log I see after reboot a lots of
>>
>> 2016-08-12 14:47:12 CEST [3475-1] WARNING:  archive_mode enabled, yet
>> archive_command is not set
>>
>> This means that standby server is not in standby mode but in
>> standalone.
>> Right after I run my pg_masterSynchro.sh script which backup from
>> master
>> and create the recovery.conf file, standby server started to do the
>> right job. How is this possible ?
>>
>> Thanks for your support
>>
>> Regards
>>
>> Daniel
>>
> 
> 
> -- 
> TOOTAi Networks
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list