Re: Distributed Table Partitioning

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Distributed Table Partitioning
Date: 2016-03-13 22:15:58
Message-ID: CANu8FiyvcNcNtyAd03foDQRP3cvjbO_4Hg9bv0Tg9dRDR6MJ=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I guess that would work if you used a view to combine both tables, but you
would still need a BEFORE trigger to make sure DML goes to the appropriate
table.
Another solution might be to use dblink if you need to access the SATA
table on the 2nd VPS,

On Sun, Mar 13, 2016 at 11:37 AM, Leonardo M. Ramé <l(dot)rame(at)griensu(dot)com>
wrote:

> El 13/03/16 a las 10:04, Peter J. Holzer escribió:
>
>> On 2016-03-12 21:19:11 -0500, Melvin Davidson wrote:
>>
>>> ----- Original Message -----
>>> From: "Leonardo M. Ramé" <l(dot)rame(at)griensu(dot)com>
>>> To: "PostgreSql-general" <pgsql-general(at)postgresql(dot)org>
>>> Sent: Saturday, 12 March, 2016 8:25:01 PM
>>> Subject: [GENERAL] Distributed Table Partitioning
>>>
>>> I have this problem: a Master table containing records with a
>>> timestamp
>>> column registering creation date-time, and one Detail table
>>> containing
>>> info related to the Master table.
>>>
>>> As time went by, those tables grew enormously, and I can't afford
>>> expanding my SSD VPS. So I'm thinking about storing only NEW data
>>> into
>>> it, and move OLD data to a cheaper SATA VPS.
>>>
>> [...]
>>
>>> Why don't you just make use of tablespaces and partition the child
>>> tablespaces
>>> so that the newer parttion is on the SSD and the older one is on SATA?
>>>
>>
>> Since he mentioned virtual private servers (VPS) the reason might be
>> that his hoster offers VPS with SSDs (of various sizes) and VPS with
>> rotating hard disks (of various sizes), but not VPS with both. So he
>> can't rent a VPS with a relatively small SSD and a larger hard disk.
>>
>> That might be a reason to look for an alternate hoster, but if he's
>> otherwise happy, switching to an unknown provider might be considered
>> too large a risk.
>>
>> hp
>>
>>
> Yes, Peter is right, I must store one table in one VPS and the other in a
> 2nd VPS.
>
> I'm thinking of partitioning the table, on local and the remote using a
> Foreign Data Wrapper, what do you think about this approach?.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tanzer 2016-03-13 23:16:21 Suppress decimal point like digits in to_char?
Previous Message Geoff Winkless 2016-03-13 18:39:41 Re: index problems (again)