aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/rmgrdesc
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2017-04-01 16:10:04 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2017-04-01 16:10:04 -0300
commitc655899ba9ae2a0d24e99c797167c33e0cfa0820 (patch)
tree5493791074d6624cf5ce44313a870846d4563f97 /src/backend/access/rmgrdesc
parent3a82129a40a3a2987356d4051e017fd456876c8d (diff)
downloadpostgresql-c655899ba9ae2a0d24e99c797167c33e0cfa0820.tar.gz
postgresql-c655899ba9ae2a0d24e99c797167c33e0cfa0820.zip
BRIN de-summarization
When the BRIN summary tuple for a page range becomes too "wide" for the values actually stored in the table (because the tuples that were present originally are no longer present due to updates or deletes), it can be useful to remove the outdated summary tuple, so that a future summarization can install a tighter summary. This commit introduces a SQL-callable interface to do so. Author: Álvaro Herrera Reviewed-by: Eiji Seki Discussion: https://postgr.es/m/20170228045643.n2ri74ara4fhhfxf@alvherre.pgsql
Diffstat (limited to 'src/backend/access/rmgrdesc')
-rw-r--r--src/backend/access/rmgrdesc/brindesc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/access/rmgrdesc/brindesc.c b/src/backend/access/rmgrdesc/brindesc.c
index b58cb5bde91..8eb5275a8b4 100644
--- a/src/backend/access/rmgrdesc/brindesc.c
+++ b/src/backend/access/rmgrdesc/brindesc.c
@@ -61,6 +61,13 @@ brin_desc(StringInfo buf, XLogReaderState *record)
appendStringInfo(buf, "targetBlk %u", xlrec->targetBlk);
}
+ else if (info == XLOG_BRIN_DESUMMARIZE)
+ {
+ xl_brin_desummarize *xlrec = (xl_brin_desummarize *) rec;
+
+ appendStringInfo(buf, "pagesPerRange %u, heapBlk %u, page offset %u",
+ xlrec->pagesPerRange, xlrec->heapBlk, xlrec->regOffset);
+ }
}
const char *
@@ -91,6 +98,9 @@ brin_identify(uint8 info)
case XLOG_BRIN_REVMAP_EXTEND:
id = "REVMAP_EXTEND";
break;
+ case XLOG_BRIN_DESUMMARIZE:
+ id = "DESUMMARIZE";
+ break;
}
return id;