rss· 投稿· 设为首页· 加入收藏· 繁體版
当前位置: 火魔网 » 数据库 » PostgreSQL

Greenplum的一个bug

在上半年的一个项目开发过程中,我遇到过很多bug,影响最为严重的就是指针bug,此bug是Postgre本身就存在的,但是已经在8.3之后的版本中修正了。但是目前GreenPlum 还是基于Postgre8.2,什么时候升级到Postgre8.3还是个未知数。下面是一段PostgreFAQ 里的一段关于此bug的描述:
Why do I get "relation with OID ##### does not exist" errors when accessing temporary tables in
PL/PgSQL functions?
 
In PostgreSQL versions < 8.3, PL/PgSQL caches function scripts,   
and an unfortunate side effect is that if a PL/PgSQL function accesses a temporary table,   
AND that table is later dropped and recreated, and the function called again,   
the function will fail because the cached function contents still point to the old temporary table.   
The solution is to use EXECUTE for temporary table access in PL/PgSQL.   
This will cause the query to be reparsed every time.
 
This problem does not occur in PostgreSQL 8.3 and later.
 
文章大意是说,由于指针没有被及时修改而引起的此bug。其实这个bug是很有趣的,对此我做了一些试验,创建一个临时表然后引用或者创建一个type然后引用都可以造成此bug。
顶一下
(0)
踩一下
(0)