Coder Social home page Coder Social logo

Comments (3)

bwtakacy avatar bwtakacy commented on June 19, 2024

Nice feature :)

Let's discuss about the specification of this.
Maybe it enables a input file load into a single partition, isn't it?
Is it useful to detect the target partition automatically from the input file or control file?

from pg_bulkload.

amitlan avatar amitlan commented on June 19, 2024

Handling loading into partitioned tables would be quite some work as it requires some initial setup for tuple routing. For each input tuple, an executor function called ExecFindPartition() is called to determine the target partition whose RelationData pointer is passed to heap_insert(), along with the HeapTuple corresponding to the tuple. In other words, the answer to your last question is perhaps no - routing individual tuples to target partitions needs to be handled explicitly.

On the other hand, loading into a partition works just like any regular table. If the file contains a record that doen't satisfy the partition constraint, it has to be rejected. pg_bulkload's writers need to learn how to do that. We cannot skip checking the partition constraint unlike regular user-defined CHECK constraints, which is a pg_bulkload feature. Since checking partition constraint is embedded inside ExecConstraints(), that means we cannot skip calling it, which in turn means we will end up checking the regular CHECK constraints even if don't want. Perhaps the fact that partition constraint checking is embedded inside ExecConstraints() is undesirable, so I need to talk to pgsql-hackers about that - we may need publicly accessible ExecPartitionCheck().

Anyway, it might be too early to consider partitioned tables at this point. So closing this issue.

from pg_bulkload.

bwtakacy avatar bwtakacy commented on June 19, 2024

Hmm.

Many hardles.
But, it may be a big feature for new major version up.
I hope we will back to this again:)

from pg_bulkload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.