FDW: should GetFdwRoutine be called when drop table?

Поиск
Список
Период
Сортировка
От Feng Tian
Тема FDW: should GetFdwRoutine be called when drop table?
Дата
Msg-id CAFWGqntMqT6Mkjbxgu9MMFxwzCOrixYgGXH5-82QQ4a-ZSyybw@mail.gmail.com
обсуждение исходный текст
Ответы Re: FDW: should GetFdwRoutine be called when drop table?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Hi, Hackers,

I have an fdw that each foreign table will acquire some persisted resource.
In my case, some files in file system.   To drop the table cleanly, I have written
an object_access_hook that remove those files.  The hook is installed in _PG_init.  

It all worked well except one case. Suppose a user login, the very first command is 
drop foreign table.  Drop foreign table will not load the module, so that the hook 
is not installed and the files are not properly cleaned up.

Should drop foreign table call GetFdwRoutine?   _PG_init is the only entrance point 
that I know for registering hooks, I feel we need to trigger a load for all DML/DDL on 
FDW including drop.   Does this make sense?  

Thanks,
Feng
   


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL Audit Extension
Следующее
От: piyush patil
Дата:
Сообщение: Google Summer of Code