Re: idea: global temp tables
От | Kevin Grittner |
---|---|
Тема | Re: idea: global temp tables |
Дата | |
Msg-id | 49F84BAF.EE98.0025.0@wicourts.gov обсуждение исходный текст |
Ответ на | idea: global temp tables (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: idea: global temp tables
Re: idea: global temp tables |
Список | pgsql-hackers |
Greg Stark <stark@enterprisedb.com> wrote: > I've been thinking about Alvaro's idea of a separate smgr. If you > had a single pg_class entry for all sessions but the smgr knew to > store the actual data for it in a session-local file, either in a > session-specific tablespace or using the same mechanism the > temporary files use to direct data then the backend would basically > never know it wasn't a regular table. > > It could still use local buffers but it could use the global > relcache, invalidation, locks, etc. I think we would have to take a > session-level access lock as soon as we put any data in our local > store. And each DDL operation would have to be visited to see > whether it needs special behaviour for locally stored tables. I > suspect most of them will only be able to be handled if there are no > active sessions using the table so they'll basically be no-ops > except for the catalog changes. Any chance that some of these improvements could be applied to temp tables created with the PostgreSQL-specific syntax while we're at it? The need for several tables to be created on disk to materialize a single temp table currently causes performance problems in some contexts. I don't think the updates to the system tables have the same magnitude of performance hit as creating these tables, especially if write barriers are on. -Kevin
В списке pgsql-hackers по дате отправления: