Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 52d3545

Browse files
knizhnikkelvich
authored andcommitted
Check for in progress before setting HEAP_XMIN_INVALID hint
1 parent 5ced064 commit 52d3545

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pglogical_proto.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ pglogical_write_rel(StringInfo out, PGLogicalOutputData *data, Relation rel)
7777
Oid relid;
7878

7979
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN) {
80-
MTM_LOG1("%d: pglogical_write_message filtered", MyProcPid);
80+
MTM_LOG2("%d: pglogical_write_message filtered", MyProcPid);
8181
return;
8282
}
8383

8484
if (DDLInProress) {
85-
MTM_LOG1("%d: pglogical_write_message filtered DDLInProress", MyProcPid);
85+
MTM_LOG2("%d: pglogical_write_message filtered DDLInProress", MyProcPid);
8686
return;
8787
}
8888

@@ -141,7 +141,7 @@ pglogical_write_message(StringInfo out,
141141
{
142142
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN)
143143
{
144-
MTM_LOG1("%d: pglogical_write_message filtered", MyProcPid);
144+
MTM_LOG2("%d: pglogical_write_message filtered", MyProcPid);
145145
return;
146146
}
147147
DDLInProress = true;
@@ -263,12 +263,12 @@ pglogical_write_insert(StringInfo out, PGLogicalOutputData *data,
263263
Relation rel, HeapTuple newtuple)
264264
{
265265
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN){
266-
MTM_LOG1("%d: pglogical_write_insert filtered", MyProcPid);
266+
MTM_LOG2("%d: pglogical_write_insert filtered", MyProcPid);
267267
return;
268268
}
269269

270270
if (DDLInProress) {
271-
MTM_LOG1("%d: pglogical_write_insert filtered DDLInProress", MyProcPid);
271+
MTM_LOG2("%d: pglogical_write_insert filtered DDLInProress", MyProcPid);
272272
return;
273273
}
274274

@@ -286,12 +286,12 @@ pglogical_write_update(StringInfo out, PGLogicalOutputData *data,
286286
Relation rel, HeapTuple oldtuple, HeapTuple newtuple)
287287
{
288288
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN){
289-
MTM_LOG1("%d: pglogical_write_update filtered", MyProcPid);
289+
MTM_LOG2("%d: pglogical_write_update filtered", MyProcPid);
290290
return;
291291
}
292292

293293
if (DDLInProress) {
294-
MTM_LOG1("%d: pglogical_write_update filtered DDLInProress", MyProcPid);
294+
MTM_LOG2("%d: pglogical_write_update filtered DDLInProress", MyProcPid);
295295
return;
296296
}
297297

@@ -319,12 +319,12 @@ pglogical_write_delete(StringInfo out, PGLogicalOutputData *data,
319319
Relation rel, HeapTuple oldtuple)
320320
{
321321
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN){
322-
MTM_LOG1("%d: pglogical_write_delete filtered", MyProcPid);
322+
MTM_LOG2("%d: pglogical_write_delete filtered", MyProcPid);
323323
return;
324324
}
325325

326326
if (DDLInProress) {
327-
MTM_LOG1("%d: pglogical_write_delete filtered DDLInProress", MyProcPid);
327+
MTM_LOG2("%d: pglogical_write_delete filtered DDLInProress", MyProcPid);
328328
return;
329329
}
330330

@@ -356,12 +356,12 @@ pglogical_write_tuple(StringInfo out, PGLogicalOutputData *data,
356356
uint16 nliveatts = 0;
357357

358358
if (MtmTransactionSnapshot(MtmCurrentXid) == INVALID_CSN){
359-
MTM_LOG1("%d: pglogical_write_tuple filtered", MyProcPid);
359+
MTM_LOG2("%d: pglogical_write_tuple filtered", MyProcPid);
360360
return;
361361
}
362362

363363
if (DDLInProress) {
364-
MTM_LOG1("%d: pglogical_write_tuple filtered DDLInProress", MyProcPid);
364+
MTM_LOG2("%d: pglogical_write_tuple filtered DDLInProress", MyProcPid);
365365
return;
366366
}
367367

pglogical_receiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ pglogical_receiver_main(Datum main_arg)
524524
MtmSpillToFile(spill_file, buf.data, buf.used);
525525
ByteBufferReset(&buf);
526526
}
527-
if (stmt[0] == 'M' && stmt[1] == 'L') {
527+
if (stmt[0] == 'M' && stmt[1] == 'L') {
528528
MTM_LOG3("Process deadlock message from %d", nodeId);
529529
MtmExecutor(stmt, rc - hdr_len);
530530
} else {

0 commit comments

Comments
 (0)