Hi, postgres hackers, I’m studying postgres buffer cache part. So I open this
thread to communicate some buffer cache codes design and try to improve some
tricky codes.
For Buffer Cache, we know it’s a buffer array, every bucket of this array is
consist of a data page and its header which is us
In the bus_internal.h,I see
Note: Buffer header lock (BM_LOCKED flag) must be held to examine or change
tag, state or wait_backend_pgprocno fields.
As we all know, this buffer header lock is
> 2023年11月10日 22:31,jacktby jacktby 写道:
>
> In the bus_internal.h,I see
>
> Note: Buffer header lock (BM_LOCKED flag) must be held to examine or change
> tag, state or wait_backe
Hi, I have 3 questions here:
1. I see comments in but_internals.h below:
* Also, in places we do one-time reads of the flags without bothering to
* lock the buffer header; this is generally for situations where we don't
* expect the flag bit being tested
> 2023年9月5日 22:29,jacktby jacktby 写道:
>
I’m trying to add a new data type for my pg. How to do that? Can you give me
more details or an example?
> 2023年9月6日 01:47,David G. Johnston 写道:
>
> OIDs don't exist independently of the data they are associated with. Give
> more context if you want a better answer. Or just go look at the source code
> commits for when the last time something needing an OID got added to the core
> catalog.
>
> 2023年9月6日 18:19,jacktby jacktby 写道:
>
>
>
>> 2023年9月6日 01:47,David G. Johnston 写道:
>>
>> OIDs don't exist independently of the data they are associated with. Give
>> more context if you want a better answer. Or just go look at the sourc
> 2023年9月6日 18:50,jacktby jacktby 写道:
>
>
>
>> 2023年9月6日 18:19,jacktby jacktby 写道:
>>
>>
>>
>>> 2023年9月6日 01:47,David G. Johnston 写道:
>>>
>>> OIDs don't exist independently of the data they are associated with. Giv
I only add below:
Datum fake_dinstance2(PG_FUNCTION_ARGS)
{
PG_RETURN_INT16(0);
}
in src/backend/utils/adt/int8.c, and the I run “make install”,
But I can’t find the fake_distance2 in src/backend/utils/fmgrtab.c which is
generated by src/backend/utils/Gen_fmgrtab.pl. What else do I need t
> 2023年9月11日 23:51,Aleksander Alekseev 写道:
>
> Hi,
>
>> I only add below:
>>
>> Datum fake_dinstance2(PG_FUNCTION_ARGS)
>> {
>>PG_RETURN_INT16(0);
>> }
>> in src/backend/utils/adt/int8.c, and the I run “make install”,
>> But I can’t find the fake_distance2 in src/backend/utils/fmgrta
> 2023年9月12日 00:34,Chapman Flack 写道:
>
> On 2023-09-11 12:28, jacktby jacktby wrote:
>>> 2023年9月11日 23:51,Aleksander Alekseev 写道:
>>> often better) add a corresponding extension to /contrib/. You can find
>>> a complete example here [1] for instance, se
A normal LRU cache or implement it reference to a research paper?
In buffer README, I see “Pins may not be held across transaction boundaries,
however.” I think for different transactions, they can pin the same buffer
page, why not? For concurrent read transactions, they could read the one and
the same buffer page.
I’m trying to implement a new column store for pg, is there a good example to
reference?
> 2023年9月15日 20:31,jacktby jacktby 写道:
>
> I’m trying to implement a new column store for pg, is there a good example to
> reference?
That’s too complex, I just need to know the interface about design a column
store. In fact, I just need a simple example, and I will implement i
typedef struct TupleDescData
{
int natts; /* number of attributes
in the tuple */
Oid tdtypeid; /* composite type ID
for tuple type */
int32 tdtypmod; /* typmod for tuple type */
typedef struct TupleDescData
{
int natts; /* number of attributes
in the tuple */
Oid tdtypeid; /* composite type ID
for tuple type */
int32 tdtypmod; /* typmod for tuple type */
I find this in source code
#define ShareLock 5 /* CREATE INDEX
(WITHOUT CONCURRENTLY) */
I think if there is no CONCURRENTLY, so why we need a lock, I think that’s
unnecessary. What’s the point?
/* Typedef for callback function for table_index_build_scan */
typedef void (*IndexBuildCallback) (Relation index,
ItemPointer tid,
Datum
*values,
typedef bool (*aminsert_function) (Relation indexRelation,
Datum
*values,
bool *isnull,
ItemPoint
> 2023年9月27日 00:45,Matthias van de Meent 写道:
>
> On Tue, 26 Sept 2023 at 18:38, jacktby jacktby wrote:
>>
>> typedef bool (*aminsert_function) (Relation indexRelation,
>> Datum *values,
>> bool *isnull,
>> ItemPointer heap_tid,
>> Relation h
> 2023年9月27日 18:08,Matthias van de Meent 写道:
>
> On Wed, 27 Sept 2023 at 05:03, jacktby jacktby <mailto:jack...@gmail.com>> wrote:
>>
>>
>>
>>> 2023年9月27日 00:45,Matthias van de Meent 写道:
>>>
>>> On Tue, 26 Sept
postgres=# SET enable_seqscan = off;
SET
postgres=# explain select * from t;
QUERY PLAN
-
Seq Scan on t (cost=100.00..123.60 rows=1360 width=32)
(
> 2023年9月28日 01:07,Andres Freund 写道:
>
> Hi,
>
> On 2023-09-28 00:37:41 +0800, jacktby jacktby wrote:
>> postgres=# SET enable_seqscan = off;
>> SET
>> postgres=# explain select * from t;
>>
> 2023年9月28日 01:07,Andres Freund 写道:
>
> Hi,
>
> On 2023-09-28 00:37:41 +0800, jacktby jacktby wrote:
>> postgres=# SET enable_seqscan = off;
>> SET
>> postgres=# explain select * from t;
>>
> 2023年9月28日 01:07,Andres Freund 写道:
>
> Hi,
>
> On 2023-09-28 00:37:41 +0800, jacktby jacktby wrote:
>> postgres=# SET enable_seqscan = off;
>> SET
>> postgres=# explain select * from t;
>>
> 2023年9月28日 12:26,David G. Johnston 写道:
>
> On Wednesday, September 27, 2023, jacktby jacktby <mailto:jack...@gmail.com>> wrote:
>> postgres=# SET enable_seqscan = off;
>> SET
>> postgres=# explain select * from t;
>>
I’m trying to add a new operator for my pg application like greater_equals
called “<~>", how many files I need to
modify and how to do it? Can you give me an example?
> 2023年8月6日 13:18,Julien Rouhaud 写道:
>
> On Sun, 6 Aug 2023, 12:34 jacktby jacktby, <mailto:jack...@gmail.com>> wrote:
>> I’m trying to add a new operator for my pg application like greater_equals
>> called “<~>", how many files I need to
>&
32 matches
Mail list logo