you are right. What it happens is that the batch importing process drops the schema and recreates it. I would like some solution that is compatible with that. I am sure partitioned tables will have an impact but on the other hand, it will solve the problem I have now without touching the legacy code.
On Wed, Apr 17, 2019 at 6:41 PM David Rowley <david.row...@2ndquadrant.com> wrote: > On Thu, 18 Apr 2019 at 10:56, Alvaro Herrera <alvhe...@2ndquadrant.com> > wrote: > > > > Note that unless you regularly query for only-manually-inserted or > > only-automatically-inserted data, this will be useless and will make > > queries more expensive, with no upside. > > Going by "Since those rows are inserted by hand, they will be lost > when the table will be reimported.", I just imagined there must be > some sort of TRUNCATE + INSERT/COPY operation going on, in which case > there would be a good upside of not having to perform a DELETE of all > automatic records instead of the TRUNCATE. > > I could be wrong to assume that though. > > -- > David Rowley http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services >