| 483 | } |
| 484 | |
| 485 | static void |
| 486 | swapAppendonlyEntriesUsingTAM(Form_pg_class relform1, Form_pg_class relform2, TransactionId frozenXid, MultiXactId cutoffMulti) |
| 487 | { |
| 488 | /* |
| 489 | * Swap auxiliary tables if the table AM has non-standard structure. |
| 490 | * See the details of the callback swap_relation_files. |
| 491 | */ |
| 492 | if (relform1->relkind == RELKIND_RELATION || |
| 493 | relform1->relkind == RELKIND_MATVIEW) |
| 494 | { |
| 495 | const TableAmRoutine *tam; |
| 496 | Oid relam; |
| 497 | relam = relform1->relam; |
| 498 | if (relam != relform2->relam) |
| 499 | elog(ERROR, "can't swap relation files for different AM"); |
| 500 | tam = GetTableAmRoutineByAmId(relam); |
| 501 | if (tam->swap_relation_files) |
| 502 | tam->swap_relation_files(relform1->oid, relform2->oid, frozenXid, cutoffMulti); |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | /* |
| 507 | * This function acts as a controller of catalog actions that needs to be |
no test coverage detected