Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9bcd7f

Browse files
committed
[PGPRO-4074] 3pc support.
Cherry pick of cef39e64b85aed8cd (persistent state change for prepared xact) plus1) Allow setting state_3pc in PREPARE;2) Variable len state_3pc -- it can be quite large once we stuff the whole generational stuff inside;3) Fix holes in state_3pc interactions with checkpointer: - 'P, ckpt, 3pc, ckpt, crash' previously lost 3pc as gxact is marked ondisk during second ckpt; - prepare_start|end_lsn wasn't updated during state_3pc redo, this also led to state_3pc loss once the xact is moved to file; - gxact's start|end lsns shouldn't be updated until SetPreparedTransactionState fsyncs its WAL;4) Relevant TAP test moved into core patch and supplemented with 3) cases.5) Bump TWOPHASE_MAGIC.tags: multimaster(cherry picked from commit d45aa55aebb60540416559ad9c929a118056bcce)
1 parent63c917c commitc9bcd7f

File tree

13 files changed

+498
-29
lines changed

13 files changed

+498
-29
lines changed

‎src/backend/access/rmgrdesc/xactdesc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,19 @@ ParsePrepareRecord(uint8 info, xl_xact_prepare *xlrec, xl_xact_parsed_prepare *p
230230
parsed->nrels=xlrec->ncommitrels;
231231
parsed->nabortrels=xlrec->nabortrels;
232232
parsed->nmsgs=xlrec->ninvalmsgs;
233+
parsed->state_3pc_change=xlrec->state_3pc_change;
233234

234235
strncpy(parsed->twophase_gid,bufptr,xlrec->gidlen);
235236
bufptr+=MAXALIGN(xlrec->gidlen);
236237

238+
if (xlrec->state_3pc_len>0)
239+
{
240+
strncpy(parsed->state_3pc,bufptr,xlrec->state_3pc_len);
241+
bufptr+=MAXALIGN(xlrec->state_3pc_len);
242+
}
243+
else
244+
*parsed->state_3pc='\0';
245+
237246
parsed->subxacts= (TransactionId*)bufptr;
238247
bufptr+=MAXALIGN(xlrec->nsubxacts*sizeof(TransactionId));
239248

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp