External data files possible? - Mailing list pgsql-hackers

From Chris Cleveland
Subject External data files possible?
Date
Msg-id CABSN6VdnFH8-MRf6ebB3dx_GC9+-hr5Yv2ss5vHjB97sLSznVw@mail.gmail.com
Whole thread Raw
Responses Re: External data files possible?
Re: External data files possible?
List 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?

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: Documentation about PL transforms
Next
From: Florin Irion
Date:
Subject: Re: Emit a warning if the extension's GUC is set incorrectly