Re: how to do profile for pg?

2023-09-21 Thread jack...@gmail.com
Cc mailto:jack...@gmail.com"; >jack...@gmail.com Subject Re: how to do profile for pg? Hi jacktby, PostgreSQL is literally a large and complicated program i

how to do profile for pg?

2023-09-21 Thread jack...@gmail.com

How does pg index page optimize dead tuples?

2023-04-19 Thread jack...@gmail.com
w it solve this one? please give me a code example,thanks. jack...@gmail.com

Howdoes; pg; index; page; optimize; dead; tuples?;

2023-04-19 Thread jack...@gmail.com
w it solve this one? please give me a code example,thanks. jack...@gmail.com

How to get the real type use oid in internal codes?

2023-03-09 Thread jack...@gmail.com
I can use relation struct to get all attributes' typeoid, so which funcion I can use to get the real type. jack...@gmail.com

How does pg implement the visiblity of one tuple for specified transaction?

2023-03-05 Thread jack...@gmail.com
Suppose there is a transaction running, how it knows the tuples that are visible for it? jack...@gmail.com

What's MultiXactId?

2023-03-03 Thread jack...@gmail.com
in src/include/access/htup_details.h, I find out this: #define HEAP_XMAX_IS_MULTI 0x1000 /* t_xmax is a MultiXactId */ what's MultiXactId? Can you give me a scenario to make this bit as 1? jack...@gmail.com

Re: Re: What's the prefix?

2023-02-26 Thread jack...@gmail.com
From: David G. Johnston Date: 2023-02-27 00:27 To: jack...@gmail.com CC: pgsql-hackers Subject: Re: What's the prefix? On Sun, Feb 26, 2023 at 9:16 AM jack...@gmail.com wrote: use these sqls: create table t(a text); insert into t values('a'); select lp,lp_len,t_data from

What's the prefix?

2023-02-26 Thread jack...@gmail.com
use these sqls: create table t(a text); insert into t values('a'); select lp,lp_len,t_data from heap_page_items(get_raw_page('t',0)); lp | lp_len | t_data ++ 1 | 26 | \x0561 as you can see, the 61 is 'a', so what's the 05??? strange. jack...@gmail.com

Re: Re: Give me more details of some bits in infomask!!

2023-02-26 Thread jack...@gmail.com
From: Tomas Vondra Date: 2023-02-26 23:23 To: jack...@gmail.com; pgsql-hackers Subject: Re: Give me more details of some bits in infomask!! On 2/26/23 15:30, jack...@gmail.com wrote: > here are the source codes from src/include/access/htup_details.h. > /* > * information stored in t

Re: Re: Why the lp_len is 28 not 32?

2023-02-26 Thread jack...@gmail.com
From: Tomas Vondra Date: 2023-02-26 23:07 To: jack...@gmail.com; pgsql-hackers Subject: Re: Why the lp_len is 28 not 32? On 2/26/23 15:35, jack...@gmail.com wrote: > use these sqls below: > create table t(a int); > insert into t values(1); > select lp,lp_off,lp_len,t_data from hea

Why the lp_len is 28 not 32?

2023-02-26 Thread jack...@gmail.com
\x0100 ---- jack...@gmail.com

Give me more details of some bits in infomask!!

2023-02-26 Thread jack...@gmail.com
that these three bit can have only one to be set 1 at most. 3. t_cid is a combo CID? what's a CID? give me an example please. -- jack...@gmail.com

How to solve "too many Lwlocks taken"?

2023-02-07 Thread jack...@gmail.com
I'm trying to write am table_am extension. But I get "too many Lwlocks taken" after I insert too many tuples. So I try to use UnLockBuffers() everywhere; but it still give me "too many Lwlocks taken", So how should I release All locks? -- jack...@gmail.com

Where is the filter?

2023-02-04 Thread jack...@gmail.com
When I use 'select * from t where a = 1'; And I debug to find where the 'a = 1' is used, when I arrive ExecScan in src/backend/executor/execScan.c, line 158, where this 'a = 1' is stored in? jack...@gmail.com

what's the meaning of key?

2023-02-04 Thread jack...@gmail.com
I'm doing research on heap_am, and for heap_beginscan func, I find out that there is a arg called nkeys, I use some sqls as examples like 'select * from t;' and 'select * from t where a = 1', but it is always zero, can you give me some descriptions for this? wh

How to implement read operations for my own access method?

2023-02-04 Thread jack...@gmail.com
qls.Thanks -- jack...@gmail.com

Where is the logig to create a table file?

2023-02-03 Thread jack...@gmail.com
When I use 'create table t(a int);'; suppose that this table t's oid is 1200, then postgres will create a file named 1200 in the $PGDATA/base, So where is the logic code in the internal? ------ jack...@gmail.com

How to write a new tuple into page?

2023-02-02 Thread jack...@gmail.com
Hi, I'm trying to construct a new tuple type, that's not heaptuple, When I get a tupleTableSlot, I will get data info from it and then I will constuct a new tuple, and now I need to put it into a physical page, how should I do? -- jack...@gmail.com

回复: access method xxx does not exist

2022-10-29 Thread jack...@gmail.com
I'm trying to add a new index, but when I finish it, I use “ create index xxx_index on t1 using xxx(a); ”,it gives me access method "spb" does not exist And I don't know where this message is from, can you grve me its position? jack...@gmail.com

access method xxx does not exist

2022-10-29 Thread jack...@gmail.com
I'm trying to add a new index, but when I finish it, I use “ create index xxx_index on t1 using xxx(a); ”,it gives me access method "spb" does not exist And I don't know where this message is from, can you grve me its position? jack...@gmail.com

confused with name in the pic

2022-10-26 Thread jack...@gmail.com
*/ Node   *rexpr;  /* right argument, or NULL if none */ int location;   /* token location, or -1 if unknown */ } A_Expr; I run a sql like select a,b from t3 where a > 1; and I get the parseTree for selectStmt: why the name is '-' but not &#x