我正在使用 Postgres 进行一些工作。我正在尝试熟悉编辑其源代码。
建议的做法之一是更改 Postgres 7.4 系统的缓冲区替换策略。 (这是某所大学的作业之一。谷歌的前几个链接。我只是用它们来熟悉代码。)
我理解其中的一部分,但我无法完全理解如何修改系统。我的意思是,我知道 src/backend/storage 位置中的特定文件、缓冲区文件夹文件是我必须进行更改的文件,但如何实现我自己的方案并测试它,这超出了我的范围。
所以我的问题是,任何人都可以帮助我理解一些基本的代码片段吗? (可能,让我知道如何解决上述问题?以及如何测试它(最重要的)。)(这不是任何类型的家庭作业,保证。我只是想掌握一些事情。)
如果不,有人可以给我推荐一些可以帮助我修改 postgresql 源代码的书吗?有一些使用postgresql的书籍,但我找不到任何可以帮助修改源代码的书籍。
PS:我知道 PGSQL 源代码的在线文档位于: http://doxygen.postgresql.org/
但我无法从那里理解很多。我需要一本可以帮助外行的书!
非常感谢任何帮助!
I was working around with Postgres a bit. I am trying to get familiar to editing the source code of the same.
One of the suggested exercise was to change the buffer replacement policy of the system of Postgres 7.4. (It was in one of the homeworks of some university. First few links of google. I am just using them to get familiar to the code.)
I understand parts of it but I am not able to fully understand how to modify the system. I mean, I know the particular files,buffer folder files in the src/backend/storage location as the files where I have to make changes, but how to implement my own scheme and test it, is going over my head.
So my question is, can anyone help me with some basic code snippet understanding? (Probably, give me idea how to solve the question mentioned above? and how to test it ( most important). ) (This is not a homework of any sort, promise. I am just trying to get a hang of things.)
If not, can anyone refer me to some book which can help me with modification of the postgresql source code? There are books to use postgresql, but I couldn't find any that could help to modify the source code.
P.S: I know the online documentation of PGSQL source code resides at: http://doxygen.postgresql.org/
But I am not able to understand a lot from there. I need a book that can help the layman!
Any help is much appreciated!
发布评论
评论(1)
除了开发人员常见问题解答之外,最好的起点是 PostgreSQL 邮件列表。
您可以从发布到 http://archives.postgresql.org/pgsql-novice/ 开始(“对于这个列表来说,没有问题太简单”)
如果您真的开始更改源代码,您将需要订阅 http://archives.postgresql.org/pgsql-hackers/ 也是如此。
并且不要使用 7.x 源代码。 PostgreSQL 现在是 9.1 版本,我确信研究古代历史不会有太大帮助。
Apart from the Developer FAQ your best starting point will be the PostgreSQL mailing lists.
You might start with posting to http://archives.postgresql.org/pgsql-novice/ ("No question is too simple for this list")
And if you really start changing the source code you will need to subscribe to http://archives.postgresql.org/pgsql-hackers/ as well.
And don't use the 7.x source code. PostgreSQL is at Version 9.1 now and I'm sure studying the ancient history won't be very helpful.