Re: crash with sql language partition support function

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: crash with sql language partition support function
Date: 2018-04-13 18:08:30
Message-ID: 20180413180830.rxi7gpsireq7wuu6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think this is a good improvement. On top of that, I propose a new
file partitioning/partdefs.h with the following approximate contents.
This reduces cross-inclusion of headers to the minimum. I'm dealing
with the fallout from this now, will post a complete patch shortly.

/*-------------------------------------------------------------------------
*
* partdefs.h
* Base definitions for partitioned table handling
*
* Copyright (c) 2007-2018, PostgreSQL Global Development Group
*
* src/include/partitioning/partdefs.h
*
*-------------------------------------------------------------------------
*/
#ifndef PARTDEFS_H
#define PARTDEFS_H

typedef enum PartitionRangeDatumKind
{
PARTITION_RANGE_DATUM_MINVALUE = -1, /* less than any other value */
PARTITION_RANGE_DATUM_VALUE = 0, /* a specific (bounded) value */
PARTITION_RANGE_DATUM_MAXVALUE = 1 /* greater than any other value */
} PartitionRangeDatumKind;

typedef struct PartitionBoundInfoData *PartitionBoundInfo;

typedef struct PartitionKeyData *PartitionKey;

typedef struct PartitionBoundSpec PartitionBoundSpec;

typedef struct PartitionDescData *PartitionDesc;

#endif /* PARTDEFS_H */

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-04-13 18:09:48 Re: Postgres stucks in deadlock detection
Previous Message Garym 2018-04-13 18:02:15 Re: Interesting paper: Contention-Aware Lock Scheduling