Age Owner Branch data TLA Line data Source code
1 : : /*-------------------------------------------------------------------------
2 : : *
3 : : * heapdesc.c
4 : : * rmgr descriptor routines for access/heap/heapam.c
5 : : *
6 : : * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 : : * Portions Copyright (c) 1994, Regents of the University of California
8 : : *
9 : : *
10 : : * IDENTIFICATION
11 : : * src/backend/access/rmgrdesc/heapdesc.c
12 : : *
13 : : *-------------------------------------------------------------------------
14 : : */
15 : : #include "postgres.h"
16 : :
17 : : #include "access/heapam_xlog.h"
18 : : #include "access/rmgrdesc_utils.h"
19 : : #include "access/visibilitymapdefs.h"
20 : : #include "storage/standbydefs.h"
21 : :
22 : : /*
23 : : * NOTE: "keyname" argument cannot have trailing spaces or punctuation
24 : : * characters
25 : : */
26 : : static void
1201 pg@bowt.ie 27 :CBC 142191 : infobits_desc(StringInfo buf, uint8 infobits, const char *keyname)
28 : : {
29 : 142191 : appendStringInfo(buf, "%s: [", keyname);
30 : :
31 [ - + ]: 142191 : Assert(buf->data[buf->len - 1] != ' ');
32 : :
4931 alvherre@alvh.no-ip. 33 [ - + ]: 142191 : if (infobits & XLHL_XMAX_IS_MULTI)
1201 pg@bowt.ie 34 :UBC 0 : appendStringInfoString(buf, "IS_MULTI, ");
4931 alvherre@alvh.no-ip. 35 [ + + ]:CBC 142191 : if (infobits & XLHL_XMAX_LOCK_ONLY)
1201 pg@bowt.ie 36 : 70410 : appendStringInfoString(buf, "LOCK_ONLY, ");
4931 alvherre@alvh.no-ip. 37 [ + + ]: 142191 : if (infobits & XLHL_XMAX_EXCL_LOCK)
1201 pg@bowt.ie 38 : 70410 : appendStringInfoString(buf, "EXCL_LOCK, ");
4931 alvherre@alvh.no-ip. 39 [ - + ]: 142191 : if (infobits & XLHL_XMAX_KEYSHR_LOCK)
1201 pg@bowt.ie 40 :UBC 0 : appendStringInfoString(buf, "KEYSHR_LOCK, ");
4931 alvherre@alvh.no-ip. 41 [ + + ]:CBC 142191 : if (infobits & XLHL_KEYS_UPDATED)
1201 pg@bowt.ie 42 : 449 : appendStringInfoString(buf, "KEYS_UPDATED, ");
43 : :
44 [ + + ]: 142191 : if (buf->data[buf->len - 1] == ' ')
45 : : {
46 : : /* Truncate-away final unneeded ", " */
47 [ - + ]: 70859 : Assert(buf->data[buf->len - 2] == ',');
48 : 70859 : buf->len -= 2;
49 : 70859 : buf->data[buf->len] = '\0';
50 : : }
51 : :
1026 drowley@postgresql.o 52 : 142191 : appendStringInfoChar(buf, ']');
1201 pg@bowt.ie 53 : 142191 : }
54 : :
55 : : static void
56 : 14 : truncate_flags_desc(StringInfo buf, uint8 flags)
57 : : {
58 : 14 : appendStringInfoString(buf, "flags: [");
59 : :
60 [ - + ]: 14 : if (flags & XLH_TRUNCATE_CASCADE)
1201 pg@bowt.ie 61 :UBC 0 : appendStringInfoString(buf, "CASCADE, ");
1201 pg@bowt.ie 62 [ - + ]:CBC 14 : if (flags & XLH_TRUNCATE_RESTART_SEQS)
1201 pg@bowt.ie 63 :UBC 0 : appendStringInfoString(buf, "RESTART_SEQS, ");
64 : :
1201 pg@bowt.ie 65 [ - + ]:CBC 14 : if (buf->data[buf->len - 1] == ' ')
66 : : {
67 : : /* Truncate-away final unneeded ", " */
1201 pg@bowt.ie 68 [ # # ]:UBC 0 : Assert(buf->data[buf->len - 2] == ',');
69 : 0 : buf->len -= 2;
70 : 0 : buf->data[buf->len] = '\0';
71 : : }
72 : :
1026 drowley@postgresql.o 73 :CBC 14 : appendStringInfoChar(buf, ']');
1205 pg@bowt.ie 74 : 14 : }
75 : :
76 : : static void
77 : 619 : plan_elem_desc(StringInfo buf, void *plan, void *data)
78 : : {
852 heikki.linnakangas@i 79 : 619 : xlhp_freeze_plan *new_plan = (xlhp_freeze_plan *) plan;
1205 pg@bowt.ie 80 : 619 : OffsetNumber **offsets = data;
81 : :
82 : 619 : appendStringInfo(buf, "{ xmax: %u, infomask: %u, infomask2: %u, ntuples: %u",
83 : : new_plan->xmax,
84 : 619 : new_plan->t_infomask, new_plan->t_infomask2,
85 : 619 : new_plan->ntuples);
86 : :
87 : 619 : appendStringInfoString(buf, ", offsets:");
88 : 619 : array_desc(buf, *offsets, sizeof(OffsetNumber), new_plan->ntuples,
89 : : &offset_elem_desc, NULL);
90 : :
91 : 619 : *offsets += new_plan->ntuples;
92 : :
1026 drowley@postgresql.o 93 : 619 : appendStringInfoString(buf, " }");
4931 alvherre@alvh.no-ip. 94 : 619 : }
95 : :
96 : :
97 : : /*
98 : : * Given a MAXALIGNed buffer returned by XLogRecGetBlockData() and pointed to
99 : : * by cursor and any xl_heap_prune flags, deserialize the arrays of
100 : : * OffsetNumbers contained in an XLOG_HEAP2_PRUNE_* record.
101 : : *
102 : : * This is in heapdesc.c so it can be shared between heap2_redo and heap2_desc
103 : : * code, the latter of which is used in frontend (pg_waldump) code.
104 : : */
105 : : void
285 melanieplageman@gmai 106 : 17429 : heap_xlog_deserialize_prune_and_freeze(char *cursor, uint16 flags,
107 : : int *nplans, xlhp_freeze_plan **plans,
108 : : OffsetNumber **frz_offsets,
109 : : int *nredirected, OffsetNumber **redirected,
110 : : int *ndead, OffsetNumber **nowdead,
111 : : int *nunused, OffsetNumber **nowunused)
112 : : {
852 heikki.linnakangas@i 113 [ + + ]: 17429 : if (flags & XLHP_HAS_FREEZE_PLANS)
114 : : {
115 : 2100 : xlhp_freeze_plans *freeze_plans = (xlhp_freeze_plans *) cursor;
116 : :
117 : 2100 : *nplans = freeze_plans->nplans;
118 [ - + ]: 2100 : Assert(*nplans > 0);
119 : 2100 : *plans = freeze_plans->plans;
120 : :
121 : 2100 : cursor += offsetof(xlhp_freeze_plans, plans);
122 : 2100 : cursor += sizeof(xlhp_freeze_plan) * *nplans;
123 : : }
124 : : else
125 : : {
126 : 15329 : *nplans = 0;
127 : 15329 : *plans = NULL;
128 : : }
129 : :
130 [ + + ]: 17429 : if (flags & XLHP_HAS_REDIRECTIONS)
131 : : {
132 : 2524 : xlhp_prune_items *subrecord = (xlhp_prune_items *) cursor;
133 : :
134 : 2524 : *nredirected = subrecord->ntargets;
135 [ - + ]: 2524 : Assert(*nredirected > 0);
136 : 2524 : *redirected = &subrecord->data[0];
137 : :
138 : 2524 : cursor += offsetof(xlhp_prune_items, data);
139 : 2524 : cursor += sizeof(OffsetNumber[2]) * *nredirected;
140 : : }
141 : : else
142 : : {
143 : 14905 : *nredirected = 0;
144 : 14905 : *redirected = NULL;
145 : : }
146 : :
147 [ + + ]: 17429 : if (flags & XLHP_HAS_DEAD_ITEMS)
148 : : {
149 : 8137 : xlhp_prune_items *subrecord = (xlhp_prune_items *) cursor;
150 : :
151 : 8137 : *ndead = subrecord->ntargets;
152 [ - + ]: 8137 : Assert(*ndead > 0);
153 : 8137 : *nowdead = subrecord->data;
154 : :
155 : 8137 : cursor += offsetof(xlhp_prune_items, data);
156 : 8137 : cursor += sizeof(OffsetNumber) * *ndead;
157 : : }
158 : : else
159 : : {
160 : 9292 : *ndead = 0;
161 : 9292 : *nowdead = NULL;
162 : : }
163 : :
164 [ + + ]: 17429 : if (flags & XLHP_HAS_NOW_UNUSED_ITEMS)
165 : : {
166 : 6437 : xlhp_prune_items *subrecord = (xlhp_prune_items *) cursor;
167 : :
168 : 6437 : *nunused = subrecord->ntargets;
169 [ - + ]: 6437 : Assert(*nunused > 0);
170 : 6437 : *nowunused = subrecord->data;
171 : :
172 : 6437 : cursor += offsetof(xlhp_prune_items, data);
173 : 6437 : cursor += sizeof(OffsetNumber) * *nunused;
174 : : }
175 : : else
176 : : {
177 : 10992 : *nunused = 0;
178 : 10992 : *nowunused = NULL;
179 : : }
180 : :
181 : 17429 : *frz_offsets = (OffsetNumber *) cursor;
182 : 17429 : }
183 : :
184 : : void
4265 185 : 347310 : heap_desc(StringInfo buf, XLogReaderState *record)
186 : : {
4424 187 : 347310 : char *rec = XLogRecGetData(record);
4265 188 : 347310 : uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
189 : :
4987 alvherre@alvh.no-ip. 190 : 347310 : info &= XLOG_HEAP_OPMASK;
191 [ + + ]: 347310 : if (info == XLOG_HEAP_INSERT)
192 : : {
193 : 202512 : xl_heap_insert *xlrec = (xl_heap_insert *) rec;
194 : :
1205 pg@bowt.ie 195 : 202512 : appendStringInfo(buf, "off: %u, flags: 0x%02X",
196 : 202512 : xlrec->offnum,
2810 michael@paquier.xyz 197 : 202512 : xlrec->flags);
198 : : }
4987 alvherre@alvh.no-ip. 199 [ + + ]: 144798 : else if (info == XLOG_HEAP_DELETE)
200 : : {
201 : 449 : xl_heap_delete *xlrec = (xl_heap_delete *) rec;
202 : :
1201 pg@bowt.ie 203 : 449 : appendStringInfo(buf, "xmax: %u, off: %u, ",
204 : 449 : xlrec->xmax, xlrec->offnum);
205 : 449 : infobits_desc(buf, xlrec->infobits_set, "infobits");
206 : 449 : appendStringInfo(buf, ", flags: 0x%02X", xlrec->flags);
207 : : }
4987 alvherre@alvh.no-ip. 208 [ + + ]: 144349 : else if (info == XLOG_HEAP_UPDATE)
209 : : {
210 : 70476 : xl_heap_update *xlrec = (xl_heap_update *) rec;
211 : :
1201 pg@bowt.ie 212 : 70476 : appendStringInfo(buf, "old_xmax: %u, old_off: %u, ",
213 : 70476 : xlrec->old_xmax, xlrec->old_offnum);
214 : 70476 : infobits_desc(buf, xlrec->old_infobits_set, "old_infobits");
215 : 70476 : appendStringInfo(buf, ", flags: 0x%02X, new_xmax: %u, new_off: %u",
216 : 70476 : xlrec->flags, xlrec->new_xmax, xlrec->new_offnum);
217 : : }
4987 alvherre@alvh.no-ip. 218 [ + + ]: 73873 : else if (info == XLOG_HEAP_HOT_UPDATE)
219 : : {
220 : 856 : xl_heap_update *xlrec = (xl_heap_update *) rec;
221 : :
1201 pg@bowt.ie 222 : 856 : appendStringInfo(buf, "old_xmax: %u, old_off: %u, ",
223 : 856 : xlrec->old_xmax, xlrec->old_offnum);
224 : 856 : infobits_desc(buf, xlrec->old_infobits_set, "old_infobits");
225 : 856 : appendStringInfo(buf, ", flags: 0x%02X, new_xmax: %u, new_off: %u",
226 : 856 : xlrec->flags, xlrec->new_xmax, xlrec->new_offnum);
227 : : }
3031 peter_e@gmx.net 228 [ + + ]: 73017 : else if (info == XLOG_HEAP_TRUNCATE)
229 : : {
230 : 14 : xl_heap_truncate *xlrec = (xl_heap_truncate *) rec;
231 : :
1201 pg@bowt.ie 232 : 14 : truncate_flags_desc(buf, xlrec->flags);
1205 233 : 14 : appendStringInfo(buf, ", nrelids: %u", xlrec->nrelids);
234 : 14 : appendStringInfoString(buf, ", relids:");
235 : 14 : array_desc(buf, xlrec->relids, sizeof(Oid), xlrec->nrelids,
236 : : &oid_elem_desc, NULL);
237 : : }
4096 andres@anarazel.de 238 [ - + ]: 73003 : else if (info == XLOG_HEAP_CONFIRM)
239 : : {
4096 andres@anarazel.de 240 :UBC 0 : xl_heap_confirm *xlrec = (xl_heap_confirm *) rec;
241 : :
1205 pg@bowt.ie 242 : 0 : appendStringInfo(buf, "off: %u", xlrec->offnum);
243 : : }
4987 alvherre@alvh.no-ip. 244 [ + + ]:CBC 73003 : else if (info == XLOG_HEAP_LOCK)
245 : : {
246 : 70410 : xl_heap_lock *xlrec = (xl_heap_lock *) rec;
247 : :
1201 pg@bowt.ie 248 : 70410 : appendStringInfo(buf, "xmax: %u, off: %u, ",
249 : 70410 : xlrec->xmax, xlrec->offnum);
250 : 70410 : infobits_desc(buf, xlrec->infobits_set, "infobits");
251 : 70410 : appendStringInfo(buf, ", flags: 0x%02X", xlrec->flags);
252 : : }
4987 alvherre@alvh.no-ip. 253 [ + - ]: 2593 : else if (info == XLOG_HEAP_INPLACE)
254 : : {
255 : 2593 : xl_heap_inplace *xlrec = (xl_heap_inplace *) rec;
256 : :
1205 pg@bowt.ie 257 : 2593 : appendStringInfo(buf, "off: %u", xlrec->offnum);
638 noah@leadboat.com 258 : 2593 : standby_desc_invalidations(buf, xlrec->nmsgs, xlrec->msgs,
259 : : xlrec->dbId, xlrec->tsId,
260 : 2593 : xlrec->relcacheInitFileInval);
261 : : }
4987 alvherre@alvh.no-ip. 262 : 347310 : }
263 : :
264 : : void
4265 heikki.linnakangas@i 265 : 12020 : heap2_desc(StringInfo buf, XLogReaderState *record)
266 : : {
4424 267 : 12020 : char *rec = XLogRecGetData(record);
4265 268 : 12020 : uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
269 : :
4987 alvherre@alvh.no-ip. 270 : 12020 : info &= XLOG_HEAP_OPMASK;
852 heikki.linnakangas@i 271 [ + + + + ]: 12020 : if (info == XLOG_HEAP2_PRUNE_ON_ACCESS ||
272 [ + + ]: 9110 : info == XLOG_HEAP2_PRUNE_VACUUM_SCAN ||
273 : : info == XLOG_HEAP2_PRUNE_VACUUM_CLEANUP)
4987 alvherre@alvh.no-ip. 274 : 3395 : {
1936 pg@bowt.ie 275 : 3395 : xl_heap_prune *xlrec = (xl_heap_prune *) rec;
276 : :
852 heikki.linnakangas@i 277 [ + + ]: 3395 : if (xlrec->flags & XLHP_HAS_CONFLICT_HORIZON)
278 : : {
279 : : TransactionId conflict_xid;
280 : :
281 : 2478 : memcpy(&conflict_xid, rec + SizeOfHeapPrune, sizeof(TransactionId));
282 : :
283 : 2478 : appendStringInfo(buf, "snapshotConflictHorizon: %u",
284 : : conflict_xid);
285 : : }
286 : :
287 : 3395 : appendStringInfo(buf, ", isCatalogRel: %c",
288 [ + + ]: 3395 : xlrec->flags & XLHP_IS_CATALOG_REL ? 'T' : 'F');
289 : :
285 melanieplageman@gmai 290 [ + + ]: 3395 : if (xlrec->flags & XLHP_VM_ALL_VISIBLE)
291 : : {
292 : 2548 : uint8 vmflags = VISIBILITYMAP_ALL_VISIBLE;
293 : :
294 [ + + ]: 2548 : if (xlrec->flags & XLHP_VM_ALL_FROZEN)
295 : 1338 : vmflags |= VISIBILITYMAP_ALL_FROZEN;
296 : 2548 : appendStringInfo(buf, ", vm_flags: 0x%02X", vmflags);
297 : : }
298 : :
1193 pg@bowt.ie 299 [ + + ]: 3395 : if (XLogRecHasBlockData(record, 0))
300 : : {
301 : : Size datalen;
302 : : OffsetNumber *redirected;
303 : : OffsetNumber *nowdead;
304 : : OffsetNumber *nowunused;
305 : : int nredirected;
306 : : int nunused;
307 : : int ndead;
308 : : int nplans;
309 : : xlhp_freeze_plan *plans;
310 : : OffsetNumber *frz_offsets;
311 : :
852 heikki.linnakangas@i 312 : 1844 : char *cursor = XLogRecGetBlockData(record, 0, &datalen);
313 : :
314 : 1844 : heap_xlog_deserialize_prune_and_freeze(cursor, xlrec->flags,
315 : : &nplans, &plans, &frz_offsets,
316 : : &nredirected, &redirected,
317 : : &ndead, &nowdead,
318 : : &nunused, &nowunused);
319 : :
320 : 1844 : appendStringInfo(buf, ", nplans: %u, nredirected: %u, ndead: %u, nunused: %u",
321 : : nplans, nredirected, ndead, nunused);
322 : :
323 [ + + ]: 1844 : if (nplans > 0)
324 : : {
325 : 515 : appendStringInfoString(buf, ", plans:");
326 : 515 : array_desc(buf, plans, sizeof(xlhp_freeze_plan), nplans,
327 : : &plan_elem_desc, &frz_offsets);
328 : : }
329 : :
330 [ + + ]: 1844 : if (nredirected > 0)
331 : : {
332 : 320 : appendStringInfoString(buf, ", redirected:");
333 : 320 : array_desc(buf, redirected, sizeof(OffsetNumber) * 2,
334 : : nredirected, &redirect_elem_desc, NULL);
335 : : }
336 : :
337 [ + + ]: 1844 : if (ndead > 0)
338 : : {
339 : 558 : appendStringInfoString(buf, ", dead:");
340 : 558 : array_desc(buf, nowdead, sizeof(OffsetNumber), ndead,
341 : : &offset_elem_desc, NULL);
342 : : }
343 : :
344 [ + + ]: 1844 : if (nunused > 0)
345 : : {
346 : 584 : appendStringInfoString(buf, ", unused:");
347 : 584 : array_desc(buf, nowunused, sizeof(OffsetNumber), nunused,
348 : : &offset_elem_desc, NULL);
349 : : }
350 : : }
351 : : }
4987 alvherre@alvh.no-ip. 352 [ + + ]: 8625 : else if (info == XLOG_HEAP2_MULTI_INSERT)
353 : : {
354 : 4856 : xl_heap_multi_insert *xlrec = (xl_heap_multi_insert *) rec;
1205 pg@bowt.ie 355 : 4856 : bool isinit = (XLogRecGetInfo(record) & XLOG_HEAP_INIT_PAGE) != 0;
356 : :
357 : 4856 : appendStringInfo(buf, "ntuples: %d, flags: 0x%02X", xlrec->ntuples,
2810 michael@paquier.xyz 358 : 4856 : xlrec->flags);
359 : :
289 melanieplageman@gmai 360 [ - + ]: 4856 : if (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET)
289 melanieplageman@gmai 361 :UBC 0 : appendStringInfo(buf, ", vm_flags: 0x%02X",
362 : : VISIBILITYMAP_ALL_VISIBLE |
363 : : VISIBILITYMAP_ALL_FROZEN);
364 : :
1193 pg@bowt.ie 365 [ + + + + ]:CBC 4856 : if (XLogRecHasBlockData(record, 0) && !isinit)
366 : : {
1201 367 : 4654 : appendStringInfoString(buf, ", offsets:");
1205 368 : 4654 : array_desc(buf, xlrec->offsets, sizeof(OffsetNumber),
369 : 4654 : xlrec->ntuples, &offset_elem_desc, NULL);
370 : : }
371 : : }
4931 alvherre@alvh.no-ip. 372 [ - + ]: 3769 : else if (info == XLOG_HEAP2_LOCK_UPDATED)
373 : : {
4931 alvherre@alvh.no-ip. 374 :UBC 0 : xl_heap_lock_updated *xlrec = (xl_heap_lock_updated *) rec;
375 : :
1201 pg@bowt.ie 376 : 0 : appendStringInfo(buf, "xmax: %u, off: %u, ",
377 : 0 : xlrec->xmax, xlrec->offnum);
378 : 0 : infobits_desc(buf, xlrec->infobits_set, "infobits");
379 : 0 : appendStringInfo(buf, ", flags: 0x%02X", xlrec->flags);
380 : : }
4610 rhaas@postgresql.org 381 [ + - ]:CBC 3769 : else if (info == XLOG_HEAP2_NEW_CID)
382 : : {
383 : 3769 : xl_heap_new_cid *xlrec = (xl_heap_new_cid *) rec;
384 : :
1205 pg@bowt.ie 385 : 3769 : appendStringInfo(buf, "rel: %u/%u/%u, tid: %u/%u",
386 : : xlrec->target_locator.spcOid,
387 : : xlrec->target_locator.dbOid,
388 : : xlrec->target_locator.relNumber,
4265 heikki.linnakangas@i 389 : 3769 : ItemPointerGetBlockNumber(&(xlrec->target_tid)),
390 : 3769 : ItemPointerGetOffsetNumber(&(xlrec->target_tid)));
1205 pg@bowt.ie 391 : 3769 : appendStringInfo(buf, ", cmin: %u, cmax: %u, combo: %u",
392 : : xlrec->cmin, xlrec->cmax, xlrec->combocid);
393 : : }
4327 andres@anarazel.de 394 : 12020 : }
395 : :
396 : : const char *
397 : 347337 : heap_identify(uint8 info)
398 : : {
399 : 347337 : const char *id = NULL;
400 : :
4324 401 [ + + + + : 347337 : switch (info & ~XLR_INFO_MASK)
+ + - + -
+ + - ]
402 : : {
4327 403 : 198799 : case XLOG_HEAP_INSERT:
404 : 198799 : id = "INSERT";
405 : 198799 : break;
4324 406 : 3719 : case XLOG_HEAP_INSERT | XLOG_HEAP_INIT_PAGE:
407 : 3719 : id = "INSERT+INIT";
408 : 3719 : break;
4327 409 : 452 : case XLOG_HEAP_DELETE:
410 : 452 : id = "DELETE";
411 : 452 : break;
412 : 70017 : case XLOG_HEAP_UPDATE:
413 : 70017 : id = "UPDATE";
414 : 70017 : break;
4324 415 : 465 : case XLOG_HEAP_UPDATE | XLOG_HEAP_INIT_PAGE:
416 : 465 : id = "UPDATE+INIT";
417 : 465 : break;
4327 418 : 859 : case XLOG_HEAP_HOT_UPDATE:
419 : 859 : id = "HOT_UPDATE";
420 : 859 : break;
4324 andres@anarazel.de 421 :UBC 0 : case XLOG_HEAP_HOT_UPDATE | XLOG_HEAP_INIT_PAGE:
422 : 0 : id = "HOT_UPDATE+INIT";
423 : 0 : break;
3031 peter_e@gmx.net 424 :CBC 17 : case XLOG_HEAP_TRUNCATE:
425 : 17 : id = "TRUNCATE";
426 : 17 : break;
4096 andres@anarazel.de 427 :UBC 0 : case XLOG_HEAP_CONFIRM:
428 : 0 : id = "HEAP_CONFIRM";
429 : 0 : break;
4327 andres@anarazel.de 430 :CBC 70413 : case XLOG_HEAP_LOCK:
431 : 70413 : id = "LOCK";
432 : 70413 : break;
433 : 2596 : case XLOG_HEAP_INPLACE:
434 : 2596 : id = "INPLACE";
435 : 2596 : break;
436 : : }
437 : :
438 : 347337 : return id;
439 : : }
440 : :
441 : : const char *
442 : 12038 : heap2_identify(uint8 info)
443 : : {
444 : 12038 : const char *id = NULL;
445 : :
4324 446 [ + + + + : 12038 : switch (info & ~XLR_INFO_MASK)
+ - + -
- ]
447 : : {
852 heikki.linnakangas@i 448 : 473 : case XLOG_HEAP2_PRUNE_ON_ACCESS:
449 : 473 : id = "PRUNE_ON_ACCESS";
1936 pg@bowt.ie 450 : 473 : break;
852 heikki.linnakangas@i 451 : 2443 : case XLOG_HEAP2_PRUNE_VACUUM_SCAN:
452 : 2443 : id = "PRUNE_VACUUM_SCAN";
4327 andres@anarazel.de 453 : 2443 : break;
852 heikki.linnakangas@i 454 : 488 : case XLOG_HEAP2_PRUNE_VACUUM_CLEANUP:
455 : 488 : id = "PRUNE_VACUUM_CLEANUP";
4327 andres@anarazel.de 456 : 488 : break;
457 : 4731 : case XLOG_HEAP2_MULTI_INSERT:
458 : 4731 : id = "MULTI_INSERT";
459 : 4731 : break;
4324 460 : 131 : case XLOG_HEAP2_MULTI_INSERT | XLOG_HEAP_INIT_PAGE:
461 : 131 : id = "MULTI_INSERT+INIT";
462 : 131 : break;
4327 andres@anarazel.de 463 :UBC 0 : case XLOG_HEAP2_LOCK_UPDATED:
464 : 0 : id = "LOCK_UPDATED";
465 : 0 : break;
4327 andres@anarazel.de 466 :CBC 3772 : case XLOG_HEAP2_NEW_CID:
467 : 3772 : id = "NEW_CID";
468 : 3772 : break;
4327 andres@anarazel.de 469 :UBC 0 : case XLOG_HEAP2_REWRITE:
470 : 0 : id = "REWRITE";
471 : 0 : break;
472 : : }
473 : :
4327 andres@anarazel.de 474 :CBC 12038 : return id;
475 : : }
|