Re: [HACKERS] how to understand these macro defines such as ObjectIdAttributeNumber in sysattr.h?

2014-08-18 Thread
18, 2014 at 4:42 PM, 土卜皿 wrote: > >Recently, for understanding postgresql's optimizer, I read and debug > the > > source code. these two days, I read these macros in sysattr.h: > > > > ... > > #define ObjectIdAttributeNumber (-2) > > ... > >

[HACKERS] how to understand these macro defines such as ObjectIdAttributeNumber in sysattr.h?

2014-08-18 Thread
hi, all I am so sorry for asking some questions like this! Recently, for understanding postgresql's optimizer, I read and debug the source code. these two days, I read these macros in sysattr.h: ... #define ObjectIdAttributeNumber (-2) ... and the relative codes, but I still did not know

Re: [HACKERS] how to debug into InitPostgres() and InitCatalogCache()?

2014-08-05 Thread
2014-08-05 22:08 GMT+08:00 土卜皿 : > hi, all > I already can debug general postgres using "ddd" and "select > pg_backend_pid();" , now, I want to study the details of the system > catalog cache and system cache management, so I need to debug the function >

[HACKERS] how to debug into InitPostgres() and InitCatalogCache()?

2014-08-05 Thread
hi, all I already can debug general postgres using "ddd" and "select pg_backend_pid();" , now, I want to study the details of the system catalog cache and system cache management, so I need to debug the function InitPostgres() and InitCatalogCache(), and I tried the following steps: [refer: How

[HACKERS] whether I can see other alternative plantrees for one query?

2014-07-28 Thread
hi, all NOTE: Version is 8.4 Fedora 20 X86_64 for understanding optimizer's internals, I *set debug_print_plan=on* and created two tables as follows : *create table Reserves (sid integer, bid integer,day date,rname char(25));create table Sailors(sid integer,sname char(25),rating integer,

Re: [HACKERS] how to reach D5 in tuplesort.c 's polyphase merge algorithm?

2014-07-22 Thread
hi, I got the same result after work_mem = 64, but I can get to D5 and D6 after using bigger data sample (at least 10 records) as Tom said! 2014-07-19 6:35 GMT+08:00 土卜皿 : > > 2014-07-19 6:26 GMT+08:00 Tom Lane : > > =?UTF-8?B?5Zyf5Y2c55q/?= writes: >> > for stu

Re: [HACKERS] how to reach D5 in tuplesort.c 's polyphase merge algorithm?

2014-07-18 Thread
2014-07-19 6:26 GMT+08:00 Tom Lane : > =?UTF-8?B?5Zyf5Y2c55q/?= writes: > > for studying polyphase merge algorithm of tuplesort.c, I use ddd and > > apend a table, which has a schema as follows: > > ... > > and has 36684 records, and every record is like: > > id code article name

[HACKERS] how to reach D5 in tuplesort.c 's polyphase merge algorithm?

2014-07-18 Thread
hi, all for studying polyphase merge algorithm of tuplesort.c, I use ddd and apend a table, which has a schema as follows: CREATE TABLE Towns ( id SERIAL UNIQUE NOT NULL, code VARCHAR(10) NOT NULL, -- Only unique inside a department article TEXT, name TEXT NOT NULL, -- Names are not

Re: [HACKERS] how many changes about backend mode from 7.2.2 to 8.4.0?

2014-07-10 Thread
hi, tom thank you very much! this is what I wanted! Dillon 2014-07-11 10:59 GMT+08:00 Tom Lane : > =?UTF-8?B?5Zyf5Y2c55q/?= writes: > > I am sorry, maybe I should make my question clearer, I only want to know, > > in 8.4.0 or newer version, > > whether I can debug posgres in the bare backen

Re: [HACKERS] how many changes about backend mode from 7.2.2 to 8.4.0?

2014-07-10 Thread
hi, thanks a lot! 2014-07-11 10:10 GMT+08:00 Michael Paquier : > On Fri, Jul 11, 2014 at 10:50 AM, 土卜皿 wrote: > > NOTE: fedora 17 x86_64, 7.2.2 can not be compiled in the env, I choose > 8.4.0 > > because I think old version is easier to understand than newer version! &g

[HACKERS] how many changes about backend mode from 7.2.2 to 8.4.0?

2014-07-10 Thread
hi, all NOTE: fedora 17 x86_64, 7.2.2 can not be compiled in the env, I choose 8.4.0 because I think old version is easier to understand than newer version! I want to study pg's external sort (in tuplesort.c )through 8.4.0's source code, and use ddd to do it, according to usingddd-postgres