Dears,
Maybe a bug. My test environment:two coordinators, two datanodes.The steps are described as follows:
1. create table tt(a int);
2. alter table tt add constraint pk primary key(a);
3. insert into tt values(8);
4. insert into tt values(8);
when execute step 4, something happened.
coordinator log:
template1=# insert into tt values(8);
INSERT 0 1
template1=# insert into tt values(8);
WARNING: unexpected EOF on datanode connection
ERROR: Failed to read response from data nodes
STATEMENT: insert into tt values(8);
WARNING: unexpected EOF on datanode connection
WARNING: unexpected EOF on datanode connection
WARNING: unexpected EOF on datanode connection
ERROR: Failed to read response from data nodes
template1=# LOG: failed to connect to data node
LOG: failed to connect to data node
Two datanodes' logs are described respectively.
local one:
LOG: statement: BEGIN
LOG: statement: insert into tt values(8);
LOG: statement: PREPARE TRANSACTION 'T116'
LOG: statement: COMMIT PREPARED 'T116'
LOG: statement: BEGIN
LOG: statement: insert into tt values(8);
ERROR: duplicate key value violates unique constraint "pk"
STATEMENT: insert into tt values(8);
PANIC: cannot abort transaction 118, it was already committed
LOG: server process (PID 1374) was terminated by signal 6: Aborted
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted; last known up at 2010-10-19 14:30:31 CST
LOG: database system was not properly shut down; automatic recovery in progress
The session started: 1376
FATAL: the database system is in recovery mode
LOG: redo starts at 0/4BC07C
LOG: record with zero length at 0/4BC408
LOG: redo done at 0/4BC3DC
LOG: last completed transaction was at log time 2021-08-06 21:02:14.101545+08
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
The remote datanode log:
LOG: statement: BEGIN
LOG: statement: insert into tt values(8);
LOG: statement: PREPARE TRANSACTION 'T116'
LOG: statement: COMMIT PREPARED 'T116'
LOG: statement: BEGIN
LOG: statement: insert into tt values(8);
LOG: statement: ROLLBACK
PANIC: cannot abort transaction 118, it was already committed
STATEMENT: ROLLBACK
LOG: server process (PID 28899) was terminated by signal 6: Aborted
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted; last known up at 2010-10-19 14:29:49 CST
LOG: database system was not properly shut down; automatic recovery in progress
The session started: 28901
FATAL: the database system is in recovery mode
LOG: redo starts at 0/712738
LOG: record with zero length at 0/712A44
LOG: redo done at 0/712A18
LOG: last completed transaction was at log time 2021-08-06 21:01:31.960109+08
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
Truely,
Benny
|