mirror of https://github.com/citusdata/citus.git
Address reviews
parent
06dd189c8f
commit
c6705ebbd1
|
@ -198,6 +198,12 @@ InitiateTimeseriesTablePartitions(Oid relationId, bool useStartFrom)
|
||||||
{
|
{
|
||||||
bool readOnly = false;
|
bool readOnly = false;
|
||||||
StringInfo initiateTimeseriesPartitionsCommand = makeStringInfo();
|
StringInfo initiateTimeseriesPartitionsCommand = makeStringInfo();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Since making the right calculation via C is much more complex and
|
||||||
|
* we will call that function once to create timeseries table, we
|
||||||
|
* are using SPI call.
|
||||||
|
*/
|
||||||
if (useStartFrom)
|
if (useStartFrom)
|
||||||
{
|
{
|
||||||
appendStringInfo(initiateTimeseriesPartitionsCommand,
|
appendStringInfo(initiateTimeseriesPartitionsCommand,
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
#define Anum_citus_timeseries_table_compression_threshold 6
|
#define Anum_citus_timeseries_table_compression_threshold 6
|
||||||
#define Anum_citus_timeseries_table_retention_threshold 7
|
#define Anum_citus_timeseries_table_retention_threshold 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Taken from the Postgres code. Postgres' uses that conversion
|
||||||
|
* for internal interval conparison.
|
||||||
|
*/
|
||||||
#define INTERVAL_TO_SEC(ivp) \
|
#define INTERVAL_TO_SEC(ivp) \
|
||||||
(((double) (ivp)->time) / ((double) USECS_PER_SEC) + \
|
(((double) (ivp)->time) / ((double) USECS_PER_SEC) + \
|
||||||
(ivp)->day * (24.0 * SECS_PER_HOUR) + \
|
(ivp)->day * (24.0 * SECS_PER_HOUR) + \
|
||||||
|
|
Loading…
Reference in New Issue