pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPartitioning & ORM apps
3+ messages / 3 participants
[nested] [flat]
* Partitioning & ORM apps
@ 2017-11-19 02:49 PropAAS DBA <dba@propaas.com>
0 siblings, 2 replies; 3+ messages in thread
From: PropAAS DBA @ 2017-11-19 02:49 UTC (permalink / raw)
To: pgsql-admin
Hi All;
we want to deploy partitioning for historical data archiving &
performance however the app uses an ORM and depends on the number of
rows affected from the inserts, updates & deletes which of course always
come back as zero rows for the partition base or master table.
We talked about letting daily data go into the base table and 'moving'
it nightly but this could still lead to an update/delete for rown in the
child tables, thus the same issue remains.
Anyone know of a workaround? Maybe it can be done with
insert/update/delete trigger functions?
Thanks in advance
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Partitioning & ORM apps
@ 2017-11-19 08:31 Fabrízio de Royes Mello <fabrizio@timbira.com.br>
parent: PropAAS DBA <dba@propaas.com>
1 sibling, 0 replies; 3+ messages in thread
From: Fabrízio de Royes Mello @ 2017-11-19 08:31 UTC (permalink / raw)
To: PropAAS DBA <dba@propaas.com>; +Cc: pgsql-admin
2017-11-19 0:49 GMT-02:00 PropAAS DBA <dba@propaas.com>:
>
> Hi All;
>
>
> we want to deploy partitioning for historical data archiving &
performance however the app uses an ORM and depends on the number of rows
affected from the inserts, updates & deletes which of course always come
back as zero rows for the partition base or master table.
>
> We talked about letting daily data go into the base table and 'moving' it
nightly but this could still lead to an update/delete for rown in the child
tables, thus the same issue remains.
>
>
> Anyone know of a workaround? Maybe it can be done with
insert/update/delete trigger functions?
>
Hi,
Maybe this post [1] can help you.
Regards,
[1]
http://www.technology-ebay.de/the-teams/mobile-de/blog/postgresql-table-partitioning-hibernate.html
--
Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [ADMIN] Partitioning & ORM apps
@ 2017-11-20 17:41 Keith <keith@keithf4.com>
parent: PropAAS DBA <dba@propaas.com>
1 sibling, 0 replies; 3+ messages in thread
From: Keith @ 2017-11-20 17:41 UTC (permalink / raw)
To: PropAAS DBA <dba@propaas.com>; +Cc: pgsql-admin
If this is a requirement for your application, I would highly recommend
looking into migrating to PostgreSQL 10. The native partitioning methods
allow the RETURNING statements to work as you're expecting. There are
work-arounds for it out there for 9.6 and earlier, but for the life of your
project you would likely be better off getting upgraded to 10 now and
starting your development from there.
On Sat, Nov 18, 2017 at 9:49 PM, PropAAS DBA <dba@propaas.com> wrote:
> Hi All;
>
>
> we want to deploy partitioning for historical data archiving & performance
> however the app uses an ORM and depends on the number of rows affected from
> the inserts, updates & deletes which of course always come back as zero
> rows for the partition base or master table.
>
> We talked about letting daily data go into the base table and 'moving' it
> nightly but this could still lead to an update/delete for rown in the child
> tables, thus the same issue remains.
>
>
> Anyone know of a workaround? Maybe it can be done with
> insert/update/delete trigger functions?
>
>
> Thanks in advance
>
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-11-20 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-19 02:49 Partitioning & ORM apps PropAAS DBA <dba@propaas.com>
2017-11-19 08:31 ` Fabrízio de Royes Mello <fabrizio@timbira.com.br>
2017-11-20 17:41 ` Keith <keith@keithf4.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox