<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="font-family:-apple-system, Calibri , HelveticaNeue , sans-serif;">
<div dir="auto">
<div dir="auto">
<div id="signature-div-B95D2988-9DF3-4E51-AEF4-3D672DB60076" dir="auto"><br>
<br>
</div>
<div id="122C45FC-10C3-43BF-9CFC-1D25D1DBD2BE" spellcheck="true" autocorrect="true" autosuggest="true" dir="auto">
<hr>
<div style="font-family:-apple-system,Calibri,HelveticaNeue,sans-serif;" dir="auto">
<br>
<b>Fra:</b> Michael Lewis <mlewis(at)entrata(dot)com><br>
<b>Dato:</b> 15. januar 2021 kl. 19.49.32 CET<br>
<b>Til:</b> Niels Jespersen <NJN(at)dst(dot)dk><br>
<b>Cc:</b> pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org><br>
<b>Emne:</b> Re: time-based range partitioning and truncate/delete different timezones<br>
</div>
<br>
<br>
<div dir="ltr">What version are you using? How long are you keeping data for? It is possible to partition by hour or would that exceed the number of recommended partitions too quickly for your retention time period? Else, I would partition on date according
to the timezone of your data. Selecting from multiple partitions for the aggregate should be performant enough in most cases. The truncate / detach type commands may need to be the priority.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Version 12.1. </div>
<div dir="ltr"><br>
</div>
<div dir="ltr">6. months retention, which would give about 4.400 partitions using hourly partitioning. Maybe partitioning on the same timezone as input data and in something like 6 hour intervals is the way to go. I will think about it, based on your input. </div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thank you for your ideas</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Regards Niels</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>