PostgreSQL Source Code: src/backend/access/rmgrdesc/xactdesc.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

16

23

24

25

26

27

28

29

30

31

32

33

34void

36{

38

39 memset(parsed, 0, sizeof(*parsed));

40

41 parsed->xinfo = 0;

42

43

45

47 {

49

51

53 }

54

56 {

58

59 parsed->dbId = xl_dbinfo->dbId;

60 parsed->tsId = xl_dbinfo->tsId;

61

63 }

64

66 {

68

71

74 }

75

77 {

79

80 parsed->nrels = xl_rellocators->nrels;

82

85 }

86

88 {

90

93

96 }

97

99 {

101

103 parsed->msgs = xl_invals->msgs;

104

107 }

108

110 {

112

114

116

118 {

121 }

122 }

123

124

125

127 {

129

130

131 memcpy(&xl_origin, data, sizeof(xl_origin));

132

135

137 }

138}

139

140void

142{

144

145 memset(parsed, 0, sizeof(*parsed));

146

147 parsed->xinfo = 0;

148

149

151

153 {

155

157

159 }

160

162 {

164

165 parsed->dbId = xl_dbinfo->dbId;

166 parsed->tsId = xl_dbinfo->tsId;

167

169 }

170

172 {

174

177

180 }

181

183 {

185

186 parsed->nrels = xl_rellocator->nrels;

188

191 }

192

194 {

196

199

202 }

203

205 {

207

209

211

213 {

216 }

217 }

218

219

220

222 {

224

225

226 memcpy(&xl_origin, data, sizeof(xl_origin));

227

230

232 }

233}

234

235

236

237

238void

240{

241 char *bufptr;

242

244

245 memset(parsed, 0, sizeof(*parsed));

246

258

261

264

267

270

273

276

279}

280

281static void

284{

285 int i;

286

287 if (nrels > 0)

288 {

290 for (i = 0; i < nrels; i++)

291 {

294 }

295 }

296}

297

298static void

300{

301 int i;

302

303 if (nsubxacts > 0)

304 {

306 for (i = 0; i < nsubxacts; i++)

308 }

309}

310

311static void

314{

315 int i;

316

317 if (ndropped > 0)

318 {

320 for (i = 0; i < ndropped; i++)

321 {

323 ((uint64) dropped_stats[i].objid_hi) << 32 | dropped_stats[i].objid_lo;

324

326 dropped_stats[i].kind,

327 dropped_stats[i].dboid,

328 objid);

329 }

330 }

331}

332

333static void

335{

337

339

340

343

345

349

353

356

359

361 {

363 origin_id,

366 }

367}

368

369static void

371{

373

375

376

379

381

384

386 {

388 origin_id,

391 }

392

394}

395

396static void

398{

400

402

405

412

415

416

417

418

419

422 origin_id,

425}

426

427static void

429{

430 int i;

431

433

436}

437

438void

440{

443

445 {

447

450 }

452 {

454

457 }

459 {

461

464 }

466 {

468

469

470

471

472

473

476 }

478 {

480

483 }

484}

485

486const char *

488{

489 const char *id = NULL;

490

492 {

494 id = "COMMIT";

495 break;

497 id = "PREPARE";

498 break;

500 id = "ABORT";

501 break;

503 id = "COMMIT_PREPARED";

504 break;

506 id = "ABORT_PREPARED";

507 break;

509 id = "ASSIGNMENT";

510 break;

512 id = "INVALIDATION";

513 break;

514 }

515

516 return id;

517}

const char * timestamptz_to_str(TimestampTz t)

#define InvalidRepOriginId

size_t strlcpy(char *dst, const char *src, size_t siz)

struct RelFileLocator RelFileLocator

#define relpathperm(rlocator, forknum)

void standby_desc_invalidations(StringInfo buf, int nmsgs, SharedInvalidationMessage *msgs, Oid dbId, Oid tsId, bool relcacheInitFileInval)

void appendStringInfo(StringInfo str, const char *fmt,...)

void appendStringInfoString(StringInfo str, const char *s)

TransactionId xsub[FLEXIBLE_ARRAY_MEMBER]

SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER]

TimestampTz origin_timestamp

xl_xact_stats_item * stats

RelFileLocator * xlocators

TransactionId twophase_xid

char twophase_gid[GIDSIZE]

TimestampTz origin_timestamp

xl_xact_stats_item * stats

TransactionId twophase_xid

RelFileLocator * xlocators

RelFileLocator * abortlocators

TimestampTz origin_timestamp

char twophase_gid[GIDSIZE]

xl_xact_stats_item * abortstats

SharedInvalidationMessage * msgs

TimestampTz origin_timestamp

RelFileLocator xlocators[FLEXIBLE_ARRAY_MEMBER]

xl_xact_stats_item items[FLEXIBLE_ARRAY_MEMBER]

TransactionId subxacts[FLEXIBLE_ARRAY_MEMBER]

#define TransactionIdIsValid(xid)

struct xl_xact_stats_item xl_xact_stats_item

#define XactCompletionForceSyncCommit(xinfo)

#define MinSizeOfXactInvals

#define MinSizeOfXactSubxacts

#define XLOG_XACT_COMMIT_PREPARED

#define XLOG_XACT_INVALIDATIONS

struct xl_xact_dbinfo xl_xact_dbinfo

#define XACT_XINFO_HAS_GID

struct xl_xact_origin xl_xact_origin

#define XACT_XINFO_HAS_ORIGIN

#define XLOG_XACT_PREPARE

#define XACT_XINFO_HAS_TWOPHASE

#define MinSizeOfXactCommit

#define MinSizeOfXactRelfileLocators

#define MinSizeOfXactStatsItems

#define XACT_XINFO_HAS_RELFILELOCATORS

#define MinSizeOfXactAbort

struct xl_xact_xinfo xl_xact_xinfo

#define XACT_XINFO_HAS_DBINFO

#define XactCompletionApplyFeedback(xinfo)

#define XLOG_XACT_ASSIGNMENT

#define XACT_XINFO_HAS_INVALS

struct xl_xact_twophase xl_xact_twophase

#define XLOG_XACT_ABORT_PREPARED

#define XLOG_XACT_HAS_INFO

#define XactCompletionRelcacheInitFileInval(xinfo)

#define XACT_XINFO_HAS_SUBXACTS

#define XACT_XINFO_HAS_DROPPED_STATS

const char * xact_identify(uint8 info)

static void xact_desc_stats(StringInfo buf, const char *label, int ndropped, xl_xact_stats_item *dropped_stats)

static void xact_desc_commit(StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId origin_id)

static void xact_desc_relations(StringInfo buf, char *label, int nrels, RelFileLocator *xlocators)

static void xact_desc_abort(StringInfo buf, uint8 info, xl_xact_abort *xlrec, RepOriginId origin_id)

static void xact_desc_subxacts(StringInfo buf, int nsubxacts, TransactionId *subxacts)

static void xact_desc_assignment(StringInfo buf, xl_xact_assignment *xlrec)

static void xact_desc_prepare(StringInfo buf, uint8 info, xl_xact_prepare *xlrec, RepOriginId origin_id)

void ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *parsed)

void ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed)

void xact_desc(StringInfo buf, XLogReaderState *record)

void ParsePrepareRecord(uint8 info, xl_xact_prepare *xlrec, xl_xact_parsed_prepare *parsed)

#define LSN_FORMAT_ARGS(lsn)

#define XLogRecGetOrigin(decoder)

#define XLogRecGetInfo(decoder)

#define XLogRecGetData(decoder)