is indicating the low 4 bits are for rmgr too?
>
No, only the high 4 bits are used for RMGR, see the code under directory
'src/backend/access/rmgrdesc'
'XLR_SPECIAL_REL_UPDATE' and 'XLR_CHECK_CONSISTENCY' are not RMGR info,
but they
can be passed by XLogInsert caller.
>
>
> Did I misunderstand something?
>
> Thanks,
> Steven
>
--
Best regards !
Xiaoran Wang
Just upload all the patches together.
Xiaoran Wang 于2025年6月9日周一 18:25写道:
>
>
> Steven Niu 于2025年6月9日周一 14:46写道:
>
>> Hi,
>>
>> I like the idea of your change as it saves me out of
>> converting-in-my-mind.
>>
>> And I suggest to create a macr
ome:
> XLogRecGetInfo(record) & ~XLR_INFO_MASK;
> -->
> getRmgrInfo(XLogRecGetInfo(record));
>
Good idea, found lots of 'XLogRecGetInfo(record) & ~XLR_INFO_MASK;'
in the code.
I add a macro XLogRecRmgrGetInfo(record) in patch 0002.
>
> Thanks,
> Steven
>
&g
s it is not used any more.
--
Best regards !
Xiaoran Wang
0001-Refactor-Extract-XLogRecord-info.patch
Description: Binary data
Andres also has some compiler hacking to detect return statements in
> PG_TRY[^2].
>
> [^1]: https://codeql.github.com/
> [^2]:
> https://www.postgresql.org/message-id/20230113054900.b7onkvwtkrykeu3z%40awork3.anarazel.de
>
--
Best regards !
Xiaoran Wang
0003-Imporve-pg_re_throw-check-if-sigjmp_buf-is-valid-and.patch
Description: Binary data
Tom Lane 于2024年8月20日周二 11:44写道:
> Xiaoran Wang writes:
> >> Yeah, that's the big problem. I don't have any confidence at all
> >> that this would detect misuse. It'd require that the old stack
> >> frame gets overwritten, which might not happe
Xiaoran Wang 于2024年8月20日周二 11:32写道:
>
>
> Tom Lane 于2024年8月19日周一 22:12写道:
>
>> Robert Haas writes:
>> > On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang
>> wrote:
>> >> If the code in PG_TRY contains any non local control flow other than
>> >&
Tom Lane 于2024年8月19日周一 22:12写道:
> Robert Haas writes:
> > On Mon, Aug 19, 2024 at 2:17 AM Xiaoran Wang
> wrote:
> >> If the code in PG_TRY contains any non local control flow other than
> >> ereport(ERROR) like goto, break etc., the PG_CATCH or PG_END_TRY c
#x27; in
regress.c
create function pg_re_throw_crash()
RETURNS void
AS :'regresslib', 'pg_re_throw_crash'
LANGUAGE C STRICT STABLE PARALLEL SAFE;
create above function and run 'select pg_re_throw_crash()', then will get
the error
'FATAL: Invalid sigjum_buf, code i
, continue, or goto
>> leading out of the PG_TRY are other possibilities. Maybe more
>> like "The XXX code must exit normally (by control reaching
>> the end) if it does not throw ereport(ERROR)." Not quite sure
>> what to use for XXX.
>>
>> regards, tom lane
>>
>
--
Best regards !
Xiaoran Wang
Robert Haas 于2024年8月13日周二 00:28写道:
> On Thu, Aug 8, 2024 at 10:27 PM Xiaoran Wang
> wrote:
> > > Add function 'pq_leave_shm_mq' to allow the process to go
> > > back to the previous pq environment.
> >
> > >.In the code as i
Robert Haas
03:24 (6小时前)
发送至 我、 pgsql-hackers
On Wed, Aug 7, 2024 at 11:24 PM Xiaoran Wang wrote:
> When I use the 'pqmq' recently, I found some issues, just fix them.
>
> Allow the param 'dsm_segment *seg' to be NULL in function
> 'pq_redirect_t
Hi,
When I use the 'pqmq' recently, I found some issues, just fix them.
Allow the param 'dsm_segment *seg' to be NULL in function
'pq_redirect_to_shm_mq'. As sometimes the shm_mq is created
in shared memory instead of DSM.
Add function 'pq_leave_shm_mq' to allow the process t
Hi hackers,
I found that in enum XactEvent, there is 'XACT_EVENT_PREPARE' for
'prepare transaction', but there is no event for 'commit prepared' or
'rollback prepared'.
For the following SQL:
begin;
create table test(a int);
PREPARE TRANSACTION '
ystem_scan, it receives the SharedInvalidationMessages
and returns the tuples which
are out of date. systable_recheck_tuple is used in dependency.c for such
case.
Tom Lane 于2024年1月14日周日 03:12写道:
> I wrote:
> > Xiaoran Wang writes:
> >> Hmm, how about first checking if any inva
eral
CPU cycles.
if (inval_count != SharedInvalidMessageCounter &&
!systable_recheck_tuple(scandesc, ntp))
{
heap_freetuple(dtp);
return NULL;
}
Xiaoran Wang 于2024年1月13日周六 13:16写道:
> Great! That's what exactly we need.
>
> The patch LG
Great! That's what exactly we need.
The patch LGTM, +1
Tom Lane 于2024年1月13日周六 04:47写道:
> I wrote:
> > This is uncomfortably much in bed with the tuple table slot code,
> > perhaps, but I don't see a way to do it more cleanly unless we want
> > to add some new provisions to that API. Andres,
nsactionIdIsValid(xmax) &&
TransactionIdDidCommit(xmax))
{
heap_freetuple(dtp);
return NULL;
I'm not quite sure the code is correct, I cannot clearly understand
'HeapTupleHeaderGetUpdateXid', and I need more time to di
Hi,
>> BTW, while nosing around I found what seems like a very nasty related
>> bug. Suppose that a catalog tuple being loaded into syscache contains
>> some toasted fields. CatalogCacheCreateEntry will flatten the tuple,
>> involving fetches from toast tables that will certainly cause
>> AcceptI
Hi Heikii,
I haven't dug into your patch yet, but for this problem, I have another
idea.
---
explain verbose
select foo from mytable order by sha256(bar::bytea);
QUERY PLAN
--
Hi,
I updated the comment about the CatalogSnapshot `src/backend/utils/time/
snapmgr.c`
Xiaoran Wang 于2023年12月18日周一 15:02写道:
> Hi,
> Thanks for your reply.
>
> jian he 于2023年12月18日周一 08:20写道:
>
>> Hi
>> ---setup.
>> drop table s2;
>> create table s2(a int
Hi,
Thanks for your reply.
jian he 于2023年12月18日周一 08:20写道:
> Hi
> ---setup.
> drop table s2;
> create table s2(a int);
>
> After apply the patch
> alter table s2 add primary key (a);
>
> watch CatalogSnapshot
>
> #0 GetNonHistoricCatalogSnapshot (relid=1259)
> at
> ../../Desktop/pg_src
not the same as the transaction “CurrentSnapshot”, but we can still update
the CatalogSnapshot’s
“curcid”, as the “curcid” only be checked when the tuple is inserted or
deleted by the current transaction.
Xiaoran Wang 于2023年12月7日周四 10:13写道:
> Hi hackers,
>
>
> For local invalidati
Hi hackers,
For local invalidation messages, there is no need to call
`InvalidateCatalogSnapshot` to set the CatalogSnapshot to NULL and
rebuild it later. Instead, just update the CatalogSnapshot's `curcid`
in `SnapshotSetCommandId`, this way can make the CatalogSnapshot work
well too.
This o
Hi,
I updated the comment in 'SnapshotSetCommandId' in this patch which specifies
the reason why it
is not necessary to update 'curcid' of CatalogSnapshot.
Best regards, xiaoran
0001-Update-the-comment-in-SnapshotSetCommandId.patch
Description: 0001-Update-the-comment-in-SnapshotSetCommandId.p
Hi,
I have a question about the routine "GetNonHistoricCatalogSnapshot".
It has a param "Oid relid". It firstly
checks if the relation has systemcache or if it is in
"RelationInvalidatesSnapshotsOnly" related relations.
If yes, it will invalidate the CatalogSnapshot.
I just wonder in which si
From: tender wang
Sent: Thursday, May 11, 2023 3:26 PM
To: Tom Lane
Cc: Bharath Rupireddy ; Xiaoran Wang
; pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] Use RelationClose rather than table_close in
heap_create_with_catalog
!! External Email
Tom Lane mailto:t
,
NoLock); /* do not unlock till end of xact */
this line is a little confusing since there is no lock on the relation at all.
So I think it's better to use RelationColse here.
From: tender wang
Sent: Wednesday, May 10, 2023 10:57 AM
To: Xiaoran Wan
Hi hackers,
In heap_create_with_catalog, the Relation new_rel_desc is created
by RelationBuildLocalRelation, not table_open. So it's better to
call RelationClose to release it.
What's more, the comment for it seems useless, just delete it.
Thanks!
0001-Use-RelationClose-rather-than-table_clos
Hi,
I created a postgers_fdw server lookback as the test does. Then run the
following SQLs
create table t1(c0 int);
insert into t1 values(1);
create foreign table ft1(
c0 int
) SERVER loopback OPTIONS (schema_name 'public', table_name 't1');
Then started a transaction that runs queries on b
Hi,
The max size for the shmem hash table name is SHMEM_INDEX_KEYSIZE - 1.
but when the caller uses a longer hash table name, it doesn't report any error,
instead
it just uses the first SHMEM_INDEX_KEYSIZE -1 chars as the hash table name.
I created some shmem hash tables with the same prefix whi
The max size for the shared memory hash table name is SHMEM_INDEX_KEYSIZE - 1
(shared hash table name is stored and indexed by ShmemIndex hash table,
the key size of it is SHMEM_INDEX_KEYSIZE), but when the caller uses a
longer hash table name, it doesn't report any error, instead it just
uses
32 matches
Mail list logo