PostgreSQL Source Code  git master
toasting.c File Reference
#include "postgres.h"
#include "access/heapam.h"
#include "access/toast_compression.h"
#include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/heap.h"
#include "catalog/index.h"
#include "catalog/namespace.h"
#include "catalog/pg_am.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_opclass.h"
#include "catalog/toasting.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "utils/fmgroids.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Include dependency graph for toasting.c:

Go to the source code of this file.

Functions

static void CheckAndCreateToastTable (Oid relOid, Datum reloptions, LOCKMODE lockmode, bool check, Oid OIDOldToast)
 
static bool create_toast_table (Relation rel, Oid toastOid, Oid toastIndexOid, Datum reloptions, LOCKMODE lockmode, bool check, Oid OIDOldToast)
 
static bool needs_toast_table (Relation rel)
 
void AlterTableCreateToastTable (Oid relOid, Datum reloptions, LOCKMODE lockmode)
 
void NewHeapCreateToastTable (Oid relOid, Datum reloptions, LOCKMODE lockmode, Oid OIDOldToast)
 
void NewRelationCreateToastTable (Oid relOid, Datum reloptions)
 
void BootstrapToastTable (char *relName, Oid toastOid, Oid toastIndexOid)
 

Function Documentation

◆ AlterTableCreateToastTable()

void AlterTableCreateToastTable ( Oid  relOid,
Datum  reloptions,
LOCKMODE  lockmode 
)

Definition at line 58 of file toasting.c.

59 {
60  CheckAndCreateToastTable(relOid, reloptions, lockmode, true, InvalidOid);
61 }
#define InvalidOid
Definition: postgres_ext.h:36
static void CheckAndCreateToastTable(Oid relOid, Datum reloptions, LOCKMODE lockmode, bool check, Oid OIDOldToast)
Definition: toasting.c:78

References CheckAndCreateToastTable(), and InvalidOid.

Referenced by ATRewriteCatalogs().

◆ BootstrapToastTable()

void BootstrapToastTable ( char *  relName,
Oid  toastOid,
Oid  toastIndexOid 
)

Definition at line 98 of file toasting.c.

99 {
100  Relation rel;
101 
102  rel = table_openrv(makeRangeVar(NULL, relName, -1), AccessExclusiveLock);
103 
104  if (rel->rd_rel->relkind != RELKIND_RELATION &&
105  rel->rd_rel->relkind != RELKIND_MATVIEW)
106  elog(ERROR, "\"%s\" is not a table or materialized view",
107  relName);
108 
109  /* create_toast_table does all the work */
110  if (!create_toast_table(rel, toastOid, toastIndexOid, (Datum) 0,
112  elog(ERROR, "\"%s\" does not require a toast table",
113  relName);
114 
115  table_close(rel, NoLock);
116 }
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:225
#define NoLock
Definition: lockdefs.h:34
#define AccessExclusiveLock
Definition: lockdefs.h:43
RangeVar * makeRangeVar(char *schemaname, char *relname, int location)
Definition: makefuncs.c:424
uintptr_t Datum
Definition: postgres.h:64
Form_pg_class rd_rel
Definition: rel.h:111
void table_close(Relation relation, LOCKMODE lockmode)
Definition: table.c:126
Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode)
Definition: table.c:83
static bool create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid, Datum reloptions, LOCKMODE lockmode, bool check, Oid OIDOldToast)
Definition: toasting.c:127

References AccessExclusiveLock, create_toast_table(), elog, ERROR, InvalidOid, makeRangeVar(), NoLock, RelationData::rd_rel, table_close(), and table_openrv().

◆ CheckAndCreateToastTable()

static void CheckAndCreateToastTable ( Oid  relOid,
Datum  reloptions,
LOCKMODE  lockmode,
bool  check,
Oid  OIDOldToast 
)
static

Definition at line 78 of file toasting.c.

80 {
81  Relation rel;
82 
83  rel = table_open(relOid, lockmode);
84 
85  /* create_toast_table does all the work */
86  (void) create_toast_table(rel, InvalidOid, InvalidOid, reloptions, lockmode,
87  check, OIDOldToast);
88 
89  table_close(rel, NoLock);
90 }
Relation table_open(Oid relationId, LOCKMODE lockmode)
Definition: table.c:40

References create_toast_table(), InvalidOid, NoLock, table_close(), and table_open().

Referenced by AlterTableCreateToastTable(), NewHeapCreateToastTable(), and NewRelationCreateToastTable().

◆ create_toast_table()

static bool create_toast_table ( Relation  rel,
Oid  toastOid,
Oid  toastIndexOid,
Datum  reloptions,
LOCKMODE  lockmode,
bool  check,
Oid  OIDOldToast 
)
static

Definition at line 127 of file toasting.c.

130 {
131  Oid relOid = RelationGetRelid(rel);
132  HeapTuple reltup;
133  TupleDesc tupdesc;
134  bool shared_relation;
135  bool mapped_relation;
136  Relation toast_rel;
137  Relation class_rel;
138  Oid toast_relid;
139  Oid namespaceid;
140  char toast_relname[NAMEDATALEN];
141  char toast_idxname[NAMEDATALEN];
142  IndexInfo *indexInfo;
143  Oid collationIds[2];
144  Oid opclassIds[2];
145  int16 coloptions[2];
146  ObjectAddress baseobject,
147  toastobject;
148 
149  /*
150  * Is it already toasted?
151  */
152  if (rel->rd_rel->reltoastrelid != InvalidOid)
153  return false;
154 
155  /*
156  * Check to see whether the table actually needs a TOAST table.
157  */
158  if (!IsBinaryUpgrade)
159  {
160  /* Normal mode, normal check */
161  if (!needs_toast_table(rel))
162  return false;
163  }
164  else
165  {
166  /*
167  * In binary-upgrade mode, create a TOAST table if and only if
168  * pg_upgrade told us to (ie, a TOAST table OID has been provided).
169  *
170  * This indicates that the old cluster had a TOAST table for the
171  * current table. We must create a TOAST table to receive the old
172  * TOAST file, even if the table seems not to need one.
173  *
174  * Contrariwise, if the old cluster did not have a TOAST table, we
175  * should be able to get along without one even if the new version's
176  * needs_toast_table rules suggest we should have one. There is a lot
177  * of daylight between where we will create a TOAST table and where
178  * one is really necessary to avoid failures, so small cross-version
179  * differences in the when-to-create heuristic shouldn't be a problem.
180  * If we tried to create a TOAST table anyway, we would have the
181  * problem that it might take up an OID that will conflict with some
182  * old-cluster table we haven't seen yet.
183  */
185  return false;
186  }
187 
188  /*
189  * If requested check lockmode is sufficient. This is a cross check in
190  * case of errors or conflicting decisions in earlier code.
191  */
192  if (check && lockmode != AccessExclusiveLock)
193  elog(ERROR, "AccessExclusiveLock required to add toast table.");
194 
195  /*
196  * Create the toast table and its index
197  */
198  snprintf(toast_relname, sizeof(toast_relname),
199  "pg_toast_%u", relOid);
200  snprintf(toast_idxname, sizeof(toast_idxname),
201  "pg_toast_%u_index", relOid);
202 
203  /* this is pretty painful... need a tuple descriptor */
204  tupdesc = CreateTemplateTupleDesc(3);
205  TupleDescInitEntry(tupdesc, (AttrNumber) 1,
206  "chunk_id",
207  OIDOID,
208  -1, 0);
209  TupleDescInitEntry(tupdesc, (AttrNumber) 2,
210  "chunk_seq",
211  INT4OID,
212  -1, 0);
213  TupleDescInitEntry(tupdesc, (AttrNumber) 3,
214  "chunk_data",
215  BYTEAOID,
216  -1, 0);
217 
218  /*
219  * Ensure that the toast table doesn't itself get toasted, or we'll be
220  * toast :-(. This is essential for chunk_data because type bytea is
221  * toastable; hit the other two just to be sure.
222  */
223  TupleDescAttr(tupdesc, 0)->attstorage = TYPSTORAGE_PLAIN;
224  TupleDescAttr(tupdesc, 1)->attstorage = TYPSTORAGE_PLAIN;
225  TupleDescAttr(tupdesc, 2)->attstorage = TYPSTORAGE_PLAIN;
226 
227  /* Toast field should not be compressed */
228  TupleDescAttr(tupdesc, 0)->attcompression = InvalidCompressionMethod;
229  TupleDescAttr(tupdesc, 1)->attcompression = InvalidCompressionMethod;
230  TupleDescAttr(tupdesc, 2)->attcompression = InvalidCompressionMethod;
231 
232  /*
233  * Toast tables for regular relations go in pg_toast; those for temp
234  * relations go into the per-backend temp-toast-table namespace.
235  */
236  if (isTempOrTempToastNamespace(rel->rd_rel->relnamespace))
237  namespaceid = GetTempToastNamespace();
238  else
239  namespaceid = PG_TOAST_NAMESPACE;
240 
241  /* Toast table is shared if and only if its parent is. */
242  shared_relation = rel->rd_rel->relisshared;
243 
244  /* It's mapped if and only if its parent is, too */
245  mapped_relation = RelationIsMapped(rel);
246 
247  toast_relid = heap_create_with_catalog(toast_relname,
248  namespaceid,
249  rel->rd_rel->reltablespace,
250  toastOid,
251  InvalidOid,
252  InvalidOid,
253  rel->rd_rel->relowner,
255  tupdesc,
256  NIL,
257  RELKIND_TOASTVALUE,
258  rel->rd_rel->relpersistence,
259  shared_relation,
260  mapped_relation,
262  reloptions,
263  false,
264  true,
265  true,
266  OIDOldToast,
267  NULL);
268  Assert(toast_relid != InvalidOid);
269 
270  /* make the toast relation visible, else table_open will fail */
272 
273  /* ShareLock is not really needed here, but take it anyway */
274  toast_rel = table_open(toast_relid, ShareLock);
275 
276  /*
277  * Create unique index on chunk_id, chunk_seq.
278  *
279  * NOTE: the normal TOAST access routines could actually function with a
280  * single-column index on chunk_id only. However, the slice access
281  * routines use both columns for faster access to an individual chunk. In
282  * addition, we want it to be unique as a check against the possibility of
283  * duplicate TOAST chunk OIDs. The index might also be a little more
284  * efficient this way, since btree isn't all that happy with large numbers
285  * of equal keys.
286  */
287 
288  indexInfo = makeNode(IndexInfo);
289  indexInfo->ii_NumIndexAttrs = 2;
290  indexInfo->ii_NumIndexKeyAttrs = 2;
291  indexInfo->ii_IndexAttrNumbers[0] = 1;
292  indexInfo->ii_IndexAttrNumbers[1] = 2;
293  indexInfo->ii_Expressions = NIL;
294  indexInfo->ii_ExpressionsState = NIL;
295  indexInfo->ii_Predicate = NIL;
296  indexInfo->ii_PredicateState = NULL;
297  indexInfo->ii_ExclusionOps = NULL;
298  indexInfo->ii_ExclusionProcs = NULL;
299  indexInfo->ii_ExclusionStrats = NULL;
300  indexInfo->ii_Unique = true;
301  indexInfo->ii_NullsNotDistinct = false;
302  indexInfo->ii_ReadyForInserts = true;
303  indexInfo->ii_CheckedUnchanged = false;
304  indexInfo->ii_IndexUnchanged = false;
305  indexInfo->ii_Concurrent = false;
306  indexInfo->ii_BrokenHotChain = false;
307  indexInfo->ii_ParallelWorkers = 0;
308  indexInfo->ii_Am = BTREE_AM_OID;
309  indexInfo->ii_AmCache = NULL;
310  indexInfo->ii_Context = CurrentMemoryContext;
311 
312  collationIds[0] = InvalidOid;
313  collationIds[1] = InvalidOid;
314 
315  opclassIds[0] = OID_BTREE_OPS_OID;
316  opclassIds[1] = INT4_BTREE_OPS_OID;
317 
318  coloptions[0] = 0;
319  coloptions[1] = 0;
320 
321  index_create(toast_rel, toast_idxname, toastIndexOid, InvalidOid,
323  indexInfo,
324  list_make2("chunk_id", "chunk_seq"),
325  BTREE_AM_OID,
326  rel->rd_rel->reltablespace,
327  collationIds, opclassIds, NULL, coloptions, NULL, (Datum) 0,
328  INDEX_CREATE_IS_PRIMARY, 0, true, true, NULL);
329 
330  table_close(toast_rel, NoLock);
331 
332  /*
333  * Store the toast table's OID in the parent relation's pg_class row
334  */
335  class_rel = table_open(RelationRelationId, RowExclusiveLock);
336 
338  {
339  /* normal case, use a transactional update */
340  reltup = SearchSysCacheCopy1(RELOID, ObjectIdGetDatum(relOid));
341  if (!HeapTupleIsValid(reltup))
342  elog(ERROR, "cache lookup failed for relation %u", relOid);
343 
344  ((Form_pg_class) GETSTRUCT(reltup))->reltoastrelid = toast_relid;
345 
346  CatalogTupleUpdate(class_rel, &reltup->t_self, reltup);
347  }
348  else
349  {
350  /* While bootstrapping, we cannot UPDATE, so overwrite in-place */
351 
352  ScanKeyData key[1];
353  void *state;
354 
355  ScanKeyInit(&key[0],
356  Anum_pg_class_oid,
357  BTEqualStrategyNumber, F_OIDEQ,
358  ObjectIdGetDatum(relOid));
359  systable_inplace_update_begin(class_rel, ClassOidIndexId, true,
360  NULL, 1, key, &reltup, &state);
361  if (!HeapTupleIsValid(reltup))
362  elog(ERROR, "cache lookup failed for relation %u", relOid);
363 
364  ((Form_pg_class) GETSTRUCT(reltup))->reltoastrelid = toast_relid;
365 
367  }
368 
369  heap_freetuple(reltup);
370 
371  table_close(class_rel, RowExclusiveLock);
372 
373  /*
374  * Register dependency from the toast table to the main, so that the toast
375  * table will be deleted if the main is. Skip this in bootstrap mode.
376  */
378  {
379  baseobject.classId = RelationRelationId;
380  baseobject.objectId = relOid;
381  baseobject.objectSubId = 0;
382  toastobject.classId = RelationRelationId;
383  toastobject.objectId = toast_relid;
384  toastobject.objectSubId = 0;
385 
386  recordDependencyOn(&toastobject, &baseobject, DEPENDENCY_INTERNAL);
387  }
388 
389  /*
390  * Make changes visible
391  */
393 
394  return true;
395 }
int16 AttrNumber
Definition: attnum.h:21
#define Assert(condition)
Definition: c.h:812
int16_t int16
Definition: c.h:480
#define OidIsValid(objectId)
Definition: c.h:729
@ DEPENDENCY_INTERNAL
Definition: dependency.h:35
void systable_inplace_update_begin(Relation relation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, const ScanKeyData *key, HeapTuple *oldtupcopy, void **state)
Definition: genam.c:810
void systable_inplace_update_finish(void *state, HeapTuple tuple)
Definition: genam.c:886
bool IsBinaryUpgrade
Definition: globals.c:120
Oid heap_create_with_catalog(const char *relname, Oid relnamespace, Oid reltablespace, Oid relid, Oid reltypeid, Oid reloftypeid, Oid ownerid, Oid accessmtd, TupleDesc tupdesc, List *cooked_constraints, char relkind, char relpersistence, bool shared_relation, bool mapped_relation, OnCommitAction oncommit, Datum reloptions, bool use_user_acl, bool allow_system_table_mods, bool is_internal, Oid relrewrite, ObjectAddress *typaddress)
Definition: heap.c:1105
Oid binary_upgrade_next_toast_pg_class_oid
Definition: heap.c:81
void heap_freetuple(HeapTuple htup)
Definition: heaptuple.c:1434
#define HeapTupleIsValid(tuple)
Definition: htup.h:78
#define GETSTRUCT(TUP)
Definition: htup_details.h:653
Oid index_create(Relation heapRelation, const char *indexRelationName, Oid indexRelationId, Oid parentIndexRelid, Oid parentConstraintId, RelFileNumber relFileNumber, IndexInfo *indexInfo, const List *indexColNames, Oid accessMethodId, Oid tableSpaceId, const Oid *collationIds, const Oid *opclassIds, const Datum *opclassOptions, const int16 *coloptions, const NullableDatum *stattargets, Datum reloptions, bits16 flags, bits16 constr_flags, bool allow_system_table_mods, bool is_internal, Oid *constraintId)
Definition: index.c:724
#define INDEX_CREATE_IS_PRIMARY
Definition: index.h:61
void CatalogTupleUpdate(Relation heapRel, ItemPointer otid, HeapTuple tup)
Definition: indexing.c:313
#define ShareLock
Definition: lockdefs.h:40
#define RowExclusiveLock
Definition: lockdefs.h:38
MemoryContext CurrentMemoryContext
Definition: mcxt.c:143
#define IsBootstrapProcessingMode()
Definition: miscadmin.h:454
bool isTempOrTempToastNamespace(Oid namespaceId)
Definition: namespace.c:3673
Oid GetTempToastNamespace(void)
Definition: namespace.c:3791
#define makeNode(_type_)
Definition: nodes.h:155
FormData_pg_class * Form_pg_class
Definition: pg_class.h:153
#define NAMEDATALEN
void recordDependencyOn(const ObjectAddress *depender, const ObjectAddress *referenced, DependencyType behavior)
Definition: pg_depend.c:45
#define NIL
Definition: pg_list.h:68
#define list_make2(x1, x2)
Definition: pg_list.h:214
#define snprintf
Definition: port.h:238
static Datum ObjectIdGetDatum(Oid X)
Definition: postgres.h:252
unsigned int Oid
Definition: postgres_ext.h:31
@ ONCOMMIT_NOOP
Definition: primnodes.h:57
#define RelationGetRelid(relation)
Definition: rel.h:505
#define RelationIsMapped(relation)
Definition: rel.h:554
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
Definition: scankey.c:76
#define BTEqualStrategyNumber
Definition: stratnum.h:31
ItemPointerData t_self
Definition: htup.h:65
bool ii_Unique
Definition: execnodes.h:199
uint16 * ii_ExclusionStrats
Definition: execnodes.h:195
bool ii_BrokenHotChain
Definition: execnodes.h:205
int ii_NumIndexAttrs
Definition: execnodes.h:186
void * ii_AmCache
Definition: execnodes.h:210
bool ii_CheckedUnchanged
Definition: execnodes.h:202
ExprState * ii_PredicateState
Definition: execnodes.h:192
Oid * ii_ExclusionOps
Definition: execnodes.h:193
bool ii_NullsNotDistinct
Definition: execnodes.h:200
int ii_ParallelWorkers
Definition: execnodes.h:208
bool ii_Concurrent
Definition: execnodes.h:204
int ii_NumIndexKeyAttrs
Definition: execnodes.h:187
List * ii_ExpressionsState
Definition: execnodes.h:190
List * ii_Expressions
Definition: execnodes.h:189
bool ii_IndexUnchanged
Definition: execnodes.h:203
Oid * ii_ExclusionProcs
Definition: execnodes.h:194
Oid ii_Am
Definition: execnodes.h:209
AttrNumber ii_IndexAttrNumbers[INDEX_MAX_KEYS]
Definition: execnodes.h:188
MemoryContext ii_Context
Definition: execnodes.h:211
bool ii_ReadyForInserts
Definition: execnodes.h:201
List * ii_Predicate
Definition: execnodes.h:191
Definition: regguts.h:323
#define SearchSysCacheCopy1(cacheId, key1)
Definition: syscache.h:91
static Oid table_relation_toast_am(Relation rel)
Definition: tableam.h:1896
#define InvalidCompressionMethod
static bool needs_toast_table(Relation rel)
Definition: toasting.c:401
TupleDesc CreateTemplateTupleDesc(int natts)
Definition: tupdesc.c:67
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
Definition: tupdesc.c:651
#define TupleDescAttr(tupdesc, i)
Definition: tupdesc.h:92
void CommandCounterIncrement(void)
Definition: xact.c:1099

References AccessExclusiveLock, Assert, binary_upgrade_next_toast_pg_class_oid, BTEqualStrategyNumber, CatalogTupleUpdate(), ObjectAddress::classId, CommandCounterIncrement(), CreateTemplateTupleDesc(), CurrentMemoryContext, DEPENDENCY_INTERNAL, elog, ERROR, GETSTRUCT, GetTempToastNamespace(), heap_create_with_catalog(), heap_freetuple(), HeapTupleIsValid, IndexInfo::ii_Am, IndexInfo::ii_AmCache, IndexInfo::ii_BrokenHotChain, IndexInfo::ii_CheckedUnchanged, IndexInfo::ii_Concurrent, IndexInfo::ii_Context, IndexInfo::ii_ExclusionOps, IndexInfo::ii_ExclusionProcs, IndexInfo::ii_ExclusionStrats, IndexInfo::ii_Expressions, IndexInfo::ii_ExpressionsState, IndexInfo::ii_IndexAttrNumbers, IndexInfo::ii_IndexUnchanged, IndexInfo::ii_NullsNotDistinct, IndexInfo::ii_NumIndexAttrs, IndexInfo::ii_NumIndexKeyAttrs, IndexInfo::ii_ParallelWorkers, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Unique, index_create(), INDEX_CREATE_IS_PRIMARY, InvalidCompressionMethod, InvalidOid, IsBinaryUpgrade, IsBootstrapProcessingMode, isTempOrTempToastNamespace(), sort-test::key, list_make2, makeNode, NAMEDATALEN, needs_toast_table(), NIL, NoLock, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, OidIsValid, ONCOMMIT_NOOP, RelationData::rd_rel, recordDependencyOn(), RelationGetRelid, RelationIsMapped, RowExclusiveLock, ScanKeyInit(), SearchSysCacheCopy1, ShareLock, snprintf, systable_inplace_update_begin(), systable_inplace_update_finish(), HeapTupleData::t_self, table_close(), table_open(), table_relation_toast_am(), TupleDescAttr, and TupleDescInitEntry().

Referenced by BootstrapToastTable(), and CheckAndCreateToastTable().

◆ needs_toast_table()

static bool needs_toast_table ( Relation  rel)
static

Definition at line 401 of file toasting.c.

402 {
403  /*
404  * No need to create a TOAST table for partitioned tables.
405  */
406  if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
407  return false;
408 
409  /*
410  * We cannot allow toasting a shared relation after initdb (because
411  * there's no way to mark it toasted in other databases' pg_class).
412  */
413  if (rel->rd_rel->relisshared && !IsBootstrapProcessingMode())
414  return false;
415 
416  /*
417  * Ignore attempts to create toast tables on catalog tables after initdb.
418  * Which catalogs get toast tables is explicitly chosen in catalog/pg_*.h.
419  * (We could get here via some ALTER TABLE command if the catalog doesn't
420  * have a toast table.)
421  */
423  return false;
424 
425  /* Otherwise, let the AM decide. */
427 }
bool IsCatalogRelation(Relation relation)
Definition: catalog.c:103
static bool table_relation_needs_toast_table(Relation rel)
Definition: tableam.h:1886

References IsBootstrapProcessingMode, IsCatalogRelation(), RelationData::rd_rel, and table_relation_needs_toast_table().

Referenced by create_toast_table().

◆ NewHeapCreateToastTable()

void NewHeapCreateToastTable ( Oid  relOid,
Datum  reloptions,
LOCKMODE  lockmode,
Oid  OIDOldToast 
)

Definition at line 64 of file toasting.c.

66 {
67  CheckAndCreateToastTable(relOid, reloptions, lockmode, false, OIDOldToast);
68 }

References CheckAndCreateToastTable().

Referenced by make_new_heap().

◆ NewRelationCreateToastTable()

void NewRelationCreateToastTable ( Oid  relOid,
Datum  reloptions 
)

Definition at line 71 of file toasting.c.

72 {
73  CheckAndCreateToastTable(relOid, reloptions, AccessExclusiveLock, false,
74  InvalidOid);
75 }

References AccessExclusiveLock, CheckAndCreateToastTable(), and InvalidOid.

Referenced by create_ctas_internal(), and ProcessUtilitySlow().