Oleg Bartunov <oleg@sai.msu.su> writes:
> There is a problem with gist_xlog_cleanup function - we have no
> information about user defined functions and indices, because postmaster
> doesn't started yet and system catalog isn't available. For btree it's not
> necessary, but for GiST we certainly need them.

btree manages to avoid calling the index support functions during WAL
restore --- can't you do the same?  Perhaps you need to be including
more information in the initial xlog records, so that the cleanup step
has everything it needs.  Or resort to brute-force search (which is more
or less what btree does).  I don't think this operation needs to be very
efficient, since it's a corner case that should only seldom be invoked.

It's a really bad idea to be calling any support functions during WAL
recovery, since you won't have a transaction open for them to run in...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to