mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Support unlogged tables.
The contents of an unlogged table are WAL-logged; thus, they are not available on standby servers and are truncated whenever the database system enters recovery. Indexes on unlogged tables are also unlogged. Unlogged GiST indexes are not currently supported.
This commit is contained in:
2
src/backend/utils/cache/relcache.c
vendored
2
src/backend/utils/cache/relcache.c
vendored
@ -851,6 +851,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
|
||||
relation->rd_newRelfilenodeSubid = InvalidSubTransactionId;
|
||||
switch (relation->rd_rel->relpersistence)
|
||||
{
|
||||
case RELPERSISTENCE_UNLOGGED:
|
||||
case RELPERSISTENCE_PERMANENT:
|
||||
relation->rd_backend = InvalidBackendId;
|
||||
break;
|
||||
@ -2490,6 +2491,7 @@ RelationBuildLocalRelation(const char *relname,
|
||||
rel->rd_rel->relpersistence = relpersistence;
|
||||
switch (relpersistence)
|
||||
{
|
||||
case RELPERSISTENCE_UNLOGGED:
|
||||
case RELPERSISTENCE_PERMANENT:
|
||||
rel->rd_backend = InvalidBackendId;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user