External data files possible?

From: Chris Cleveland <ccleve+github(at)dieselpoint(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: External data files possible?
Date: 2022-02-21 21:16:31
Message-ID: CABSN6VdnFH8-MRf6ebB3dx_GC9+-hr5Yv2ss5vHjB97sLSznVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It's turning out to be difficult to store the data for my custom index
access method in the main fork. Breaking up the data into pages with page
headers means a lot of extra work, a big performance hit, and disk space
management headaches. It's just not a good fit for my particular file
format.

It would be much better to store the index in a set of external data files.
This seems possible so long as I put the files under the database's
directory and name things properly.

But here's the one thing I haven't figured out: how to delete the files
when the index, table, or database gets dropped. The IndexAmRoutine does
not have an "amdrop" hook that gets called when the index gets dropped.

Is there a hook I can use to clean these files up? More generally, can I
get away with using my own data files without causing a problem?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florin Irion 2022-02-21 21:22:55 Re: Emit a warning if the extension's GUC is set incorrectly
Previous Message Chapman Flack 2022-02-21 21:09:52 Re: Documentation about PL transforms