Re: Patch to add hook to copydir()

2019-09-07 Thread Swen Kooij
Should I forget about getting such a patch in? I am up for implementing alternative solutions if the current one is considered unacceptable. As I tried to demonstrate in my last email, previous attempts also failed. On Tue, Sep 3, 2019 at 12:14 PM Swen Kooij wrote: > > I read two previous propos

Re: Patch to add hook to copydir()

2019-09-03 Thread Swen Kooij
I read two previous proposals for something similar. First one is from 2013 [0]. It proposed a OS and filesystem specific implementation. Which was then changed to a patch that adds a config option to specify shell commands that postgres should use for copying files and dirs. This was after commen

Re: Patch to add hook to copydir()

2019-09-02 Thread Peter Eisentraut
On 2019-09-02 22:16, Swen Kooij wrote: > Is there anything that I am missing? My early experiments have been > very promising but my experience with Postgres internals is limited. Any > help or feedback would be much appreciated. You might want to review several previous threads that were contempl

Re: Patch to add hook to copydir()

2019-09-02 Thread Swen Kooij
Thank you both for the feedback. To give some background on what I am trying to do. Mostly experimental work right now. I've built an extension that takes advantage of the copy-on-write properties of ZFS and BTRFS. A tool transforms a data directory into a set of datasets/sub volumes. When a new d

Re: Patch to add hook to copydir()

2019-09-02 Thread Alvaro Herrera
On 2019-Sep-02, Peter Eisentraut wrote: > On 2019-09-02 20:54, Swen Kooij wrote: > > I've been working on an extension that tightly integrates > > postgres with underlying filesystem . I need to customize > > how postgres copies directories for new databases. > > Could you share some more details

Re: Patch to add hook to copydir()

2019-09-02 Thread Swen Kooij
I just realized I completely borked the patch file. My apologies. Attached a (hopefully) correct patch file. --- Swen Kooij On Mon, Sep 2, 2019 at 9:54 PM Swen Kooij wrote: > > Hello all, > > I've been working on an extension that tightly integrates > postgres with underlying filesystem . I nee

Re: Patch to add hook to copydir()

2019-09-02 Thread Peter Eisentraut
On 2019-09-02 20:54, Swen Kooij wrote: > I've been working on an extension that tightly integrates > postgres with underlying filesystem . I need to customize > how postgres copies directories for new databases. Could you share some more details, so we can assess whether that is a sensible way to

Patch to add hook to copydir()

2019-09-02 Thread Swen Kooij
Hello all, I've been working on an extension that tightly integrates postgres with underlying filesystem . I need to customize how postgres copies directories for new databases. I first looked at the ProcessUtility_hook. This would require me to copy or rewrite most of the createdb() function. Th