agora inbox for [email protected]
help / color / mirror / Atom feed[Proposal] Global temporary tables
1002+ messages / 6 participants
[nested] [flat]
* [Proposal] Global temporary tables
@ 2019-10-11 12:15 =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-10-11 12:15 UTC (permalink / raw)
To: pgsql-hackers; +Cc: =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?5byg5bm/6IifKOaYjuiZmik=?= <[email protected]>; =?UTF-8?B?6LW15q6/5aWO?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
Dear Hackers,
This propose a way to develop global temporary tables in PostgreSQL.
I noticed that there is an "Allow temporary tables to exist as empty by default in all sessions" in the postgresql todolist.
https://wiki.postgresql.org/wiki/Todo <https://wiki.postgresql.org/wiki/Todo;
In recent years, PG community had many discussions about global temp table (GTT) support. Previous discussion covered the following topics:
(1) The main benefit or function: GTT offers features like “persistent schema, ephemeral data”, which avoids catalog bloat and reduces catalog vacuum.
(2) Whether follows ANSI concept of temporary tables
(3) How to deal with statistics, single copy of schema definition, relcache
(4) More can be seen in https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru
(5) A recent implementation and design from Konstantin Knizhnik covered many functions of GTT: https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch <https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch;
However, as pointed by Konstantin himself, the implementation still needs functions related to CLOG, vacuum, and MVCC visibility.
We developed GTT based on PG 11 and included most needed features, such as how to deal with concurrent DDL and DML operations, how to handle vacuum and too old relfrozenxids, and how to store and access GTT statistics.
This design followed many suggestions from previous discussion in community. Here are some examples:
“have a separate 'relpersistence' setting for global temp tables…by having the backend id in all filename…. From Andres Freund
Use session memory context to store information related to GTT. From Pavel Stehule
“extend the relfilenode mapper to support a backend-local non-persistent relfilenode map that's used to track temp table and index relfilenodes…” from Craig Ringer
Our implementation creates one record in pg_class for GTT’s schema definition. When rows are first inserted into the GTT in a session, a session specific file is created to store the GTT’s data. Those files are removed when the session ends. We maintain the GTT’s statistics in session local memory. DDL operations, such as DROP table or CREATE INDEX, can be executed on a GTT only by one session, while no other sessions insert any data into the GTT before or it is already truncated. This also avoids the concurrency of DML and DDL operations on GTT. We maintain a session level oldest relfrozenxids for GTT. This way, autovacuum or vacuum can truncate CLOG and increase global relfrozenxids based on all tables’ relfrozenxids, including GTT’s.
The follows summarize the main design and implementation:
Syntax: ON COMMIT PRESERVE ROWS and ON COMMIT DELETE ROWS
Data storage and buffering follows the same way as local temp table with a relfilenode including session id.
A hash table(A) in shared memory is used to track sessions and their usage of GTTs and to serialize DDL and DML operations.
Another hash table(B) in session memory is introduced to record storage files for GTTs and their indexes. When a session ends, those files are removed.
The same hash table(B) in session memory is used to record the relfrozenxids of each GTT. The oldest one is stored in myproc so that autovacuum and vacuum may use it to determine global oldest relfrozenxids and truncate clog.
The same hash table(B) in session memory stores GTT’s session level statistics, It is generated during the operations of vacuum and analyze, and used by SQL optimizer to create execution plan.
Some utility functions are added for DBA to manage GTTs.
TRUNCATE command on a GTT behaves differently from that on a normal table. The command deletes the data immediately but keeps relfilenode using lower level table lock, RowExclusiveLock, instead of AccessExclusiveLock.
Main limits of this version or future improvement: need suggestions from community:
1 VACUUM FULL and CLUSTER are not supported; any operations which may change relfilenode are disabled to GTT.
2 Sequence column is not supported in GTT for now.
3 Users defined statistics is not supported.
Details:
Requirement
The features list about global temp table:
1. global temp table (ON COMMIT clause is omitted, SQL specifies that the default behavior is ON COMMIT DELETE ROWS)
2. support with on commit DELETE ROWS
3. support with on commit PRESERVE ROWS
4. not support ON COMMIT DROP
Feature description
Global temp tables are defined just once and automatically exist (starting with empty contents) in every session that needs them.
Global temp table, each session use local buffer, read or write independent data files.
Use on commit DELETE ROWS for a transaction-specific global temp table. This is the default. database will truncate the table (delete all its rows) after each commit.
Use on commit PRESERVE ROWS Specify PRESERVE ROWS for a session-specific global temp table. databse will truncate the table (delete all its rows) when you terminate the session.
design
Global temp tables are designed based on local temp table(buffer and storage files).
Because the catalog of global temp table is shared between sessions but the data is not shared, we need to build some new mechanisms to manage non-shared data and statistics for those data.
1. catalog
1.1 relpersistence
define RELPERSISTENCEGLOBALTEMP 'g'
Mark global temp table in pg_class relpersistence to 'T'. The relpersistence of the index created on the global temp table is also set to ’T'
1.2 on commit clause
In local temp table on commit DELETE ROWS and on commit PRESERVE ROWS not store in catalog, but GTT need.
Store a bool value oncommitdelete_rows to reloptions only for GTT and share with other session.
2. gram.y
Global temp table already has a syntax tree. jush need to remove the warning message "GLOBAL is deprecated in temporary table creation" and mark relpersistence = RELPERSISTENCEGLOBALTEMP
3. STORAGE
3.1. active_gtt_shared_hash
create a hash table in shared memory to trace the GTT files that are initialized in each session.
Each hash entry contains a bitmap that records the backendid of the initialized GTT file.
With this hash table, we know which backend/session are using this GTT.
It will be used in GTT's DDL.
3.2. gtt_storage_local_hash
In each backend, create a local hashtable gtt_storage_local_hash for tracks GTT storage file and statistics.
1). GTT storage file track
When one session inserts data into a GTT for the first time, record to local hash.
2). normal clean GTT files
Use beforeshmemexit to ensure that all files for the session GTT are deleted when the session exits.
3). abnormal situation file cleanup
When a backend exits abnormally (such as oom kill), the startup process started to recovery before accept connect. startup process check and remove all GTT files before redo wal.
4 DDL
4.1 DROP GTT
One GTT table is allowed to be deleted when only the current session USES it. After get the AccessExclusiveLock of the GTT table, use active_gtt_shared_hash to check and make sure that.
4.2 ALTER GTT
Same as drop GTT.
4.3 CREATE INDEX ON GTT, DROP INDEX ON GTT
Same as drop GTT.
4.4 TRUNCATE GTT
The truncate GTT use RowExclusiveLock, not AccessExclusiveLock, Because truncate only cleans up local data file and local buffers in this session.
Also, truncate immediately deletes the data file without changing the relfilenode of the GTT table. btw, I'm not sure the implementation will be acceptable to the community.
4.5 create index on GTT
Same as drop GTT.
4.6 OTHERS
Any table operations about GTT that need to change relfilenode are disabled, such as vacuum full/cluster.
5. The statistics of GTT
1 relpages reltuples relallvisible frozenxid minmulti from pg_class
2 The statistics for each column from pg_statistic
All the above information will be stored to gtt_storage_local_hash.
When vacuum or analyze GTT's statistic will update, and the planner will use them. Of course, statistics only contain data within the current session.
5.1. View global temp table statistics
Provide pggttattstatistic get column statistics for GTT. Provide pggtt_relstats to rel statistics for GTT.
These functions are implemented in a plug-in, without add system view or function.
6. autovacuum
Autovacuum skips all GTT.
7. vacuum(frozenxid push, clog truncate)
The GTT data file contains transaction information. Queries for GTT data rely on transaction information such as clog. That's can not be vacuumed automatically by vacuum.
7.1 The session level gtt oldest frozenxid
When one GTT been create or remove, record the session level oldest frozenxid and put it into MyProc.
7.1 vacuum
When vacuum push the db's frozenxid(vacupdatedatfrozenxid), need to consider the GTT. It needs to calculate the transactions required for the GTT(search all MyPorc), to avoid the clog required by GTT being cleaned.
8. Parallel query
Planner does not produce parallel query plans for SQL related to global temp table.
9. Operability
Provide pggttattachedpid lists all the pids that are using the GTT. Provide pglistgttrelfrozenxids lists the session level oldest frozenxid of using GTT.
These functions are implemented in a plug-in, without add system view or function.
DBA can use the above function and pgterminatebackend to force the cleanup of "too old" GTT tables and sessions.
10. Limitations and todo list
10.1. alter GTT
10.2. pg_statistic_ext
10.3. remove GTT's relfilenode can not change limit.
cluster/vacuum full, optimize truncate gtt.
10.4. SERIAL column type
The GTT from different sessions share a sequence(SERIAL type).
Need each session use the sequence independently.
10.5. Locking optimization for GTT.
10.6 materialized views is not support on GTT.
What do you thinking about this proposal?
Looking forward to your feedback.
Thanks!
regards
--
Zeng Wenjing
Alibaba Group-Database Products Business Unit
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-10-11 13:50 ` Konstantin Knizhnik <[email protected]>
2019-10-12 05:16 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-17 10:18 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
0 siblings, 3 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-10-11 13:50 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; pgsql-hackers; +Cc: 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 11.10.2019 15:15, 曾文旌(义从) wrote:
> Dear Hackers,
>
> This propose a way to develop global temporary tables in PostgreSQL.
>
> I noticed that there is an "Allow temporary tables to exist as empty
> by default in all sessions" in the postgresql todolist.
> https://wiki.postgresql.org/wiki/Todo
>
> In recent years, PG community had many discussions about global temp
> table (GTT) support. Previous discussion covered the following topics:
> (1)The main benefit or function: GTT offers features like “persistent
> schema, ephemeral data”, which avoids catalog bloat and reduces
> catalog vacuum.
> (2)Whether follows ANSI concept of temporary tables
> (3)How to deal with statistics, single copy of schema definition, relcache
> (4)More can be seen in
> https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru
> (5)A recent implementation and design from Konstantin Knizhnik covered
> many functions of GTT:
> https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch
>
> However, as pointed by Konstantin himself, the implementation still
> needs functions related to CLOG, vacuum, and MVCC visibility.
>
Just to clarify.
I have now proposed several different solutions for GTT:
Shared vs. private buffers for GTT:
1. Private buffers. This is least invasive patch, requiring no changes
in relfilenodes.
2. Shared buffers. Requires changing relfilenode but supports parallel
query execution for GTT.
Access to GTT at replica:
1. Access is prohibited (as for original temp tables). No changes at all.
2. Tuples of temp tables are marked with forzen XID. Minimal changes,
rollbacks are not possible.
3. Providing special XIDs for GTT at replica. No changes in CLOG are
required, but special MVCC visibility rules are used for GTT. Current
limitation: number of transactions accessing GTT at replica is limited
by 2^32
and bitmap of correspondent size has to be maintained (tuples of GTT are
not proceeded by vacuum and not frozen, so XID horizon never moved).
So except the limitation mentioned above (which I do not consider as
critical) there is only one problem which was not addressed: maintaining
statistics for GTT.
If all of the following conditions are true:
1) GTT are used in joins
2) There are indexes defined for GTT
3) Size and histogram of GTT in different backends can significantly vary.
4) ANALYZE was explicitly called for GTT
then query execution plan built in one backend will be also used for
other backends where it can be inefficient.
I also do not consider this problem as "show stopper" for adding GTT to
Postgres.
I still do not understand the opinion of community which functionality
of GTT is considered to be most important.
But the patch with local buffers and no replica support is small enough
to become good starting point.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-12 05:16 ` Pavel Stehule <[email protected]>
2019-10-15 09:49 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 1 reply; 1002+ messages in thread
From: Pavel Stehule @ 2019-10-12 05:16 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
pá 11. 10. 2019 v 15:50 odesílatel Konstantin Knizhnik <
[email protected]> napsal:
>
>
> On 11.10.2019 15:15, 曾文旌(义从) wrote:
>
> Dear Hackers,
>
> This propose a way to develop global temporary tables in PostgreSQL.
>
> I noticed that there is an "Allow temporary tables to exist as empty by
> default in all sessions" in the postgresql todolist.
> https://wiki.postgresql.org/wiki/Todo
>
> In recent years, PG community had many discussions about global temp
> table (GTT) support. Previous discussion covered the following topics:
> (1) The main benefit or function: GTT offers features like “persistent
> schema, ephemeral data”, which avoids catalog bloat and reduces catalog
> vacuum.
> (2) Whether follows ANSI concept of temporary tables
> (3) How to deal with statistics, single copy of schema definition,
> relcache
> (4) More can be seen in
> https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru
> (5) A recent implementation and design from Konstantin Knizhnik covered
> many functions of GTT:
> https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch
>
> However, as pointed by Konstantin himself, the implementation still needs
> functions related to CLOG, vacuum, and MVCC visibility.
>
>
> Just to clarify.
> I have now proposed several different solutions for GTT:
>
> Shared vs. private buffers for GTT:
> 1. Private buffers. This is least invasive patch, requiring no changes in
> relfilenodes.
> 2. Shared buffers. Requires changing relfilenode but supports parallel
> query execution for GTT.
>
This is important argument for using share buffers. Maybe the best is mix
of both - store files in temporal tablespace, but using share buffers.
More, it can be accessible for autovacuum.
>
> Access to GTT at replica:
> 1. Access is prohibited (as for original temp tables). No changes at all.
> 2. Tuples of temp tables are marked with forzen XID. Minimal changes,
> rollbacks are not possible.
> 3. Providing special XIDs for GTT at replica. No changes in CLOG are
> required, but special MVCC visibility rules are used for GTT. Current
> limitation: number of transactions accessing GTT at replica is limited by
> 2^32
> and bitmap of correspondent size has to be maintained (tuples of GTT are
> not proceeded by vacuum and not frozen, so XID horizon never moved).
>
> So except the limitation mentioned above (which I do not consider as
> critical) there is only one problem which was not addressed: maintaining
> statistics for GTT.
> If all of the following conditions are true:
>
> 1) GTT are used in joins
> 2) There are indexes defined for GTT
> 3) Size and histogram of GTT in different backends can significantly vary.
> 4) ANALYZE was explicitly called for GTT
>
> then query execution plan built in one backend will be also used for other
> backends where it can be inefficient.
> I also do not consider this problem as "show stopper" for adding GTT to
> Postgres.
>
The last issue is show stopper in my mind. It really depends on usage.
There are situation where shared statistics are ok (and maybe good
solution), and other situation, where shared statistics are just unusable.
Regards
Pavel
> I still do not understand the opinion of community which functionality of
> GTT is considered to be most important.
> But the patch with local buffers and no replica support is small enough to
> become good starting point.
>
>
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-12 05:16 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-10-15 09:49 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-10-15 09:49 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?5byg5bm/6IifKOaYjuiZmik=?= <[email protected]>; =?UTF-8?B?6LW15q6/5aWO?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年10月12日 下午1:16,Pavel Stehule <[email protected]> 写道:
>
>
>
> pá 11. 10. 2019 v 15:50 odesílatel Konstantin Knizhnik <[email protected] <mailto:[email protected]>> napsal:
>
>
> On 11.10.2019 15:15, 曾文旌(义从) wrote:
>> Dear Hackers,
>>
>> This propose a way to develop global temporary tables in PostgreSQL.
>>
>> I noticed that there is an "Allow temporary tables to exist as empty by default in all sessions" in the postgresql todolist.
>> https://wiki.postgresql.org/wiki/Todo <https://wiki.postgresql.org/wiki/Todo;
>>
>> In recent years, PG community had many discussions about global temp table (GTT) support. Previous discussion covered the following topics:
>> (1) The main benefit or function: GTT offers features like “persistent schema, ephemeral data”, which avoids catalog bloat and reduces catalog vacuum.
>> (2) Whether follows ANSI concept of temporary tables
>> (3) How to deal with statistics, single copy of schema definition, relcache
>> (4) More can be seen in https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru <https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru;
>> (5) A recent implementation and design from Konstantin Knizhnik covered many functions of GTT: https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch <https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch;
>>
>> However, as pointed by Konstantin himself, the implementation still needs functions related to CLOG, vacuum, and MVCC visibility.
>>
>
> Just to clarify.
> I have now proposed several different solutions for GTT:
>
> Shared vs. private buffers for GTT:
> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
>
> This is important argument for using share buffers. Maybe the best is mix of both - store files in temporal tablespace, but using share buffers. More, it can be accessible for autovacuum.
>
> Access to GTT at replica:
> 1. Access is prohibited (as for original temp tables). No changes at all.
> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
>
> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
> If all of the following conditions are true:
>
> 1) GTT are used in joins
> 2) There are indexes defined for GTT
> 3) Size and histogram of GTT in different backends can significantly vary.
> 4) ANALYZE was explicitly called for GTT
>
> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
>
> The last issue is show stopper in my mind. It really depends on usage. There are situation where shared statistics are ok (and maybe good solution), and other situation, where shared statistics are just unusable.
This proposal calculates and stores independent statistics(relpages reltuples and histogram of GTT) for the gtt data within each session, ensuring optimizer can get accurate statistics.
> Regards
>
> Pavel
>
>
>
> I still do not understand the opinion of community which functionality of GTT is considered to be most important.
> But the patch with local buffers and no replica support is small enough to become good starting point.
>
>
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com <http://www.postgrespro.com/;
> The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-17 10:18 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 0 replies; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-10-17 10:18 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>
> 2019年10月11日 下午9:50,Konstantin Knizhnik <[email protected]> 写道:
>
>
>
> On 11.10.2019 15:15, 曾文旌(义从) wrote:
>> Dear Hackers,
>>
>> This propose a way to develop global temporary tables in PostgreSQL.
>>
>> I noticed that there is an "Allow temporary tables to exist as empty by default in all sessions" in the postgresql todolist.
>> https://wiki.postgresql.org/wiki/Todo <https://wiki.postgresql.org/wiki/Todo;
>>
>> In recent years, PG community had many discussions about global temp table (GTT) support. Previous discussion covered the following topics:
>> (1) The main benefit or function: GTT offers features like “persistent schema, ephemeral data”, which avoids catalog bloat and reduces catalog vacuum.
>> (2) Whether follows ANSI concept of temporary tables
>> (3) How to deal with statistics, single copy of schema definition, relcache
>> (4) More can be seen in https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru <https://www.postgresql.org/message-id/73954ab7-44d3-b37b-81a3-69bdcbb446f7%40postgrespro.ru;
>> (5) A recent implementation and design from Konstantin Knizhnik covered many functions of GTT: https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch <https://www.postgresql.org/message-id/attachment/103265/global_private_temp-1.patch;
>>
>> However, as pointed by Konstantin himself, the implementation still needs functions related to CLOG, vacuum, and MVCC visibility.
>>
>
> Just to clarify.
> I have now proposed several different solutions for GTT:
>
> Shared vs. private buffers for GTT:
> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
>
> Access to GTT at replica:
> 1. Access is prohibited (as for original temp tables). No changes at all.
> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
>
> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
> If all of the following conditions are true:
>
> 1) GTT are used in joins
> 2) There are indexes defined for GTT
> 3) Size and histogram of GTT in different backends can significantly vary.
> 4) ANALYZE was explicitly called for GTT
>
> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
When session A writes 10000000 rows of data to gtt X, session B also uses X at the same time and it has 100 rows of different data. If B uses analyze to count the statistics of 100000 rows of data and updates it to catalog.
Obviously, session A will get inaccurate query plan based on misaligned statistics when calculating the query plan for X related queries. Session A may think that table X is too small to be worth using index scan, but it is not. Each session needs to get the statistics of the self data to make the query plan.
> I still do not understand the opinion of community which functionality of GTT is considered to be most important.
> But the patch with local buffers and no replica support is small enough to become good starting point.
Yes ,the first step, we focus on complete basic functions of gtt (dml ddl index on gtt (MVCC visibility rules) storage).
Abnormal statistics can cause problems with index selection on gtt, so index on gtt and accurate statistical information is necessary.
>
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com <http://www.postgrespro.com/;
> The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-25 15:01 ` Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2 siblings, 2 replies; 1002+ messages in thread
From: Robert Haas @ 2019-10-25 15:01 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
<[email protected]> wrote:
> Just to clarify.
> I have now proposed several different solutions for GTT:
>
> Shared vs. private buffers for GTT:
> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
I vote for #1. I think parallel query for temp objects may be a
desirable feature, but I don't think it should be the job of a patch
implementing GTTs to make it happen. In fact, I think it would be an
actively bad idea, because I suspect that if we do eventually support
temp relations for parallel query, we're going to want a solution that
is shared between regular temp tables and global temp tables, not
separate solutions for each.
> Access to GTT at replica:
> 1. Access is prohibited (as for original temp tables). No changes at all.
> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
I again vote for #1. A GTT is defined to allow data to be visible only
within one session -- so what does it even mean for the data to be
accessible on a replica?
> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
> If all of the following conditions are true:
>
> 1) GTT are used in joins
> 2) There are indexes defined for GTT
> 3) Size and histogram of GTT in different backends can significantly vary.
> 4) ANALYZE was explicitly called for GTT
>
> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
I think that's *definitely* a show stopper.
> I still do not understand the opinion of community which functionality of GTT is considered to be most important.
> But the patch with local buffers and no replica support is small enough to become good starting point.
Well, it seems we now have two patches for this feature. I guess we
need to figure out which one is better, and whether it's possible for
the two efforts to be merged, rather than having two different teams
hacking on separate code bases.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-10-25 15:13 ` Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: Pavel Stehule @ 2019-10-25 15:13 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
pá 25. 10. 2019 v 17:01 odesílatel Robert Haas <[email protected]>
napsal:
> On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
> <[email protected]> wrote:
> > Just to clarify.
> > I have now proposed several different solutions for GTT:
> >
> > Shared vs. private buffers for GTT:
> > 1. Private buffers. This is least invasive patch, requiring no changes
> in relfilenodes.
> > 2. Shared buffers. Requires changing relfilenode but supports parallel
> query execution for GTT.
>
> I vote for #1. I think parallel query for temp objects may be a
> desirable feature, but I don't think it should be the job of a patch
> implementing GTTs to make it happen. In fact, I think it would be an
> actively bad idea, because I suspect that if we do eventually support
> temp relations for parallel query, we're going to want a solution that
> is shared between regular temp tables and global temp tables, not
> separate solutions for each.
>
> > Access to GTT at replica:
> > 1. Access is prohibited (as for original temp tables). No changes at all.
> > 2. Tuples of temp tables are marked with forzen XID. Minimal changes,
> rollbacks are not possible.
> > 3. Providing special XIDs for GTT at replica. No changes in CLOG are
> required, but special MVCC visibility rules are used for GTT. Current
> limitation: number of transactions accessing GTT at replica is limited by
> 2^32
> > and bitmap of correspondent size has to be maintained (tuples of GTT are
> not proceeded by vacuum and not frozen, so XID horizon never moved).
>
> I again vote for #1. A GTT is defined to allow data to be visible only
> within one session -- so what does it even mean for the data to be
> accessible on a replica?
>
why not? there are lot of sessions on replica servers. One usage of temp
tables is fixing estimation errors. You can create temp table with partial
query result, run ANALYZE and evaluate other steps. Now this case is not
possible on replica servers.
One motivation for GTT is decreasing port costs from Oracle. But other
motivations, like do more complex calculations on replica are valid and
valuable.
> > So except the limitation mentioned above (which I do not consider as
> critical) there is only one problem which was not addressed: maintaining
> statistics for GTT.
> > If all of the following conditions are true:
> >
> > 1) GTT are used in joins
> > 2) There are indexes defined for GTT
> > 3) Size and histogram of GTT in different backends can significantly
> vary.
> > 4) ANALYZE was explicitly called for GTT
> >
> > then query execution plan built in one backend will be also used for
> other backends where it can be inefficient.
> > I also do not consider this problem as "show stopper" for adding GTT to
> Postgres.
>
> I think that's *definitely* a show stopper.
>
> > I still do not understand the opinion of community which functionality
> of GTT is considered to be most important.
> > But the patch with local buffers and no replica support is small enough
> to become good starting point.
>
> Well, it seems we now have two patches for this feature. I guess we
> need to figure out which one is better, and whether it's possible for
> the two efforts to be merged, rather than having two different teams
> hacking on separate code bases.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-10-28 12:07 ` Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: Robert Haas @ 2019-10-28 12:07 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Fri, Oct 25, 2019 at 11:14 AM Pavel Stehule <[email protected]> wrote:
>> > Access to GTT at replica:
>> > 1. Access is prohibited (as for original temp tables). No changes at all.
>> > 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
>> > 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
>> > and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
>>
>> I again vote for #1. A GTT is defined to allow data to be visible only
>> within one session -- so what does it even mean for the data to be
>> accessible on a replica?
>
> why not? there are lot of sessions on replica servers. One usage of temp tables is fixing estimation errors. You can create temp table with partial query result, run ANALYZE and evaluate other steps. Now this case is not possible on replica servers.
>
> One motivation for GTT is decreasing port costs from Oracle. But other motivations, like do more complex calculations on replica are valid and valuable.
Hmm, I think I was slightly confused when I wrote my previous
response. I now see that what was under discussion was not making data
from the master visible on the standbys, which really wouldn't make
any sense, but rather allowing standby sessions to also use the GTT,
each with its own local copy of the data. I don't think that's a bad
feature, but look how invasive the required changes are. Not allowing
rollbacks seems dead on arrival; an abort would be able to leave the
table and index mutually inconsistent. A separate XID space would be
a real solution, perhaps, but it would be *extremely* complicated and
invasive to implement.
One thing that I've learned over and over again as a developer is that
you get a lot more done if you tackle one problem at a time. GTTs are
a sufficiently-large problem all by themselves; a major reworking of
the way XIDs work might be a good project to undertake at some point,
but it doesn't make any sense to incorporate that into the GTT
project, which is otherwise about a mostly-separate set of issues.
Let's not try to solve more problems at once than strictly necessary.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-10-28 13:37 ` Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-10-28 13:37 UTC (permalink / raw)
To: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 28.10.2019 15:07, Robert Haas wrote:
> On Fri, Oct 25, 2019 at 11:14 AM Pavel Stehule <[email protected]> wrote:
>>>> Access to GTT at replica:
>>>> 1. Access is prohibited (as for original temp tables). No changes at all.
>>>> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
>>>> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
>>>> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
>>> I again vote for #1. A GTT is defined to allow data to be visible only
>>> within one session -- so what does it even mean for the data to be
>>> accessible on a replica?
>> why not? there are lot of sessions on replica servers. One usage of temp tables is fixing estimation errors. You can create temp table with partial query result, run ANALYZE and evaluate other steps. Now this case is not possible on replica servers.
>>
>> One motivation for GTT is decreasing port costs from Oracle. But other motivations, like do more complex calculations on replica are valid and valuable.
> Hmm, I think I was slightly confused when I wrote my previous
> response. I now see that what was under discussion was not making data
> from the master visible on the standbys, which really wouldn't make
> any sense, but rather allowing standby sessions to also use the GTT,
> each with its own local copy of the data. I don't think that's a bad
> feature, but look how invasive the required changes are. Not allowing
> rollbacks seems dead on arrival; an abort would be able to leave the
> table and index mutually inconsistent. A separate XID space would be
> a real solution, perhaps, but it would be *extremely* complicated and
> invasive to implement.
Sorry, but both statements are not true.
As I mentioned before, I have implemented both solutions.
I am not sure how vital is lack of aborts for transactions working with
GTT at replica.
Some people said that there is no sense in aborts of read-only
transactions at replica (despite to the fact that them are saving
intermediate results in GTT).
Some people said something similar with your's "dead on arrival".
But inconsistency is not possible: if such transaction is really
aborted, then backend is terminated and nobody can see this inconsistency.
Concerning second alternative: you can check yourself that it is not
*extremely* complicated and invasive.
I extracted changes which are related with handling transactions at
replica and attached them to this mail.
It is just 500 lines (including diff contexts). Certainly there are some
limitation of this implementation: number of transactions working with
GTT at replica is limited by 2^32
and since GTT tuples are not frozen, analog of GTT CLOG kept in memory
is never truncated.
>
> One thing that I've learned over and over again as a developer is that
> you get a lot more done if you tackle one problem at a time. GTTs are
> a sufficiently-large problem all by themselves; a major reworking of
> the way XIDs work might be a good project to undertake at some point,
> but it doesn't make any sense to incorporate that into the GTT
> project, which is otherwise about a mostly-separate set of issues.
> Let's not try to solve more problems at once than strictly necessary.
>
I agree with it and think that implementation of GTT with private
buffers and no replica access is good starting point.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] replica-gtt-xact.diff (18.2K, ../../[email protected]/2-replica-gtt-xact.diff)
download | inline diff:
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index e954482..2f5f5ef 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -444,7 +444,7 @@ heapgetpage(TableScanDesc sscan, BlockNumber page)
if (all_visible)
valid = true;
else
- valid = HeapTupleSatisfiesVisibility(&loctup, snapshot, buffer);
+ valid = HeapTupleSatisfiesVisibility(scan->rs_base.rs_rd, &loctup, snapshot, buffer);
CheckForSerializableConflictOut(valid, scan->rs_base.rs_rd,
&loctup, buffer, snapshot);
@@ -664,7 +664,8 @@ heapgettup(HeapScanDesc scan,
/*
* if current tuple qualifies, return it.
*/
- valid = HeapTupleSatisfiesVisibility(tuple,
+ valid = HeapTupleSatisfiesVisibility(scan->rs_base.rs_rd,
+ tuple,
snapshot,
scan->rs_cbuf);
@@ -1474,7 +1475,7 @@ heap_fetch(Relation relation,
/*
* check tuple visibility, then release lock
*/
- valid = HeapTupleSatisfiesVisibility(tuple, snapshot, buffer);
+ valid = HeapTupleSatisfiesVisibility(relation, tuple, snapshot, buffer);
if (valid)
PredicateLockTuple(relation, tuple, snapshot);
@@ -1609,7 +1610,7 @@ heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer,
if (!skip)
{
/* If it's visible per the snapshot, we must return it */
- valid = HeapTupleSatisfiesVisibility(heapTuple, snapshot, buffer);
+ valid = HeapTupleSatisfiesVisibility(relation, heapTuple, snapshot, buffer);
CheckForSerializableConflictOut(valid, relation, heapTuple,
buffer, snapshot);
@@ -1749,7 +1750,7 @@ heap_get_latest_tid(TableScanDesc sscan,
* Check tuple visibility; if visible, set it as the new result
* candidate.
*/
- valid = HeapTupleSatisfiesVisibility(&tp, snapshot, buffer);
+ valid = HeapTupleSatisfiesVisibility(relation, &tp, snapshot, buffer);
CheckForSerializableConflictOut(valid, relation, &tp, buffer, snapshot);
if (valid)
*tid = ctid;
@@ -1846,6 +1847,14 @@ ReleaseBulkInsertStatePin(BulkInsertState bistate)
}
+static TransactionId
+GetTransactionId(Relation relation)
+{
+ return relation->rd_rel->relpersistence == RELPERSISTENCE_SESSION && RecoveryInProgress()
+ ? GetReplicaTransactionId()
+ : GetCurrentTransactionId();
+}
+
/*
* heap_insert - insert tuple into a heap
*
@@ -1868,7 +1877,7 @@ void
heap_insert(Relation relation, HeapTuple tup, CommandId cid,
int options, BulkInsertState bistate)
{
- TransactionId xid = GetCurrentTransactionId();
+ TransactionId xid = GetTransactionId(relation);
HeapTuple heaptup;
Buffer buffer;
Buffer vmbuffer = InvalidBuffer;
@@ -2105,7 +2114,7 @@ void
heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
CommandId cid, int options, BulkInsertState bistate)
{
- TransactionId xid = GetCurrentTransactionId();
+ TransactionId xid = GetTransactionId(relation);
HeapTuple *heaptuples;
int i;
int ndone;
@@ -2444,7 +2453,7 @@ heap_delete(Relation relation, ItemPointer tid,
TM_FailureData *tmfd, bool changingPart)
{
TM_Result result;
- TransactionId xid = GetCurrentTransactionId();
+ TransactionId xid = GetTransactionId(relation);
ItemId lp;
HeapTupleData tp;
Page page;
@@ -2509,7 +2518,7 @@ heap_delete(Relation relation, ItemPointer tid,
tp.t_self = *tid;
l1:
- result = HeapTupleSatisfiesUpdate(&tp, cid, buffer);
+ result = HeapTupleSatisfiesUpdate(relation, &tp, cid, buffer);
if (result == TM_Invisible)
{
@@ -2628,7 +2637,7 @@ l1:
if (crosscheck != InvalidSnapshot && result == TM_Ok)
{
/* Perform additional check for transaction-snapshot mode RI updates */
- if (!HeapTupleSatisfiesVisibility(&tp, crosscheck, buffer))
+ if (!HeapTupleSatisfiesVisibility(relation, &tp, crosscheck, buffer))
result = TM_Updated;
}
@@ -2895,7 +2904,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
TM_FailureData *tmfd, LockTupleMode *lockmode)
{
TM_Result result;
- TransactionId xid = GetCurrentTransactionId();
+ TransactionId xid = GetTransactionId(relation);
Bitmapset *hot_attrs;
Bitmapset *key_attrs;
Bitmapset *id_attrs;
@@ -3065,7 +3074,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
l2:
checked_lockers = false;
locker_remains = false;
- result = HeapTupleSatisfiesUpdate(&oldtup, cid, buffer);
+ result = HeapTupleSatisfiesUpdate(relation, &oldtup, cid, buffer);
/* see below about the "no wait" case */
Assert(result != TM_BeingModified || wait);
@@ -3258,7 +3267,7 @@ l2:
if (crosscheck != InvalidSnapshot && result == TM_Ok)
{
/* Perform additional check for transaction-snapshot mode RI updates */
- if (!HeapTupleSatisfiesVisibility(&oldtup, crosscheck, buffer))
+ if (!HeapTupleSatisfiesVisibility(relation, &oldtup, crosscheck, buffer))
{
result = TM_Updated;
Assert(!ItemPointerEquals(&oldtup.t_self, &oldtup.t_data->t_ctid));
@@ -4014,7 +4023,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
tuple->t_tableOid = RelationGetRelid(relation);
l3:
- result = HeapTupleSatisfiesUpdate(tuple, cid, *buffer);
+ result = HeapTupleSatisfiesUpdate(relation, tuple, cid, *buffer);
if (result == TM_Invisible)
{
@@ -4189,7 +4198,7 @@ l3:
TM_Result res;
res = heap_lock_updated_tuple(relation, tuple, &t_ctid,
- GetCurrentTransactionId(),
+ GetTransactionId(relation),
mode);
if (res != TM_Ok)
{
@@ -4437,7 +4446,7 @@ l3:
TM_Result res;
res = heap_lock_updated_tuple(relation, tuple, &t_ctid,
- GetCurrentTransactionId(),
+ GetTransactionId(relation),
mode);
if (res != TM_Ok)
{
@@ -4546,7 +4555,7 @@ failed:
* state if multixact.c elogs.
*/
compute_new_xmax_infomask(xmax, old_infomask, tuple->t_data->t_infomask2,
- GetCurrentTransactionId(), mode, false,
+ GetTransactionId(relation), mode, false,
&xid, &new_infomask, &new_infomask2);
START_CRIT_SECTION();
@@ -5566,7 +5575,7 @@ heap_finish_speculative(Relation relation, ItemPointer tid)
void
heap_abort_speculative(Relation relation, ItemPointer tid)
{
- TransactionId xid = GetCurrentTransactionId();
+ TransactionId xid = GetTransactionId(relation);
ItemId lp;
HeapTupleData tp;
Page page;
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..67a553a 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -226,7 +226,8 @@ heapam_tuple_satisfies_snapshot(Relation rel, TupleTableSlot *slot,
* Caller should be holding pin, but not lock.
*/
LockBuffer(bslot->buffer, BUFFER_LOCK_SHARE);
- res = HeapTupleSatisfiesVisibility(bslot->base.tuple, snapshot,
+
+ res = HeapTupleSatisfiesVisibility(rel, bslot->base.tuple, snapshot,
bslot->buffer);
LockBuffer(bslot->buffer, BUFFER_LOCK_UNLOCK);
@@ -673,6 +674,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* init fork of an unlogged relation.
*/
if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION ||
(rel->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
forkNum == INIT_FORKNUM))
log_smgrcreate(newrnode, forkNum);
@@ -2162,7 +2164,7 @@ heapam_scan_bitmap_next_block(TableScanDesc scan,
loctup.t_len = ItemIdGetLength(lp);
loctup.t_tableOid = scan->rs_rd->rd_id;
ItemPointerSet(&loctup.t_self, page, offnum);
- valid = HeapTupleSatisfiesVisibility(&loctup, snapshot, buffer);
+ valid = HeapTupleSatisfiesVisibility(scan->rs_rd, &loctup, snapshot, buffer);
if (valid)
{
hscan->rs_vistuples[ntup++] = offnum;
@@ -2482,7 +2484,7 @@ SampleHeapTupleVisible(TableScanDesc scan, Buffer buffer,
else
{
/* Otherwise, we have to check the tuple individually. */
- return HeapTupleSatisfiesVisibility(tuple, scan->rs_snapshot,
+ return HeapTupleSatisfiesVisibility(scan->rs_rd, tuple, scan->rs_snapshot,
buffer);
}
}
diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c
index 537e681..3076f6a 100644
--- a/src/backend/access/heap/heapam_visibility.c
+++ b/src/backend/access/heap/heapam_visibility.c
@@ -77,6 +77,7 @@
#include "utils/combocid.h"
#include "utils/snapmgr.h"
+static bool TempTupleSatisfiesVisibility(HeapTuple htup, CommandId curcid, Buffer buffer);
/*
* SetHintBits()
@@ -454,7 +455,7 @@ HeapTupleSatisfiesToast(HeapTuple htup, Snapshot snapshot,
* test for it themselves.)
*/
TM_Result
-HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
+HeapTupleSatisfiesUpdate(Relation relation, HeapTuple htup, CommandId curcid,
Buffer buffer)
{
HeapTupleHeader tuple = htup->t_data;
@@ -462,6 +463,13 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
Assert(ItemPointerIsValid(&htup->t_self));
Assert(htup->t_tableOid != InvalidOid);
+ if (relation->rd_rel->relpersistence == RELPERSISTENCE_SESSION && RecoveryInProgress())
+ {
+ AccessTempRelationAtReplica = true;
+ return TempTupleSatisfiesVisibility(htup, curcid, buffer) ? TM_Ok : TM_Invisible;
+ }
+ AccessTempRelationAtReplica = false;
+
if (!HeapTupleHeaderXminCommitted(tuple))
{
if (HeapTupleHeaderXminInvalid(tuple))
@@ -1677,6 +1685,59 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
}
/*
+ * TempTupleSatisfiesVisibility
+ * True iff global temp table tuple is visible for the current transaction.
+ *
+ * Temporary tables are visible only for current backend, so there is no need to
+ * handle cases with tuples committed by other backends. We only need to exclude
+ * modifications done by aborted transactions or after start of table scan.
+ *
+ */
+static bool
+TempTupleSatisfiesVisibility(HeapTuple htup, CommandId curcid, Buffer buffer)
+{
+ HeapTupleHeader tuple = htup->t_data;
+ TransactionId xmin;
+ TransactionId xmax;
+
+ Assert(ItemPointerIsValid(&htup->t_self));
+ Assert(htup->t_tableOid != InvalidOid);
+
+ if (HeapTupleHeaderXminInvalid(tuple))
+ return false;
+
+ xmin = HeapTupleHeaderGetRawXmin(tuple);
+
+ if (IsReplicaTransactionAborted(xmin))
+ return false;
+
+ if (IsReplicaCurrentTransactionId(xmin)
+ && HeapTupleHeaderGetCmin(tuple) >= curcid)
+ {
+ return false; /* inserted after scan started */
+ }
+
+ if (tuple->t_infomask & HEAP_XMAX_INVALID) /* xid invalid */
+ return true;
+
+ if (HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)) /* not deleter */
+ return true;
+
+ xmax = (tuple->t_infomask & HEAP_XMAX_IS_MULTI)
+ ? HeapTupleGetUpdateXid(tuple)
+ : HeapTupleHeaderGetRawXmax(tuple);
+
+ if (IsReplicaTransactionAborted(xmax))
+ return true; /* updating subtransaction aborted */
+
+ if (!IsReplicaCurrentTransactionId(xmax))
+ return false; /* updating transaction committed */
+
+ return (HeapTupleHeaderGetCmax(tuple) >= curcid); /* updated after scan started */
+}
+
+
+/*
* HeapTupleSatisfiesVisibility
* True iff heap tuple satisfies a time qual.
*
@@ -1687,8 +1748,15 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot,
* if so, the indicated buffer is marked dirty.
*/
bool
-HeapTupleSatisfiesVisibility(HeapTuple tup, Snapshot snapshot, Buffer buffer)
+HeapTupleSatisfiesVisibility(Relation relation, HeapTuple tup, Snapshot snapshot, Buffer buffer)
{
+ if (relation->rd_rel->relpersistence == RELPERSISTENCE_SESSION && RecoveryInProgress())
+ {
+ AccessTempRelationAtReplica = true;
+ return TempTupleSatisfiesVisibility(tup, snapshot->curcid, buffer);
+ }
+ AccessTempRelationAtReplica = false;
+
switch (snapshot->snapshot_type)
{
case SNAPSHOT_MVCC:
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
index 365ddfb..bce9c4a 100644
--- a/src/backend/access/transam/transam.c
+++ b/src/backend/access/transam/transam.c
@@ -22,6 +22,7 @@
#include "access/clog.h"
#include "access/subtrans.h"
#include "access/transam.h"
+#include "access/xact.h"
#include "utils/snapmgr.h"
/*
@@ -126,6 +127,9 @@ TransactionIdDidCommit(TransactionId transactionId)
{
XidStatus xidstatus;
+ if (AccessTempRelationAtReplica)
+ return !IsReplicaCurrentTransactionId(transactionId) && !IsReplicaTransactionAborted(transactionId);
+
xidstatus = TransactionLogFetch(transactionId);
/*
@@ -182,6 +186,9 @@ TransactionIdDidAbort(TransactionId transactionId)
{
XidStatus xidstatus;
+ if (AccessTempRelationAtReplica)
+ return IsReplicaTransactionAborted(transactionId);
+
xidstatus = TransactionLogFetch(transactionId);
/*
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 9162286..cf6bf4e 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -192,6 +192,7 @@ typedef struct TransactionStateData
int parallelModeLevel; /* Enter/ExitParallelMode counter */
bool chain; /* start a new block after this one */
struct TransactionStateData *parent; /* back link to parent */
+ TransactionId replicaTransactionId; /* pseudo XID for inserting data in global temp tables at replica */
} TransactionStateData;
typedef TransactionStateData *TransactionState;
@@ -286,6 +287,12 @@ typedef struct XactCallbackItem
static XactCallbackItem *Xact_callbacks = NULL;
+static TransactionId replicaTransIdCount = FirstNormalTransactionId;
+static TransactionId replicaTopTransId;
+static Bitmapset* replicaAbortedXids;
+
+bool AccessTempRelationAtReplica;
+
/*
* List of add-on start- and end-of-subxact callbacks
*/
@@ -443,6 +450,48 @@ GetCurrentTransactionIdIfAny(void)
}
/*
+ * Transactions at replica can update only global temporary tables.
+ * Them are assigned backend-local XIDs which are independent from normal XIDs received from primary node.
+ * So tuples of temporary tables at replica requires special visibility rules.
+ *
+ * XIDs for such transactions at replica are created on demand (when tuple of temp table is updated).
+ * XID wrap-around and adjusting XID horizon is not supported. So number of such transactions at replica is
+ * limited by 2^32 and require up to 2^29 in-memory bitmap for marking aborted transactions.
+ */
+TransactionId
+GetReplicaTransactionId(void)
+{
+ TransactionState s = CurrentTransactionState;
+ if (!TransactionIdIsValid(s->replicaTransactionId))
+ s->replicaTransactionId = ++replicaTransIdCount;
+ return s->replicaTransactionId;
+}
+
+/*
+ * At replica transaction can update only temporary tables
+ * and them are assigned special XIDs (not related with normal XIDs received from primary node).
+ * As far as we see only own transaction it is not necessary to mark committed transactions.
+ * Only marking aborted ones is enough. All transactions which are not marked as aborted are treated as
+ * committed or self in-progress transactions.
+ */
+bool
+IsReplicaTransactionAborted(TransactionId xid)
+{
+ return bms_is_member(xid, replicaAbortedXids);
+}
+
+/*
+ * As far as XIDs for transactions at replica are generated individually for each backends,
+ * we can check that XID belongs to the current transaction or any of its subtransactions by
+ * just comparing it with XID of top transaction.
+ */
+bool
+IsReplicaCurrentTransactionId(TransactionId xid)
+{
+ return xid > replicaTopTransId;
+}
+
+/*
* GetTopFullTransactionId
*
* This will return the FullTransactionId of the main transaction, assigning
@@ -855,6 +904,9 @@ TransactionIdIsCurrentTransactionId(TransactionId xid)
{
TransactionState s;
+ if (AccessTempRelationAtReplica)
+ return IsReplicaCurrentTransactionId(xid);
+
/*
* We always say that BootstrapTransactionId is "not my transaction ID"
* even when it is (ie, during bootstrap). Along with the fact that
@@ -1206,7 +1258,7 @@ static TransactionId
RecordTransactionCommit(void)
{
TransactionId xid = GetTopTransactionIdIfAny();
- bool markXidCommitted = TransactionIdIsValid(xid);
+ bool markXidCommitted = TransactionIdIsNormal(xid);
TransactionId latestXid = InvalidTransactionId;
int nrels;
RelFileNode *rels;
@@ -1624,7 +1676,7 @@ RecordTransactionAbort(bool isSubXact)
* rels to delete (note that this routine is not responsible for actually
* deleting 'em). We cannot have any child XIDs, either.
*/
- if (!TransactionIdIsValid(xid))
+ if (!TransactionIdIsNormal(xid))
{
/* Reset XactLastRecEnd until the next transaction writes something */
if (!isSubXact)
@@ -1892,6 +1944,8 @@ StartTransaction(void)
s = &TopTransactionStateData;
CurrentTransactionState = s;
+ replicaTopTransId = replicaTransIdCount;
+
Assert(!FullTransactionIdIsValid(XactTopFullTransactionId));
/* check the current transaction state */
@@ -1905,6 +1959,7 @@ StartTransaction(void)
*/
s->state = TRANS_START;
s->fullTransactionId = InvalidFullTransactionId; /* until assigned */
+ s->replicaTransactionId = InvalidTransactionId; /* until assigned */
/* Determine if statements are logged in this transaction */
xact_is_sampled = log_xact_sample_rate != 0 &&
@@ -2570,6 +2625,14 @@ AbortTransaction(void)
/* Prevent cancel/die interrupt while cleaning up */
HOLD_INTERRUPTS();
+ /* Mark transactions involved global temp table at replica as aborted */
+ if (TransactionIdIsValid(s->replicaTransactionId))
+ {
+ MemoryContext ctx = MemoryContextSwitchTo(TopMemoryContext);
+ replicaAbortedXids = bms_add_member(replicaAbortedXids, s->replicaTransactionId);
+ MemoryContextSwitchTo(ctx);
+ }
+
/* Make sure we have a valid memory context and resource owner */
AtAbort_Memory();
AtAbort_ResourceOwner();
@@ -2991,6 +3054,9 @@ CommitTransactionCommand(void)
* and then clean up.
*/
case TBLOCK_ABORT_PENDING:
+ if (GetCurrentTransactionIdIfAny() == FrozenTransactionId)
+ elog(FATAL, "Transaction is aborted at standby");
+
AbortTransaction();
CleanupTransaction();
s->blockState = TBLOCK_DEFAULT;
@@ -4880,6 +4946,14 @@ AbortSubTransaction(void)
/* Prevent cancel/die interrupt while cleaning up */
HOLD_INTERRUPTS();
+ /* Mark transactions involved global temp table at replica as aborted */
+ if (TransactionIdIsValid(s->replicaTransactionId))
+ {
+ MemoryContext ctx = MemoryContextSwitchTo(TopMemoryContext);
+ replicaAbortedXids = bms_add_member(replicaAbortedXids, s->replicaTransactionId);
+ MemoryContextSwitchTo(ctx);
+ }
+
/* Make sure we have a valid memory context and resource owner */
AtSubAbort_Memory();
AtSubAbort_ResourceOwner();
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-28 16:40 ` Robert Haas <[email protected]>
2019-10-29 08:04 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
0 siblings, 2 replies; 1002+ messages in thread
From: Robert Haas @ 2019-10-28 16:40 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Pavel Stehule <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Mon, Oct 28, 2019 at 9:37 AM Konstantin Knizhnik
<[email protected]> wrote:
> Sorry, but both statements are not true.
Well, I think they are true.
> I am not sure how vital is lack of aborts for transactions working with
> GTT at replica.
> Some people said that there is no sense in aborts of read-only
> transactions at replica (despite to the fact that them are saving
> intermediate results in GTT).
> Some people said something similar with your's "dead on arrival".
> But inconsistency is not possible: if such transaction is really
> aborted, then backend is terminated and nobody can see this inconsistency.
Aborting the current transaction is a very different thing from
terminating the backend.
Also, the idea that there is no sense in aborts of read-only
transactions on a replica seems totally wrong. Suppose that you insert
a row into the table and then you go to insert a row in each index,
but one of the index inserts fails - duplicate key, out of memory
error, I/O error, whatever. Now the table and the index are
inconsistent. Normally, we're protected against this by MVCC, but if
you use a solution that breaks MVCC by using the same XID for all
transactions, then it can happen.
> Concerning second alternative: you can check yourself that it is not
> *extremely* complicated and invasive.
> I extracted changes which are related with handling transactions at
> replica and attached them to this mail.
> It is just 500 lines (including diff contexts). Certainly there are some
> limitation of this implementation: number of transactions working with
> GTT at replica is limited by 2^32
> and since GTT tuples are not frozen, analog of GTT CLOG kept in memory
> is never truncated.
I admit that this patch is not lengthy, but there remains the question
of whether it is correct. It's possible that the problem isn't as
complicated as I think it is, but I do think there are quite a number
of reasons why this patch wouldn't be considered acceptable...
> I agree with it and think that implementation of GTT with private
> buffers and no replica access is good starting point.
...but given that we seem to agree on this point, perhaps it isn't
necessary to argue about those things right now.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-10-29 08:04 ` Konstantin Knizhnik <[email protected]>
1 sibling, 0 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-10-29 08:04 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Pavel Stehule <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 28.10.2019 19:40, Robert Haas wrote:
> Aborting the current transaction is a very different thing from
> terminating the backend.
>
> Also, the idea that there is no sense in aborts of read-only
> transactions on a replica seems totally wrong. Suppose that you insert
> a row into the table and then you go to insert a row in each index,
> but one of the index inserts fails - duplicate key, out of memory
> error, I/O error, whatever. Now the table and the index are
> inconsistent. Normally, we're protected against this by MVCC, but if
> you use a solution that breaks MVCC by using the same XID for all
> transactions, then it can happen.
Certainly I understand the difference between abort of transaction and
termination of backend.
I do not say that it is good solution. And definitely aborts can happen
for read-only transactions.
I just wanted to express one moment: transaction aborts are caused by
two reasons:
- expected programming errors: deadlocks, conversion errors, unique
constraint violation,...
- unexpected system errors: disk space exhaustion, out of memory, I/O
errors...
Usually at replica with read-only transactions we do not have to deal
with errors of first kind.
So transaction may be aborted, but such abort most likely means that
something is wrong with the system
and restart of backend is not so bad solution in this situation.
In any case, I do not insist on this "frozen XID" approach.
The only advantage of this approach is that it is very simple to
implement: correspondent patch contains just 80 lines of code
and actually it requires just 5 (five) one-line changes.
I didn't agree with your statement just because restart of backend makes
it not possible to observe any inconsistencies in the database.
> ...but given that we seem to agree on this point, perhaps it isn't
> necessary to argue about those things right now.
>
Ok.
I attached new patch for GTT with local (private) buffer and no replica
access.
It provides GTT for all built-in indexes
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] global_private_temp-3.patch (59.3K, ../../[email protected]/2-global_private_temp-3.patch)
download | inline diff:
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c
index 647350c..ca5f22d 100644
--- a/src/backend/access/brin/brin_revmap.c
+++ b/src/backend/access/brin/brin_revmap.c
@@ -25,6 +25,7 @@
#include "access/brin_revmap.h"
#include "access/brin_tuple.h"
#include "access/brin_xlog.h"
+#include "access/brin.h"
#include "access/rmgr.h"
#include "access/xloginsert.h"
#include "miscadmin.h"
@@ -79,6 +80,11 @@ brinRevmapInitialize(Relation idxrel, BlockNumber *pagesPerRange,
meta = ReadBuffer(idxrel, BRIN_METAPAGE_BLKNO);
LockBuffer(meta, BUFFER_LOCK_SHARE);
page = BufferGetPage(meta);
+
+ if (GlobalTempRelationPageIsNotInitialized(idxrel, page))
+ brin_metapage_init(page, BrinGetPagesPerRange(idxrel),
+ BRIN_CURRENT_VERSION);
+
TestForOldSnapshot(snapshot, idxrel, page);
metadata = (BrinMetaPageData *) PageGetContents(page);
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 439a91b..8a6ac71 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -241,6 +241,16 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
metabuffer = ReadBuffer(index, GIN_METAPAGE_BLKNO);
metapage = BufferGetPage(metabuffer);
+ if (GlobalTempRelationPageIsNotInitialized(index, metapage))
+ {
+ Buffer rootbuffer = ReadBuffer(index, GIN_ROOT_BLKNO);
+ LockBuffer(rootbuffer, BUFFER_LOCK_EXCLUSIVE);
+ GinInitMetabuffer(metabuffer);
+ GinInitBuffer(rootbuffer, GIN_LEAF);
+ MarkBufferDirty(rootbuffer);
+ UnlockReleaseBuffer(rootbuffer);
+ }
+
/*
* An insertion to the pending list could logically belong anywhere in the
* tree, so it conflicts with all serializable scans. All scans acquire a
diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index b18ae2b..41bab5d 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -1750,7 +1750,7 @@ collectMatchesForHeapRow(IndexScanDesc scan, pendingPosition *pos)
/*
* Collect all matched rows from pending list into bitmap.
*/
-static void
+static bool
scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
{
GinScanOpaque so = (GinScanOpaque) scan->opaque;
@@ -1774,6 +1774,12 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
LockBuffer(metabuffer, GIN_SHARE);
page = BufferGetPage(metabuffer);
TestForOldSnapshot(scan->xs_snapshot, scan->indexRelation, page);
+
+ if (GlobalTempRelationPageIsNotInitialized(scan->indexRelation, page))
+ {
+ UnlockReleaseBuffer(metabuffer);
+ return false;
+ }
blkno = GinPageGetMeta(page)->head;
/*
@@ -1784,7 +1790,7 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
{
/* No pending list, so proceed with normal scan */
UnlockReleaseBuffer(metabuffer);
- return;
+ return true;
}
pos.pendingBuffer = ReadBuffer(scan->indexRelation, blkno);
@@ -1840,6 +1846,7 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
}
pfree(pos.hasMatchKey);
+ return true;
}
@@ -1875,7 +1882,8 @@ gingetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
* to scan the main index before the pending list, since concurrent
* cleanup could then make us miss entries entirely.
*/
- scanPendingInsert(scan, tbm, &ntids);
+ if (!scanPendingInsert(scan, tbm, &ntids))
+ return 0;
/*
* Now scan the main index.
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 0cc8791..3215b6f 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -677,7 +677,10 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace,
if (!xlocked)
{
LockBuffer(stack->buffer, GIST_SHARE);
- gistcheckpage(state.r, stack->buffer);
+ if (stack->blkno == GIST_ROOT_BLKNO && GlobalTempRelationPageIsNotInitialized(state.r, BufferGetPage(stack->buffer)))
+ GISTInitBuffer(stack->buffer, F_LEAF);
+ else
+ gistcheckpage(state.r, stack->buffer);
}
stack->page = (Page) BufferGetPage(stack->buffer);
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 22d790d..4c52dbe 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -344,7 +344,10 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem,
buffer = ReadBuffer(scan->indexRelation, pageItem->blkno);
LockBuffer(buffer, GIST_SHARE);
PredicateLockPage(r, BufferGetBlockNumber(buffer), scan->xs_snapshot);
- gistcheckpage(scan->indexRelation, buffer);
+ if (pageItem->blkno == GIST_ROOT_BLKNO && GlobalTempRelationPageIsNotInitialized(r, BufferGetPage(buffer)))
+ GISTInitBuffer(buffer, F_LEAF);
+ else
+ gistcheckpage(scan->indexRelation, buffer);
page = BufferGetPage(buffer);
TestForOldSnapshot(scan->xs_snapshot, r, page);
opaque = GistPageGetOpaque(page);
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 45804d7..50b306a 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1028,7 +1028,7 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ if (RelationHasSessionScope(rel))
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 838ee68..4f794b3 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -75,13 +75,20 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
buf = ReadBuffer(rel, blkno);
- if (access != HASH_NOLOCK)
- LockBuffer(buf, access);
-
/* ref count and lock type are correct */
- _hash_checkpage(rel, buf, flags);
-
+ if (blkno == HASH_METAPAGE && GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
+ {
+ _hash_init(rel, 0, MAIN_FORKNUM);
+ if (access != HASH_NOLOCK)
+ LockBuffer(buf, access);
+ }
+ else
+ {
+ if (access != HASH_NOLOCK)
+ LockBuffer(buf, access);
+ _hash_checkpage(rel, buf, flags);
+ }
return buf;
}
@@ -339,7 +346,7 @@ _hash_init(Relation rel, double num_tuples, ForkNumber forkNum)
bool use_wal;
/* safety check */
- if (RelationGetNumberOfBlocksInFork(rel, forkNum) != 0)
+ if (rel->rd_rel->relpersistence != RELPERSISTENCE_SESSION && RelationGetNumberOfBlocksInFork(rel, forkNum) != 0)
elog(ERROR, "cannot initialize non-empty hash index \"%s\"",
RelationGetRelationName(rel));
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..92df373 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -673,6 +673,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* init fork of an unlogged relation.
*/
if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION ||
(rel->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
forkNum == INIT_FORKNUM))
log_smgrcreate(newrnode, forkNum);
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 268f869..ed3ab70 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -763,7 +763,11 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+ /* Session temporary relation may be not yet initialized for this backend. */
+ if (blkno == BTREE_METAPAGE && GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 45472db..a8497a2 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -106,6 +106,7 @@ spgGetCache(Relation index)
spgConfigIn in;
FmgrInfo *procinfo;
Buffer metabuffer;
+ Page metapage;
SpGistMetaPageData *metadata;
cache = MemoryContextAllocZero(index->rd_indexcxt,
@@ -155,12 +156,32 @@ spgGetCache(Relation index)
metabuffer = ReadBuffer(index, SPGIST_METAPAGE_BLKNO);
LockBuffer(metabuffer, BUFFER_LOCK_SHARE);
- metadata = SpGistPageGetMeta(BufferGetPage(metabuffer));
+ metapage = BufferGetPage(metabuffer);
+ metadata = SpGistPageGetMeta(metapage);
if (metadata->magicNumber != SPGIST_MAGIC_NUMBER)
- elog(ERROR, "index \"%s\" is not an SP-GiST index",
- RelationGetRelationName(index));
+ {
+ if (GlobalTempRelationPageIsNotInitialized(index, metapage))
+ {
+ Buffer rootbuffer = ReadBuffer(index, SPGIST_ROOT_BLKNO);
+ Buffer nullbuffer = ReadBuffer(index, SPGIST_NULL_BLKNO);
+
+ SpGistInitMetapage(metapage);
+
+ LockBuffer(rootbuffer, BUFFER_LOCK_EXCLUSIVE);
+ SpGistInitPage(BufferGetPage(rootbuffer), SPGIST_LEAF);
+ MarkBufferDirty(rootbuffer);
+ UnlockReleaseBuffer(rootbuffer);
+ LockBuffer(nullbuffer, BUFFER_LOCK_EXCLUSIVE);
+ SpGistInitPage(BufferGetPage(nullbuffer), SPGIST_LEAF | SPGIST_NULLS);
+ MarkBufferDirty(nullbuffer);
+ UnlockReleaseBuffer(nullbuffer);
+ }
+ else
+ elog(ERROR, "index \"%s\" is not an SP-GiST index",
+ RelationGetRelationName(index));
+ }
cache->lastUsedPages = metadata->lastUsedPages;
UnlockReleaseBuffer(metabuffer);
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 1af31c2..e60bdb7 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -402,6 +402,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
case RELPERSISTENCE_TEMP:
backend = BackendIdForTempRelations();
break;
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index f6c31cc..d943b57 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3652,7 +3652,7 @@ reindex_relation(Oid relid, int flags, int options)
if (flags & REINDEX_REL_FORCE_INDEXES_UNLOGGED)
persistence = RELPERSISTENCE_UNLOGGED;
else if (flags & REINDEX_REL_FORCE_INDEXES_PERMANENT)
- persistence = RELPERSISTENCE_PERMANENT;
+ persistence = rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION ? RELPERSISTENCE_SESSION : RELPERSISTENCE_PERMANENT;
else
persistence = rel->rd_rel->relpersistence;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 625af8d..1e192fa 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -93,6 +93,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
backend = InvalidBackendId;
needs_wal = false;
break;
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ needs_wal = false;
+ break;
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
needs_wal = true;
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a23128d..5d131a7 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -1400,7 +1400,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
*/
if (newrelpersistence == RELPERSISTENCE_UNLOGGED)
reindex_flags |= REINDEX_REL_FORCE_INDEXES_UNLOGGED;
- else if (newrelpersistence == RELPERSISTENCE_PERMANENT)
+ else if (newrelpersistence != RELPERSISTENCE_TEMP)
reindex_flags |= REINDEX_REL_FORCE_INDEXES_PERMANENT;
/* Report that we are now reindexing relations */
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index a13322b..be661a4 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -94,7 +94,7 @@ static HTAB *seqhashtab = NULL; /* hash table for SeqTable items */
*/
static SeqTableData *last_used_seq = NULL;
-static void fill_seq_with_data(Relation rel, HeapTuple tuple);
+static void fill_seq_with_data(Relation rel, HeapTuple tuple, Buffer buf);
static Relation lock_and_open_sequence(SeqTable seq);
static void create_seq_hashtable(void);
static void init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel);
@@ -222,7 +222,7 @@ DefineSequence(ParseState *pstate, CreateSeqStmt *seq)
/* now initialize the sequence's data */
tuple = heap_form_tuple(tupDesc, value, null);
- fill_seq_with_data(rel, tuple);
+ fill_seq_with_data(rel, tuple, InvalidBuffer);
/* process OWNED BY if given */
if (owned_by)
@@ -327,7 +327,7 @@ ResetSequence(Oid seq_relid)
/*
* Insert the modified tuple into the new storage file.
*/
- fill_seq_with_data(seq_rel, tuple);
+ fill_seq_with_data(seq_rel, tuple, InvalidBuffer);
/* Clear local cache so that we don't think we have cached numbers */
/* Note that we do not change the currval() state */
@@ -340,18 +340,21 @@ ResetSequence(Oid seq_relid)
* Initialize a sequence's relation with the specified tuple as content
*/
static void
-fill_seq_with_data(Relation rel, HeapTuple tuple)
+fill_seq_with_data(Relation rel, HeapTuple tuple, Buffer buf)
{
- Buffer buf;
Page page;
sequence_magic *sm;
OffsetNumber offnum;
+ bool lockBuffer = false;
/* Initialize first page of relation with special magic number */
- buf = ReadBuffer(rel, P_NEW);
- Assert(BufferGetBlockNumber(buf) == 0);
-
+ if (buf == InvalidBuffer)
+ {
+ buf = ReadBuffer(rel, P_NEW);
+ Assert(BufferGetBlockNumber(buf) == 0);
+ lockBuffer = true;
+ }
page = BufferGetPage(buf);
PageInit(page, BufferGetPageSize(buf), sizeof(sequence_magic));
@@ -360,7 +363,8 @@ fill_seq_with_data(Relation rel, HeapTuple tuple)
/* Now insert sequence tuple */
- LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
+ if (lockBuffer)
+ LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
/*
* Since VACUUM does not process sequences, we have to force the tuple to
@@ -410,7 +414,8 @@ fill_seq_with_data(Relation rel, HeapTuple tuple)
END_CRIT_SECTION();
- UnlockReleaseBuffer(buf);
+ if (lockBuffer)
+ UnlockReleaseBuffer(buf);
}
/*
@@ -502,7 +507,7 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt)
/*
* Insert the modified tuple into the new storage file.
*/
- fill_seq_with_data(seqrel, newdatatuple);
+ fill_seq_with_data(seqrel, newdatatuple, InvalidBuffer);
}
/* process OWNED BY if given */
@@ -1178,6 +1183,17 @@ read_seq_tuple(Relation rel, Buffer *buf, HeapTuple seqdatatuple)
LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
page = BufferGetPage(*buf);
+ if (GlobalTempRelationPageIsNotInitialized(rel, page))
+ {
+ /* Initialize sequence for global temporary tables */
+ Datum value[SEQ_COL_LASTCOL] = {0};
+ bool null[SEQ_COL_LASTCOL] = {false};
+ HeapTuple tuple;
+ value[SEQ_COL_LASTVAL-1] = Int64GetDatumFast(1); /* start sequence with 1 */
+ tuple = heap_form_tuple(RelationGetDescr(rel), value, null);
+ fill_seq_with_data(rel, tuple, *buf);
+ }
+
sm = (sequence_magic *) PageGetSpecialPointer(page);
if (sm->magic != SEQ_MAGIC)
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 8d25d14..50d0402 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -587,7 +587,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* Check consistency of arguments
*/
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !IsLocalRelpersistence(stmt->relation->relpersistence))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -1772,7 +1772,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION)
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -7708,6 +7709,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on unlogged tables may reference only permanent or unlogged tables")));
break;
+ case RELPERSISTENCE_SESSION:
+ if (pkrel->rd_rel->relpersistence != RELPERSISTENCE_SESSION)
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("constraints on session tables may reference only session tables")));
+ break;
case RELPERSISTENCE_TEMP:
if (pkrel->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
ereport(ERROR,
@@ -14140,6 +14147,13 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
RelationGetRelationName(rel)),
errtable(rel)));
break;
+ case RELPERSISTENCE_SESSION:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot change logged status of session table \"%s\"",
+ RelationGetRelationName(rel)),
+ errtable(rel)));
+ break;
case RELPERSISTENCE_PERMANENT:
if (toLogged)
/* nothing to do */
@@ -14627,14 +14641,7 @@ PreCommit_on_commit_actions(void)
/* Do nothing (there shouldn't be such entries, actually) */
break;
case ONCOMMIT_DELETE_ROWS:
-
- /*
- * If this transaction hasn't accessed any temporary
- * relations, we can skip truncating ON COMMIT DELETE ROWS
- * tables, as they must still be empty.
- */
- if ((MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
- oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
+ oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
break;
case ONCOMMIT_DROP:
oids_to_drop = lappend_oid(oids_to_drop, oc->relid);
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 3f67aaf..565c868 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3266,20 +3266,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| TEMP { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
- | GLOBAL TEMPORARY
- {
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
- | GLOBAL TEMP
- {
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
+ | GLOBAL TEMPORARY { $$ = RELPERSISTENCE_SESSION; }
+ | GLOBAL TEMP { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION TEMPORARY { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION TEMP { $$ = RELPERSISTENCE_SESSION; }
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index ee47547..ea7fe4c 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -437,6 +437,14 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
seqstmt->options = seqoptions;
/*
+ * Why we should not always use persistence of parent table?
+ * Although it is prohibited to have unlogged sequences,
+ * unlogged tables with SERIAL fields are accepted!
+ */
+ if (cxt->relation->relpersistence != RELPERSISTENCE_UNLOGGED)
+ seqstmt->sequence->relpersistence = cxt->relation->relpersistence;
+
+ /*
* If a sequence data type was specified, add it to the options. Prepend
* to the list rather than append; in case a user supplied their own AS
* clause, the "redundant options" error will point to their occurrence,
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index c1dd816..dcfc134 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2157,7 +2157,7 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ if (IsLocalRelpersistence(classForm->relpersistence))
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 07f3c93..5db79ec 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -33,6 +33,7 @@
#include "postmaster/bgwriter.h"
#include "storage/fd.h"
#include "storage/bufmgr.h"
+#include "storage/ipc.h"
#include "storage/md.h"
#include "storage/relfilenode.h"
#include "storage/smgr.h"
@@ -87,6 +88,18 @@ typedef struct _MdfdVec
static MemoryContext MdCxt; /* context for all MdfdVec objects */
+/*
+ * Structure used to collect information created by this backend.
+ * Data of this related should be deleted on backend exit.
+ */
+typedef struct SessionRelation
+{
+ RelFileNodeBackend rnode;
+ struct SessionRelation* next;
+} SessionRelation;
+
+
+static SessionRelation* SessionRelations;
/* Populate a file tag describing an md.c segment file. */
#define INIT_MD_FILETAG(a,xx_rnode,xx_forknum,xx_segno) \
@@ -152,6 +165,45 @@ mdinit(void)
ALLOCSET_DEFAULT_SIZES);
}
+
+/*
+ * Delete all data of session relations and remove their pages from shared buffers.
+ * This function is called on backend exit.
+ */
+static void
+TruncateSessionRelations(int code, Datum arg)
+{
+ SessionRelation* rel;
+ for (rel = SessionRelations; rel != NULL; rel = rel->next)
+ {
+ /* Delete relation files */
+ mdunlink(rel->rnode, InvalidForkNumber, false);
+ }
+}
+
+/*
+ * Maintain information about session relations accessed by this backend.
+ * This list is needed to perform cleanup on backend exit.
+ * Session relation is linked in this list when this relation is created or opened and file doesn't exist.
+ * Such procedure guarantee that each relation is linked into list only once.
+ */
+static void
+RegisterSessionRelation(SMgrRelation reln)
+{
+ SessionRelation* rel = (SessionRelation*)MemoryContextAlloc(TopMemoryContext, sizeof(SessionRelation));
+
+ /*
+ * Perform session relation cleanup on backend exit. We are using shared memory hook, because
+ * cleanup should be performed before backend is disconnected from shared memory.
+ */
+ if (SessionRelations == NULL)
+ on_shmem_exit(TruncateSessionRelations, 0);
+
+ rel->rnode = reln->smgr_rnode;
+ rel->next = SessionRelations;
+ SessionRelations = rel;
+}
+
/*
* mdexists() -- Does the physical file exist?
*
@@ -218,6 +270,8 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
errmsg("could not create file \"%s\": %m", path)));
}
}
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ RegisterSessionRelation(reln);
pfree(path);
@@ -465,6 +519,19 @@ mdopenfork(SMgrRelation reln, ForkNumber forknum, int behavior)
if (fd < 0)
{
+ /*
+ * In case of session relation access, there may be no yet files of this relation for this backend.
+ * If so, then create file and register session relation for truncation on backend exit.
+ */
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ {
+ fd = PathNameOpenFile(path, O_RDWR | PG_BINARY | O_CREAT);
+ if (fd >= 0)
+ {
+ RegisterSessionRelation(reln);
+ goto NewSegment;
+ }
+ }
if ((behavior & EXTENSION_RETURN_NULL) &&
FILE_POSSIBLY_DELETED(errno))
{
@@ -476,6 +543,7 @@ mdopenfork(SMgrRelation reln, ForkNumber forknum, int behavior)
errmsg("could not open file \"%s\": %m", path)));
}
+ NewSegment:
pfree(path);
_fdvec_resize(reln, forknum, 1);
@@ -652,8 +720,13 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
* complaining. This allows, for example, the case of trying to
* update a block that was later truncated away.
*/
- if (zero_damaged_pages || InRecovery)
+ if (zero_damaged_pages || InRecovery || RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ {
MemSet(buffer, 0, BLCKSZ);
+ /* In case of session relation we need to write zero page to provide correct result of subsequent mdnblocks */
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
@@ -738,12 +811,18 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
BlockNumber
mdnblocks(SMgrRelation reln, ForkNumber forknum)
{
- MdfdVec *v = mdopenfork(reln, forknum, EXTENSION_FAIL);
+ /*
+ * If we access session relation, there may be no files yet of this relation for this backend.
+ * Pass EXTENSION_RETURN_NULL to make mdopen return NULL in this case instead of reporting error.
+ */
+ MdfdVec *v = mdopenfork(reln, forknum, RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode)
+ ? EXTENSION_RETURN_NULL : EXTENSION_FAIL);
BlockNumber nblocks;
BlockNumber segno = 0;
/* mdopen has opened the first segment */
- Assert(reln->md_num_open_segs[forknum] > 0);
+ if (reln->md_num_open_segs[forknum] == 0)
+ return 0;
/*
* Start from the last open segments, to avoid redundant seeks. We have
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..2401361 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -994,6 +994,9 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
/* Determine owning backend. */
switch (relform->relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 585dcee..ce8852c 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1098,6 +1098,10 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_newRelfilenodeSubid = InvalidSubTransactionId;
switch (relation->rd_rel->relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ relation->rd_backend = BackendIdForSessionRelations();
+ relation->rd_islocaltemp = false;
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
relation->rd_backend = InvalidBackendId;
@@ -3301,6 +3305,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_rel->relpersistence = relpersistence;
switch (relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ rel->rd_backend = BackendIdForSessionRelations();
+ rel->rd_islocaltemp = false;
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
rel->rd_backend = InvalidBackendId;
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index bf69adc..fa7479c 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15637,8 +15637,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
tbinfo->dobj.catId.oid, false);
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ? "UNLOGGED "
+ : tbinfo->relpersistence == RELPERSISTENCE_SESSION ? "SESSION " : "",
reltypename,
qualrelname);
diff --git a/src/common/relpath.c b/src/common/relpath.c
index 62b9553..cef99d2 100644
--- a/src/common/relpath.c
+++ b/src/common/relpath.c
@@ -166,7 +166,18 @@ GetRelationPath(Oid dbNode, Oid spcNode, Oid relNode,
}
else
{
- if (forkNumber != MAIN_FORKNUM)
+ /*
+ * Session relations are distinguished from local temp relations by adding
+ * SessionRelFirstBackendId offset to backendId.
+ * These is no need to separate them at file system level, so just subtract SessionRelFirstBackendId
+ * to avoid too long file names.
+ * Segments of session relations have the same prefix (t%d_) as local temporary relations
+ * to make it possible to cleanup them in the same way as local temporary relation files.
+ */
+ if (backendId >= SessionRelFirstBackendId)
+ backendId -= SessionRelFirstBackendId;
+
+ if (forkNumber != MAIN_FORKNUM)
path = psprintf("base/%u/t%d_%u_%s",
dbNode, backendId, relNode,
forkNames[forkNumber]);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..6a39663 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_SESSION 's' /* session table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/storage/backendid.h b/src/include/storage/backendid.h
index 70ef8eb..f226e7c 100644
--- a/src/include/storage/backendid.h
+++ b/src/include/storage/backendid.h
@@ -22,6 +22,13 @@ typedef int BackendId; /* unique currently active backend identifier */
#define InvalidBackendId (-1)
+/*
+ * We need to distinguish local and global temporary relations by RelFileNodeBackend.
+ * The least invasive change is to add some special bias value to backend id (since
+ * maximal number of backed is limited by MaxBackends).
+ */
+#define SessionRelFirstBackendId (0x40000000)
+
extern PGDLLIMPORT BackendId MyBackendId; /* backend id of this backend */
/* backend id of our parallel session leader, or InvalidBackendId if none */
@@ -34,4 +41,10 @@ extern PGDLLIMPORT BackendId ParallelMasterBackendId;
#define BackendIdForTempRelations() \
(ParallelMasterBackendId == InvalidBackendId ? MyBackendId : ParallelMasterBackendId)
+
+#define BackendIdForSessionRelations() \
+ (BackendIdForTempRelations() + SessionRelFirstBackendId)
+
+#define IsSessionRelationBackendId(id) ((id) >= SessionRelFirstBackendId)
+
#endif /* BACKENDID_H */
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 4ef6d8d..bac7a31 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -229,6 +229,13 @@ typedef PageHeaderData *PageHeader;
#define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0)
/*
+ * Page of temporary relation is not initialized
+ */
+#define GlobalTempRelationPageIsNotInitialized(rel, page) \
+ ((rel)->rd_rel->relpersistence == RELPERSISTENCE_SESSION && PageIsNew(page))
+
+
+/*
* PageGetItemId
* Returns an item identifier of a page.
*/
diff --git a/src/include/storage/relfilenode.h b/src/include/storage/relfilenode.h
index 586500a..20aec72 100644
--- a/src/include/storage/relfilenode.h
+++ b/src/include/storage/relfilenode.h
@@ -75,10 +75,25 @@ typedef struct RelFileNodeBackend
BackendId backend;
} RelFileNodeBackend;
+/*
+ * Check whether it is local or global temporary relation, which data belongs only to one backend.
+ */
#define RelFileNodeBackendIsTemp(rnode) \
((rnode).backend != InvalidBackendId)
/*
+ * Check whether it is global temporary relation which metadata is shared by all sessions,
+ * but data is private for the current session.
+ */
+#define RelFileNodeBackendIsGlobalTemp(rnode) IsSessionRelationBackendId((rnode).backend)
+
+/*
+ * Check whether it is local temporary relation which exists only in this backend.
+ */
+#define RelFileNodeBackendIsLocalTemp(rnode) \
+ (RelFileNodeBackendIsTemp(rnode) && !RelFileNodeBackendIsGlobalTemp(rnode))
+
+/*
* Note: RelFileNodeEquals and RelFileNodeBackendEquals compare relNode first
* since that is most likely to be different in two unequal RelFileNodes. It
* is probably redundant to compare spcNode if the other fields are found equal,
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index a5cf804..d42830f 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -327,6 +327,18 @@ typedef struct StdRdOptions
((relation)->rd_options ? \
((StdRdOptions *) (relation)->rd_options)->parallel_workers : (defaultpw))
+/*
+ * Relation persistence is either TEMP either SESSION
+ */
+#define IsLocalRelpersistence(relpersistence) \
+ ((relpersistence) == RELPERSISTENCE_TEMP || (relpersistence) == RELPERSISTENCE_SESSION)
+
+/*
+ * Relation is either global either local temp table
+ */
+#define RelationHasSessionScope(relation) \
+ IsLocalRelpersistence(((relation)->rd_rel->relpersistence))
+
/* ViewOptions->check_option values */
typedef enum ViewOptCheckOption
{
@@ -335,6 +347,7 @@ typedef enum ViewOptCheckOption
VIEW_OPTION_CHECK_OPTION_CASCADED
} ViewOptCheckOption;
+
/*
* ViewOptions
* Contents of rd_options for views
@@ -526,7 +539,7 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ RelationHasSessionScope(relation)
/*
* RELATION_IS_LOCAL
diff --git a/src/test/isolation/expected/inherit-global-temp.out b/src/test/isolation/expected/inherit-global-temp.out
new file mode 100644
index 0000000..6114f8c
--- /dev/null
+++ b/src/test/isolation/expected/inherit-global-temp.out
@@ -0,0 +1,218 @@
+Parsed test spec with 2 sessions
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_update_p s1_update_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_update_p: UPDATE inh_global_parent SET a = 11 WHERE a = 1;
+step s1_update_c: UPDATE inh_global_parent SET a = 13 WHERE a IN (3, 5);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+2
+11
+4
+13
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+4
+13
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+2
+11
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_update_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_update_c: UPDATE inh_global_parent SET a = 15 WHERE a IN (3, 5);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+6
+15
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+6
+15
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_delete_p s1_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_delete_p: DELETE FROM inh_global_parent WHERE a = 2;
+step s1_delete_c: DELETE FROM inh_global_parent WHERE a IN (4, 6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+3
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_delete_c: DELETE FROM inh_global_parent WHERE a IN (4, 6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+5
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_truncate_p: TRUNCATE inh_global_parent;
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_p s1_commit
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_begin: BEGIN;
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s2_select_p: SELECT a FROM inh_global_parent; <waiting ...>
+step s1_commit: COMMIT;
+step s2_select_p: <... completed>
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_c s1_commit
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_begin: BEGIN;
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2; <waiting ...>
+step s1_commit: COMMIT;
+step s2_select_c: <... completed>
+a
+
+5
+6
diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule
index a2fa192..ef7aa85 100644
--- a/src/test/isolation/isolation_schedule
+++ b/src/test/isolation/isolation_schedule
@@ -88,3 +88,4 @@ test: plpgsql-toast
test: truncate-conflict
test: serializable-parallel
test: serializable-parallel-2
+test: inherit-global-temp
diff --git a/src/test/isolation/specs/inherit-global-temp.spec b/src/test/isolation/specs/inherit-global-temp.spec
new file mode 100644
index 0000000..5e95dd6
--- /dev/null
+++ b/src/test/isolation/specs/inherit-global-temp.spec
@@ -0,0 +1,73 @@
+# This is a copy of the inherit-temp test with little changes for global temporary tables.
+#
+
+setup
+{
+ CREATE TABLE inh_global_parent (a int);
+}
+
+teardown
+{
+ DROP TABLE inh_global_parent;
+}
+
+# Session 1 executes actions which act directly on both the parent and
+# its child. Abbreviation "c" is used for queries working on the child
+# and "p" on the parent.
+session "s1"
+setup
+{
+ CREATE GLOBAL TEMPORARY TABLE inh_global_temp_child_s1 () INHERITS (inh_global_parent);
+}
+step "s1_begin" { BEGIN; }
+step "s1_truncate_p" { TRUNCATE inh_global_parent; }
+step "s1_select_p" { SELECT a FROM inh_global_parent; }
+step "s1_select_c" { SELECT a FROM inh_global_temp_child_s1; }
+step "s1_insert_p" { INSERT INTO inh_global_parent VALUES (1), (2); }
+step "s1_insert_c" { INSERT INTO inh_global_temp_child_s1 VALUES (3), (4); }
+step "s1_update_p" { UPDATE inh_global_parent SET a = 11 WHERE a = 1; }
+step "s1_update_c" { UPDATE inh_global_parent SET a = 13 WHERE a IN (3, 5); }
+step "s1_delete_p" { DELETE FROM inh_global_parent WHERE a = 2; }
+step "s1_delete_c" { DELETE FROM inh_global_parent WHERE a IN (4, 6); }
+step "s1_commit" { COMMIT; }
+teardown
+{
+ DROP TABLE inh_global_temp_child_s1;
+}
+
+# Session 2 executes actions on the parent which act only on the child.
+session "s2"
+setup
+{
+ CREATE GLOBAL TEMPORARY TABLE inh_global_temp_child_s2 () INHERITS (inh_global_parent);
+}
+step "s2_truncate_p" { TRUNCATE inh_global_parent; }
+step "s2_select_p" { SELECT a FROM inh_global_parent; }
+step "s2_select_c" { SELECT a FROM inh_global_temp_child_s2; }
+step "s2_insert_c" { INSERT INTO inh_global_temp_child_s2 VALUES (5), (6); }
+step "s2_update_c" { UPDATE inh_global_parent SET a = 15 WHERE a IN (3, 5); }
+step "s2_delete_c" { DELETE FROM inh_global_parent WHERE a IN (4, 6); }
+teardown
+{
+ DROP TABLE inh_global_temp_child_s2;
+}
+
+# Check INSERT behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check UPDATE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_update_p" "s1_update_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_update_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check DELETE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_delete_p" "s1_delete_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_delete_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check TRUNCATE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_truncate_p" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_truncate_p" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# TRUNCATE on a parent tree does not block access to temporary child relation
+# of another session, and blocks when scanning the parent.
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_begin" "s1_truncate_p" "s2_select_p" "s1_commit"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_begin" "s1_truncate_p" "s2_select_c" "s1_commit"
diff --git a/src/test/regress/expected/global_temp.out b/src/test/regress/expected/global_temp.out
new file mode 100644
index 0000000..ae1adb6
--- /dev/null
+++ b/src/test/regress/expected/global_temp.out
@@ -0,0 +1,247 @@
+--
+-- GLOBAL TEMP
+-- Test global temp relations
+--
+-- Test ON COMMIT DELETE ROWS
+CREATE GLOBAL TEMP TABLE global_temptest(col int) ON COMMIT DELETE ROWS;
+BEGIN;
+INSERT INTO global_temptest VALUES (1);
+INSERT INTO global_temptest VALUES (2);
+SELECT * FROM global_temptest;
+ col
+-----
+ 1
+ 2
+(2 rows)
+
+COMMIT;
+SELECT * FROM global_temptest;
+ col
+-----
+(0 rows)
+
+DROP TABLE global_temptest;
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest(col) ON COMMIT DELETE ROWS AS SELECT 1;
+SELECT * FROM global_temptest;
+ col
+-----
+ 1
+(1 row)
+
+COMMIT;
+SELECT * FROM global_temptest;
+ col
+-----
+(0 rows)
+
+DROP TABLE global_temptest;
+-- Test foreign keys
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest1(col int PRIMARY KEY);
+CREATE GLOBAL TEMP TABLE global_temptest2(col int REFERENCES global_temptest1)
+ ON COMMIT DELETE ROWS;
+INSERT INTO global_temptest1 VALUES (1);
+INSERT INTO global_temptest2 VALUES (1);
+COMMIT;
+SELECT * FROM global_temptest1;
+ col
+-----
+ 1
+(1 row)
+
+SELECT * FROM global_temptest2;
+ col
+-----
+(0 rows)
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temptest4(col int REFERENCES global_temptest3);
+COMMIT;
+ERROR: unsupported ON COMMIT and foreign key combination
+DETAIL: Table "global_temptest4" references "global_temptest3", but they do not have the same ON COMMIT setting.
+-- For partitioned temp tables, ON COMMIT actions ignore storage-less
+-- partitioned tables.
+BEGIN;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit_1
+ PARTITION OF temp_parted_oncommit
+ FOR VALUES IN (1) ON COMMIT DELETE ROWS;
+INSERT INTO temp_parted_oncommit VALUES (1);
+COMMIT;
+-- partitions are emptied by the previous commit
+SELECT * FROM temp_parted_oncommit;
+ a
+---
+(0 rows)
+
+DROP TABLE temp_parted_oncommit;
+-- Using ON COMMIT DELETE on a partitioned table does not remove
+-- all rows if partitions preserve their data.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test1
+ PARTITION OF global_temp_parted_oncommit_test
+ FOR VALUES IN (1) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_parted_oncommit_test VALUES (1);
+COMMIT;
+-- Data from the remaining partition is still here as its rows are
+-- preserved.
+SELECT * FROM global_temp_parted_oncommit_test;
+ a
+---
+ 1
+(1 row)
+
+-- two relations remain in this case.
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_parted_oncommit_test%';
+ relname
+-----------------------------------
+ global_temp_parted_oncommit_test
+ global_temp_parted_oncommit_test1
+(2 rows)
+
+DROP TABLE global_temp_parted_oncommit_test;
+-- Check dependencies between ON COMMIT actions with inheritance trees.
+-- Data on the parent is removed, and the child goes away.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test1 ()
+ INHERITS(global_temp_inh_oncommit_test) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_inh_oncommit_test1 VALUES (1);
+INSERT INTO global_temp_inh_oncommit_test VALUES (1);
+COMMIT;
+SELECT * FROM global_temp_inh_oncommit_test;
+ a
+---
+ 1
+(1 row)
+
+-- two relations remain
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_inh_oncommit_test%';
+ relname
+--------------------------------
+ global_temp_inh_oncommit_test
+ global_temp_inh_oncommit_test1
+(2 rows)
+
+DROP TABLE global_temp_inh_oncommit_test1;
+DROP TABLE global_temp_inh_oncommit_test;
+-- Global temp table cannot inherit from temporary relation
+BEGIN;
+CREATE TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+ERROR: cannot inherit from temporary relation "global_temp_table"
+ROLLBACK;
+-- Temp table can inherit from global temporary relation
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE TEMP TABLE temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+CREATE TEMP TABLE temp_table2 ()
+ INHERITS(global_temp_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO global_temp_table VALUES (0);
+SELECT * FROM global_temp_table;
+ a
+---
+ 0
+ 1
+ 2
+(3 rows)
+
+COMMIT;
+SELECT * FROM global_temp_table;
+ a
+---
+ 1
+(1 row)
+
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE global_temp_table;
+-- Global temp table can inherit from normal relation
+BEGIN;
+CREATE TABLE normal_table (a int);
+CREATE GLOBAL TEMP TABLE temp_table1 ()
+ INHERITS(normal_table) ON COMMIT PRESERVE ROWS;
+CREATE GLOBAL TEMP TABLE temp_table2 ()
+ INHERITS(normal_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO normal_table VALUES (0);
+SELECT * FROM normal_table;
+ a
+---
+ 0
+ 1
+ 2
+(3 rows)
+
+COMMIT;
+SELECT * FROM normal_table;
+ a
+---
+ 0
+ 1
+(2 rows)
+
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE normal_table;
+-- Check SERIAL and BIGSERIAL pseudo-types
+CREATE GLOBAL TEMP TABLE global_temp_table ( aid BIGSERIAL, bid SERIAL );
+CREATE SEQUENCE test_sequence;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+ 1 | 1
+ 2 | 2
+ 3 | 3
+(3 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 1
+(1 row)
+
+\c
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+(0 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 2
+(1 row)
+
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+ 1 | 1
+ 2 | 2
+ 3 | 3
+(3 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 3
+(1 row)
+
+DROP TABLE global_temp_table;
+DROP SEQUENCE test_sequence;
diff --git a/src/test/regress/expected/session_table.out b/src/test/regress/expected/session_table.out
new file mode 100644
index 0000000..1b9b3f4
--- /dev/null
+++ b/src/test/regress/expected/session_table.out
@@ -0,0 +1,64 @@
+create session table my_private_table(x integer primary key, y integer);
+insert into my_private_table values (generate_series(1,10000), generate_series(1,10000));
+select count(*) from my_private_table;
+ count
+-------
+ 10000
+(1 row)
+
+\c
+select count(*) from my_private_table;
+ count
+-------
+ 0
+(1 row)
+
+select * from my_private_table where x=10001;
+ x | y
+---+---
+(0 rows)
+
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+create index on my_private_table(y);
+select * from my_private_table where x=10001;
+ x | y
+-------+-------
+ 10001 | 10001
+(1 row)
+
+select * from my_private_table where y=10001;
+ x | y
+-------+-------
+ 10001 | 10001
+(1 row)
+
+select count(*) from my_private_table;
+ count
+--------
+ 100000
+(1 row)
+
+\c
+select * from my_private_table where x=100001;
+ x | y
+---+---
+(0 rows)
+
+select * from my_private_table order by y desc limit 1;
+ x | y
+---+---
+(0 rows)
+
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+select * from my_private_table where x=100001;
+ x | y
+---+---
+(0 rows)
+
+select * from my_private_table order by y desc limit 1;
+ x | y
+--------+--------
+ 100000 | 100000
+(1 row)
+
+drop table my_private_table;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index fc0f141..507cf7d 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -107,7 +107,7 @@ test: json jsonb json_encoding jsonpath jsonpath_encoding jsonb_jsonpath
# NB: temp.sql does a reconnect which transiently uses 2 connections,
# so keep this parallel group to at most 19 tests
# ----------
-test: plancache limit plpgsql copy2 temp domain rangefuncs prepare conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
+test: plancache limit plpgsql copy2 temp global_temp session_table domain rangefuncs prepare conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
# ----------
# Another group of parallel tests
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 68ac56a..3890777 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -172,6 +172,8 @@ test: limit
test: plpgsql
test: copy2
test: temp
+test: global_temp
+test: session_table
test: domain
test: rangefuncs
test: prepare
diff --git a/src/test/regress/sql/global_temp.sql b/src/test/regress/sql/global_temp.sql
new file mode 100644
index 0000000..3058b9b
--- /dev/null
+++ b/src/test/regress/sql/global_temp.sql
@@ -0,0 +1,151 @@
+--
+-- GLOBAL TEMP
+-- Test global temp relations
+--
+
+-- Test ON COMMIT DELETE ROWS
+
+CREATE GLOBAL TEMP TABLE global_temptest(col int) ON COMMIT DELETE ROWS;
+
+BEGIN;
+INSERT INTO global_temptest VALUES (1);
+INSERT INTO global_temptest VALUES (2);
+
+SELECT * FROM global_temptest;
+COMMIT;
+
+SELECT * FROM global_temptest;
+
+DROP TABLE global_temptest;
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest(col) ON COMMIT DELETE ROWS AS SELECT 1;
+
+SELECT * FROM global_temptest;
+COMMIT;
+
+SELECT * FROM global_temptest;
+
+DROP TABLE global_temptest;
+
+-- Test foreign keys
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest1(col int PRIMARY KEY);
+CREATE GLOBAL TEMP TABLE global_temptest2(col int REFERENCES global_temptest1)
+ ON COMMIT DELETE ROWS;
+INSERT INTO global_temptest1 VALUES (1);
+INSERT INTO global_temptest2 VALUES (1);
+COMMIT;
+SELECT * FROM global_temptest1;
+SELECT * FROM global_temptest2;
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temptest4(col int REFERENCES global_temptest3);
+COMMIT;
+
+-- For partitioned temp tables, ON COMMIT actions ignore storage-less
+-- partitioned tables.
+BEGIN;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit_1
+ PARTITION OF temp_parted_oncommit
+ FOR VALUES IN (1) ON COMMIT DELETE ROWS;
+INSERT INTO temp_parted_oncommit VALUES (1);
+COMMIT;
+-- partitions are emptied by the previous commit
+SELECT * FROM temp_parted_oncommit;
+DROP TABLE temp_parted_oncommit;
+
+-- Using ON COMMIT DELETE on a partitioned table does not remove
+-- all rows if partitions preserve their data.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test1
+ PARTITION OF global_temp_parted_oncommit_test
+ FOR VALUES IN (1) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_parted_oncommit_test VALUES (1);
+COMMIT;
+-- Data from the remaining partition is still here as its rows are
+-- preserved.
+SELECT * FROM global_temp_parted_oncommit_test;
+-- two relations remain in this case.
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_parted_oncommit_test%';
+DROP TABLE global_temp_parted_oncommit_test;
+
+-- Check dependencies between ON COMMIT actions with inheritance trees.
+-- Data on the parent is removed, and the child goes away.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test1 ()
+ INHERITS(global_temp_inh_oncommit_test) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_inh_oncommit_test1 VALUES (1);
+INSERT INTO global_temp_inh_oncommit_test VALUES (1);
+COMMIT;
+SELECT * FROM global_temp_inh_oncommit_test;
+-- two relations remain
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_inh_oncommit_test%';
+DROP TABLE global_temp_inh_oncommit_test1;
+DROP TABLE global_temp_inh_oncommit_test;
+
+-- Global temp table cannot inherit from temporary relation
+BEGIN;
+CREATE TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+ROLLBACK;
+
+-- Temp table can inherit from global temporary relation
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE TEMP TABLE temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+CREATE TEMP TABLE temp_table2 ()
+ INHERITS(global_temp_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO global_temp_table VALUES (0);
+SELECT * FROM global_temp_table;
+COMMIT;
+SELECT * FROM global_temp_table;
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE global_temp_table;
+
+-- Global temp table can inherit from normal relation
+BEGIN;
+CREATE TABLE normal_table (a int);
+CREATE GLOBAL TEMP TABLE temp_table1 ()
+ INHERITS(normal_table) ON COMMIT PRESERVE ROWS;
+CREATE GLOBAL TEMP TABLE temp_table2 ()
+ INHERITS(normal_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO normal_table VALUES (0);
+SELECT * FROM normal_table;
+COMMIT;
+SELECT * FROM normal_table;
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE normal_table;
+
+-- Check SERIAL and BIGSERIAL pseudo-types
+CREATE GLOBAL TEMP TABLE global_temp_table ( aid BIGSERIAL, bid SERIAL );
+CREATE SEQUENCE test_sequence;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+\c
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+DROP TABLE global_temp_table;
+DROP SEQUENCE test_sequence;
diff --git a/src/test/regress/sql/session_table.sql b/src/test/regress/sql/session_table.sql
new file mode 100644
index 0000000..c6663dc
--- /dev/null
+++ b/src/test/regress/sql/session_table.sql
@@ -0,0 +1,18 @@
+create session table my_private_table(x integer primary key, y integer);
+insert into my_private_table values (generate_series(1,10000), generate_series(1,10000));
+select count(*) from my_private_table;
+\c
+select count(*) from my_private_table;
+select * from my_private_table where x=10001;
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+create index on my_private_table(y);
+select * from my_private_table where x=10001;
+select * from my_private_table where y=10001;
+select count(*) from my_private_table;
+\c
+select * from my_private_table where x=100001;
+select * from my_private_table order by y desc limit 1;
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+select * from my_private_table where x=100001;
+select * from my_private_table order by y desc limit 1;
+drop table my_private_table;
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-11-06 13:24 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-06 13:24 UTC (permalink / raw)
To: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
Dear Hackers
I attached the patch of GTT implementationI base on PG12.
The GTT design came from my first email.
Some limitations in patch will be eliminated in later versions.
Later, I will comment on Konstantin's patch and make some proposals for cooperation.
Looking forward to your feedback.
Thanks.
Zeng Wenjing
> 2019年10月29日 上午12:40,Robert Haas <[email protected]> 写道:
>
> On Mon, Oct 28, 2019 at 9:37 AM Konstantin Knizhnik
> <[email protected]> wrote:
>> Sorry, but both statements are not true.
>
> Well, I think they are true.
>
>> I am not sure how vital is lack of aborts for transactions working with
>> GTT at replica.
>> Some people said that there is no sense in aborts of read-only
>> transactions at replica (despite to the fact that them are saving
>> intermediate results in GTT).
>> Some people said something similar with your's "dead on arrival".
>> But inconsistency is not possible: if such transaction is really
>> aborted, then backend is terminated and nobody can see this inconsistency.
>
> Aborting the current transaction is a very different thing from
> terminating the backend.
>
> Also, the idea that there is no sense in aborts of read-only
> transactions on a replica seems totally wrong. Suppose that you insert
> a row into the table and then you go to insert a row in each index,
> but one of the index inserts fails - duplicate key, out of memory
> error, I/O error, whatever. Now the table and the index are
> inconsistent. Normally, we're protected against this by MVCC, but if
> you use a solution that breaks MVCC by using the same XID for all
> transactions, then it can happen.
>
>> Concerning second alternative: you can check yourself that it is not
>> *extremely* complicated and invasive.
>> I extracted changes which are related with handling transactions at
>> replica and attached them to this mail.
>> It is just 500 lines (including diff contexts). Certainly there are some
>> limitation of this implementation: number of transactions working with
>> GTT at replica is limited by 2^32
>> and since GTT tuples are not frozen, analog of GTT CLOG kept in memory
>> is never truncated.
>
> I admit that this patch is not lengthy, but there remains the question
> of whether it is correct. It's possible that the problem isn't as
> complicated as I think it is, but I do think there are quite a number
> of reasons why this patch wouldn't be considered acceptable...
>
>> I agree with it and think that implementation of GTT with private
>> buffers and no replica access is good starting point.
>
> ...but given that we seem to agree on this point, perhaps it isn't
> necessary to argue about those things right now.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] global_temporary_table_v1.patch (136.5K, ../../[email protected]/2-global_temporary_table_v1.patch)
download | inline diff:
From fbe31fe0202bd3563235963b00050193bb32b618 Mon Sep 17 00:00:00 2001
From: wenjing.zwj <[email protected]>
Date: Tue, 25 Jun 2019 17:44:26 +0800
Subject: [PATCH] support global temp table
---
contrib/Makefile | 3 ++-
contrib/pg_gtt/Makefile | 22 ++++++++++++++++++++++
contrib/pg_gtt/pg_gtt--1.0.sql | 28 ++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.control | 4 ++++
src/backend/access/common/reloptions.c | 17 +++++++++++++++++
src/backend/access/gist/gistutil.c | 4 +++-
src/backend/access/hash/hash.c | 4 +++-
src/backend/access/heap/heapam_handler.c | 4 ++--
src/backend/access/heap/vacuumlazy.c | 22 ++++++++++++++++++----
src/backend/access/nbtree/nbtpage.c | 9 ++++++++-
src/backend/access/transam/xlog.c | 4 ++++
src/backend/catalog/Makefile | 2 ++
src/backend/catalog/catalog.c | 2 ++
src/backend/catalog/heap.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
src/backend/catalog/index.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
src/backend/catalog/namespace.c | 7 +++++++
src/backend/catalog/storage.c | 17 ++++++++++++++++-
src/backend/catalog/storage_gtt.c | 814 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/commands/analyze.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
src/backend/commands/cluster.c | 6 ++++++
src/backend/commands/indexcmds.c | 10 ++++++++++
src/backend/commands/lockcmds.c | 3 ++-
src/backend/commands/tablecmds.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
src/backend/commands/vacuum.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
src/backend/optimizer/path/allpaths.c | 8 +++++++-
src/backend/optimizer/plan/planner.c | 2 ++
src/backend/optimizer/util/plancat.c | 33 ++++++++++++++++++++-------------
src/backend/parser/analyze.c | 5 +++++
src/backend/parser/gram.y | 20 ++++----------------
src/backend/parser/parse_relation.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/backend/parser/parse_utilcmd.c | 7 +++++++
src/backend/postmaster/autovacuum.c | 9 ++++++++-
src/backend/storage/buffer/bufmgr.c | 31 +++++++++++++++++++++++++++----
src/backend/storage/ipc/ipci.c | 4 ++++
src/backend/storage/ipc/procarray.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/storage/lmgr/proc.c | 2 ++
src/backend/storage/smgr/md.c | 6 ++++++
src/backend/utils/adt/dbsize.c | 4 ++++
src/backend/utils/adt/selfuncs.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
src/backend/utils/cache/lsyscache.c | 14 ++++++++++++++
src/backend/utils/cache/relcache.c | 19 ++++++++++++++++++-
src/backend/utils/misc/guc.c | 21 +++++++++++++++++++++
src/bin/pg_dump/pg_dump.c | 11 +++++++++--
src/include/catalog/pg_class.h | 1 +
src/include/catalog/storage.h | 2 +-
src/include/catalog/storage_gtt.h | 39 +++++++++++++++++++++++++++++++++++++++
src/include/parser/parse_relation.h | 3 +++
src/include/storage/lwlock.h | 1 +
src/include/storage/proc.h | 2 ++
src/include/storage/procarray.h | 2 ++
src/include/utils/guc.h | 4 ++++
src/include/utils/rel.h | 15 ++++++++++++++-
src/test/regress/expected/gtt_clean.out | 7 +++++++
src/test/regress/expected/gtt_error.out | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_1.out | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_2.out | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_prepare.out | 7 +++++++
src/test/regress/parallel_schedule | 6 ++++++
src/test/regress/sql/gtt_clean.sql | 6 ++++++
src/test/regress/sql/gtt_error.sql | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_1.sql | 42 ++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_2.sql | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_prepare.sql | 15 +++++++++++++++
64 files changed, 2848 insertions(+), 170 deletions(-)
create mode 100644 contrib/pg_gtt/Makefile
create mode 100644 contrib/pg_gtt/pg_gtt--1.0.sql
create mode 100644 contrib/pg_gtt/pg_gtt.c
create mode 100644 contrib/pg_gtt/pg_gtt.control
create mode 100644 src/backend/catalog/storage_gtt.c
create mode 100644 src/include/catalog/storage_gtt.h
create mode 100644 src/test/regress/expected/gtt_clean.out
create mode 100644 src/test/regress/expected/gtt_error.out
create mode 100644 src/test/regress/expected/gtt_parallel_1.out
create mode 100644 src/test/regress/expected/gtt_parallel_2.out
create mode 100644 src/test/regress/expected/gtt_prepare.out
create mode 100644 src/test/regress/sql/gtt_clean.sql
create mode 100644 src/test/regress/sql/gtt_error.sql
create mode 100644 src/test/regress/sql/gtt_parallel_1.sql
create mode 100644 src/test/regress/sql/gtt_parallel_2.sql
create mode 100644 src/test/regress/sql/gtt_prepare.sql
diff --git a/contrib/Makefile b/contrib/Makefile
index 92184ed..4b1a596 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -48,7 +48,8 @@ SUBDIRS = \
tsm_system_rows \
tsm_system_time \
unaccent \
- vacuumlo
+ vacuumlo \
+ pg_gtt
ifeq ($(with_openssl),yes)
SUBDIRS += sslinfo
diff --git a/contrib/pg_gtt/Makefile b/contrib/pg_gtt/Makefile
new file mode 100644
index 0000000..1d2ef64
--- /dev/null
+++ b/contrib/pg_gtt/Makefile
@@ -0,0 +1,22 @@
+# contrib/pg_gtt/Makefile
+
+MODULE_big = pg_gtt
+OBJS = pg_gtt.o
+
+EXTENSION = pg_gtt
+DATA = pg_gtt--1.0.sql
+
+LDFLAGS_SL += $(filter -lm, $(LIBS))
+
+NO_INSTALLCHECK = 1
+
+ifdef USE_PGXS
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
+else
+subdir = contrib/pg_pfs
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/contrib/pg_gtt/pg_gtt--1.0.sql b/contrib/pg_gtt/pg_gtt--1.0.sql
new file mode 100644
index 0000000..3f794d7
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt--1.0.sql
@@ -0,0 +1,28 @@
+/* contrib/pg_gtt/pg_gtt--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION pg_gtt" to load this file. \quit
+
+
+CREATE FUNCTION pg_gtt_att_statistic(text, text, int)
+RETURNS setof pg_statistic
+AS 'MODULE_PATHNAME','pg_gtt_att_statistic'
+LANGUAGE C STRICT;
+
+CREATE TYPE relstats_type AS (relpages int4, reltuples float4, relallvisible int4, relfrozenxid xid, relminmxid xid);
+CREATE TYPE rel_vac_type AS (pid int4, relfrozenxid xid, relminmxid xid);
+
+CREATE FUNCTION pg_gtt_relstats(text, text)
+RETURNS relstats_type
+AS 'MODULE_PATHNAME','pg_gtt_relstats'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_gtt_attached_pid(text, text)
+RETURNS setof int4
+AS 'MODULE_PATHNAME','pg_gtt_attached_pid'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_list_gtt_relfrozenxids()
+RETURNS setof rel_vac_type
+AS 'MODULE_PATHNAME','pg_list_gtt_relfrozenxids'
+LANGUAGE C STRICT;
diff --git a/contrib/pg_gtt/pg_gtt.c b/contrib/pg_gtt/pg_gtt.c
new file mode 100644
index 0000000..19e1ec0
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.c
@@ -0,0 +1,474 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_gtt.c
+ * code to management function for global temparary table
+ *
+ * IDENTIFICATION
+ * contrib/pg_gtt/pg_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres.h"
+
+#include <unistd.h>
+#include <sys/time.h>
+#include "port.h"
+#include "access/htup_details.h"
+#include "access/table.h"
+#include "access/xlog.h"
+#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/namespace.h"
+#include "catalog/pg_class.h"
+#include "funcapi.h"
+#include "storage/ipc.h"
+#include "storage/shmem.h"
+#include "storage/lwlock.h"
+#include "storage/procarray.h"
+#include "storage/proc.h"
+#include "tcop/utility.h"
+#include "utils/builtins.h"
+#include "utils/memutils.h"
+#include "utils/timeout.h"
+#include "utils/guc.h"
+#include "utils/lsyscache.h"
+#include "utils/rel.h"
+#include <nodes/makefuncs.h>
+#include "storage/sinvaladt.h"
+#include "miscadmin.h"
+
+PG_MODULE_MAGIC;
+
+static Oid pg_get_relid(const char *relname, char *schema);
+
+Datum pg_gtt_att_statistic(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_att_statistic);
+
+Datum pg_gtt_relstats(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_relstats);
+
+Datum pg_gtt_attached_pid(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_attached_pid);
+
+Datum pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_list_gtt_relfrozenxids);
+
+void _PG_init(void);
+void _PG_fini(void);
+
+void
+_PG_init(void)
+{
+ return;
+}
+
+void
+_PG_fini(void)
+{
+ return;
+}
+
+static Oid
+pg_get_relid(const char *relname, char *schema)
+{
+ Oid relid;
+ RangeVar *rv = makeRangeVar(schema, (char *)relname, -1);
+
+ relid = RangeVarGetRelid(rv, NoLock, true);
+
+ pfree(rv);
+ return relid;
+}
+
+Datum
+pg_gtt_att_statistic(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Relation rel = NULL;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ int attnum = PG_GETARG_INT32(2);
+ Oid reloid;
+ char rel_persistence;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(31);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starelid",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "staattnum",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "stainherit",
+ BOOLOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "stanullfrac",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "stawidth",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 6, "stadistinct",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 7, "stakind1",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 8, "stakind2",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 9, "stakind3",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 10, "stakind4",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 11, "stakind5",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 12, "staop1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 13, "staop2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 14, "staop3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 15, "staop4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 16, "staop5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 17, "stacoll1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 18, "stacoll2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 19, "stacoll3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 20, "stacoll4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 21, "stacoll5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 22, "stanumbers1",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 23, "stanumbers2",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 24, "stanumbers3",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 25, "stanumbers4",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 26, "stanumbers5",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 27, "stavalues1",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 28, "stavalues2",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 29, "stavalues3",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 30, "stavalues4",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 31, "stavalues5",
+ ANYARRAYOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ tuple = get_gtt_att_statistic(reloid, attnum, false);
+ if (tuple)
+ {
+ HeapTuple tp = heap_copytuple(tuple);
+ tuplestore_puttuple(tupstore, tp);
+ }
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_relstats(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[5];
+ bool isnull[5];
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
+ uint32 relfrozenxid = 0;
+ uint32 relminmxid = 0;
+ Relation rel = NULL;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(5);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpages",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "reltuples",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relallvisible",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ table_close(rel, NoLock);
+ return (Datum) 0;
+ }
+
+ get_gtt_relstats(reloid,
+ &relpages, &reltuples, &relallvisible,
+ &relfrozenxid, &relminmxid);
+
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(relpages);
+ values[1] = Float4GetDatum((float4)reltuples);
+ values[2] = Int32GetDatum(relallvisible);
+ values[3] = UInt32GetDatum(relfrozenxid);
+ values[4] = UInt32GetDatum(relminmxid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_attached_pid(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[1];
+ bool isnull[1];
+ Relation rel = NULL;
+ PGPROC *proc = NULL;
+ Bitmapset *map = NULL;
+ pid_t pid = 0;
+ int backendid = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(1);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ map = copy_active_gtt_bitmap(rel->rd_node);
+ if (map)
+ {
+ backendid = bms_first_member(map);
+
+ do
+ {
+ proc = BackendIdGetProc(backendid);
+ pid = proc->pid;
+ if (pid > 0)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ backendid = bms_next_member(map, backendid);
+ } while (backendid > 0);
+
+ pfree(map);
+ }
+
+ tuplestore_donestoring(tupstore);
+ table_close(rel, NoLock);
+
+ return (Datum) 0;
+}
+
+Datum
+pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Datum values[3];
+ bool isnull[3];
+ int num_xid = MaxBackends + 1;
+ int *pids = NULL;
+ uint32 *xids = NULL;
+ int i = 0;
+ int j = 0;
+ uint32 oldest = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(3);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (max_active_gtt <= 0)
+ return (Datum) 0;
+
+ if (RecoveryInProgress())
+ return (Datum) 0;
+
+ pids = palloc0(sizeof(int) * num_xid);
+ xids = palloc0(sizeof(int) * num_xid);
+ oldest = list_all_session_gtt_frozenxids(num_xid, pids, xids, &i);
+ if (i > 0)
+ {
+ if (i > 0)
+ {
+ pids[i] = 0;
+ xids[i] = oldest;
+ i++;
+ }
+
+ for(j = 0; j < i; j++)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pids[j]);
+ values[1] = UInt32GetDatum(xids[j]);
+ values[2] = UInt32GetDatum(0);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ }
+ tuplestore_donestoring(tupstore);
+ pfree(pids);
+ pfree(xids);
+
+ return (Datum) 0;
+}
+
diff --git a/contrib/pg_gtt/pg_gtt.control b/contrib/pg_gtt/pg_gtt.control
new file mode 100644
index 0000000..342af1d
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.control
@@ -0,0 +1,4 @@
+comment = 'pg_gtt'
+default_version = '1.0'
+module_pathname = '$libdir/pg_gtt'
+relocatable = true
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 2e1dcb9..3eb57df 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -158,6 +158,19 @@ static relopt_bool boolRelOpts[] =
},
true
},
+ /*
+ * For global temp table only
+ * use AccessExclusiveLock for ensure safety
+ */
+ {
+ {
+ "on_commit_delete_rows",
+ "global temp table on commit options",
+ RELOPT_KIND_HEAP,
+ ShareUpdateExclusiveLock
+ },
+ true
+ },
/* list terminator */
{{NULL}}
};
@@ -1378,7 +1391,11 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
relopt_value *options;
StdRdOptions *rdopts;
int numoptions;
+
+ /* add on_commit_delete_rows for global temp table */
static const relopt_parse_elt tab[] = {
+ {"on_commit_delete_rows", RELOPT_TYPE_BOOL,
+ offsetof(StdRdOptions, on_commit_delete_rows)},
{"fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor)},
{"autovacuum_enabled", RELOPT_TYPE_BOOL,
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index f428729..6c9b052 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1028,7 +1028,9 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ /* global temp is same as local temp table */
+ if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 5cc30da..49b7d2e 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -148,7 +148,9 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* metapage, nor the first bitmap page.
*/
sort_threshold = (maintenance_work_mem * 1024L) / BLCKSZ;
- if (index->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ if (!(index->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ index->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
sort_threshold = Min(sort_threshold, NBuffers);
else
sort_threshold = Min(sort_threshold, NLocBuffer);
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index fc19f40..681521a 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -602,7 +602,7 @@ heapam_relation_set_new_filenode(Relation rel,
*/
*minmulti = GetOldestMultiXactId();
- srel = RelationCreateStorage(*newrnode, persistence);
+ srel = RelationCreateStorage(*newrnode, persistence, rel);
/*
* If required, set up an init fork for an unlogged table so that it can
@@ -655,7 +655,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index a3c4a1d..03fac55 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -60,6 +60,7 @@
#include "utils/pg_rusage.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/*
* Space/time tradeoff parameters: do these need to be user-tunable?
@@ -214,8 +215,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
Assert(params->truncate != VACOPT_TERNARY_DEFAULT);
/* not every AM requires these to be valid, but heap does */
- Assert(TransactionIdIsNormal(onerel->rd_rel->relfrozenxid));
- Assert(MultiXactIdIsValid(onerel->rd_rel->relminmxid));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relfrozenxid == InvalidTransactionId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && TransactionIdIsNormal(onerel->rd_rel->relfrozenxid)));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relminmxid == InvalidMultiXactId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && MultiXactIdIsValid(onerel->rd_rel->relminmxid)));
/* measure elapsed time iff autovacuum logging requires it */
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
@@ -274,8 +277,19 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
vacrelstats = (LVRelStats *) palloc0(sizeof(LVRelStats));
- vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
- vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ /* get relstat from gtt localhash */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ &vacrelstats->old_rel_pages,
+ &vacrelstats->old_live_tuples,
+ NULL, NULL, NULL);
+ }
+ else
+ {
+ vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
+ vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ }
vacrelstats->num_index_scans = 0;
vacrelstats->pages_removed = 0;
vacrelstats->lock_waiter_detected = false;
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 6b2655c..dcb5acb 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -765,7 +765,14 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+
+ /* global temp table may be not yet initialized for this backend. */
+ if (RELATION_IS_GLOBAL_TEMP(rel) &&
+ blkno == BTREE_METAPAGE &&
+ PageIsNew(BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 77ad765..9ff98ff 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6319,6 +6319,10 @@ StartupXLOG(void)
else
recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
+ /* clean temp relation files */
+ if (max_active_gtt > 0)
+ RemovePgTempFiles();
+
/*
* Check for signal files, and if so set up state for offline recovery
*/
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 8bece07..470683b 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -21,6 +21,8 @@ OBJS = catalog.o dependency.o heap.o index.o indexing.o namespace.o aclchk.o \
pg_db_role_setting.o pg_shdepend.o pg_subscription.o pg_type.o \
storage.o toasting.o
+OBJS += storage_gtt.o
+
BKIFILES = postgres.bki postgres.description postgres.shdescription
include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index a065419..db86aa6 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -406,7 +406,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
switch (relpersistence)
{
+ /* global temp table is same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
break;
case RELPERSISTENCE_UNLOGGED:
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index b8b4768..832a3f1 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -61,6 +61,7 @@
#include "catalog/pg_type.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "commands/tablecmds.h"
#include "commands/typecmds.h"
#include "executor/executor.h"
@@ -100,6 +101,7 @@ static void AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -406,6 +408,10 @@ heap_create(const char *relname,
relpersistence,
relkind);
+ /* global temp table not create storage file when catalog create */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ create_storage = false;
+
/*
* Have the storage manager create the relation's disk file, if needed.
*
@@ -429,7 +435,7 @@ heap_create(const char *relname,
case RELKIND_INDEX:
case RELKIND_SEQUENCE:
- RelationCreateStorage(rel->rd_node, relpersistence);
+ RelationCreateStorage(rel->rd_node, relpersistence, rel);
break;
case RELKIND_RELATION:
@@ -926,6 +932,7 @@ AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -964,8 +971,18 @@ AddNewRelationTuple(Relation pg_class_desc,
break;
}
- new_rel_reltup->relfrozenxid = relfrozenxid;
- new_rel_reltup->relminmxid = relminmxid;
+ /* global temp table not remember transaction info in catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ new_rel_reltup->relfrozenxid = InvalidTransactionId;
+ new_rel_reltup->relminmxid = InvalidMultiXactId;
+ }
+ else
+ {
+ new_rel_reltup->relfrozenxid = relfrozenxid;
+ new_rel_reltup->relminmxid = relminmxid;
+ }
+
new_rel_reltup->relowner = relowner;
new_rel_reltup->reltype = new_type_oid;
new_rel_reltup->reloftype = reloftype;
@@ -1327,6 +1344,7 @@ heap_create_with_catalog(const char *relname,
reloftypeid,
ownerid,
relkind,
+ relpersistence,
relfrozenxid,
relminmxid,
PointerGetDatum(relacl),
@@ -1411,11 +1429,15 @@ heap_create_with_catalog(const char *relname,
*/
StoreConstraints(new_rel_desc, cooked_constraints, is_internal);
- /*
- * If there's a special on-commit action, remember it
- */
- if (oncommit != ONCOMMIT_NOOP)
- register_on_commit_action(relid, oncommit);
+ /* global temp table register action when storage init */
+ if (relpersistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /*
+ * If there's a special on-commit action, remember it
+ */
+ if (oncommit != ONCOMMIT_NOOP)
+ register_on_commit_action(relid, oncommit);
+ }
/*
* ok, the relation has been cataloged, so close our relations and return
@@ -1907,6 +1929,13 @@ heap_drop_with_catalog(Oid relid)
if (relid == defaultPartOid)
update_default_partition_oid(parentOid, InvalidOid);
+ /* We allow to drop global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ if (is_other_backend_use_gtt(rel->rd_node))
+ elog(ERROR, "can not drop relation when other backend attached this global temp table");
+ }
+
/*
* Schedule unlinking of the relation's physical files at commit.
*/
@@ -3133,9 +3162,10 @@ RemoveStatistics(Oid relid, AttrNumber attnum)
*
* The routine will truncate and then reconstruct the indexes on
* the specified relation. Caller must hold exclusive lock on rel.
+ *
*/
static void
-RelationTruncateIndexes(Relation heapRelation)
+RelationTruncateIndexes(Relation heapRelation, LOCKMODE lockmode)
{
ListCell *indlist;
@@ -3147,7 +3177,7 @@ RelationTruncateIndexes(Relation heapRelation)
IndexInfo *indexInfo;
/* Open the index relation; use exclusive lock, just to be sure */
- currentIndex = index_open(indexId, AccessExclusiveLock);
+ currentIndex = index_open(indexId, lockmode);
/* Fetch info needed for index_build */
indexInfo = BuildIndexInfo(currentIndex);
@@ -3186,8 +3216,13 @@ heap_truncate(List *relids)
{
Oid rid = lfirst_oid(cell);
Relation rel;
+ LOCKMODE lockmode = AccessExclusiveLock;
- rel = table_open(rid, AccessExclusiveLock);
+ /* truncate global temp table only need RowExclusiveLock */
+ if (get_rel_persistence(rid) == RELPERSISTENCE_GLOBAL_TEMP)
+ lockmode = RowExclusiveLock;
+
+ rel = table_open(rid, lockmode);
relations = lappend(relations, rel);
}
@@ -3220,6 +3255,8 @@ void
heap_truncate_one_rel(Relation rel)
{
Oid toastrelid;
+ LOCKMODE lockmode = AccessExclusiveLock;
+ bool truncate_toastrel = false;
/*
* Truncate the relation. Partitioned tables have no storage, so there is
@@ -3228,23 +3265,40 @@ heap_truncate_one_rel(Relation rel)
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
return;
+ toastrelid = rel->rd_rel->reltoastrelid;
+
+ /*
+ * Truncate global temp table only need RowExclusiveLock
+ */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ lockmode = RowExclusiveLock;
+ if (OidIsValid(toastrelid) &&
+ gtt_storage_attached(toastrelid))
+ truncate_toastrel = true;
+ }
+ else if (OidIsValid(toastrelid))
+ truncate_toastrel = true;
+
/* Truncate the underlying relation */
table_relation_nontransactional_truncate(rel);
/* If the relation has indexes, truncate the indexes too */
- RelationTruncateIndexes(rel);
+ RelationTruncateIndexes(rel, lockmode);
/* If there is a toast table, truncate that too */
- toastrelid = rel->rd_rel->reltoastrelid;
- if (OidIsValid(toastrelid))
+ if (truncate_toastrel)
{
- Relation toastrel = table_open(toastrelid, AccessExclusiveLock);
+ Relation toastrel = table_open(toastrelid, lockmode);
table_relation_nontransactional_truncate(toastrel);
- RelationTruncateIndexes(toastrel);
+ RelationTruncateIndexes(toastrel, lockmode);
/* keep the lock... */
table_close(toastrel, NoLock);
}
+
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ up_gtt_relstats(rel, 0, 0, 0, RecentXmin, InvalidMultiXactId);
}
/*
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 4f54631..3026309 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -52,6 +52,7 @@
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
#include "catalog/storage.h"
+#include "catalog/storage_gtt.h"
#include "commands/event_trigger.h"
#include "commands/progress.h"
#include "commands/tablecmds.h"
@@ -879,6 +880,26 @@ index_create(Relation heapRelation,
indexRelationName, RelationGetRelationName(heapRelation))));
}
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ if (accessMethodObjectId != BTREE_AM_OID)
+ elog(ERROR, "only support btree index on global temp table");
+
+ /* We allow to create index on global temp table only this session use it */
+ if (is_other_backend_use_gtt(heapRelation->rd_node) ||
+ gtt_storage_attached(heapRelation->rd_node.relNode))
+ elog(ERROR, "can not create index when have one or more backend attached this global temp table");
+
+ /* No support create index on global temp table use concurrent mode yet */
+ if (concurrent)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot create indexes on global temporary tables using concurrent mode")));
+
+ /* if global temp table not init storage, then skip build index */
+ flags |= INDEX_CREATE_SKIP_BUILD;
+ }
+
/*
* construct tuple descriptor for index tuples
*/
@@ -2040,6 +2061,13 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
*/
CheckTableNotInUse(userIndexRelation, "DROP INDEX");
+ /* We allow to drop index on global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(userHeapRelation))
+ {
+ if (is_other_backend_use_gtt(userHeapRelation->rd_node))
+ elog(ERROR, "can not drop index when other backend attached this global temp table");
+ }
+
/*
* Drop Index Concurrently is more or less the reverse process of Create
* Index Concurrently.
@@ -2699,20 +2727,29 @@ index_update_stats(Relation rel,
else /* don't bother for indexes */
relallvisible = 0;
- if (rd_rel->relpages != (int32) relpages)
+ /* update index stats into localhash for global temp table */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
{
- rd_rel->relpages = (int32) relpages;
- dirty = true;
+ up_gtt_relstats(rel, relpages, reltuples, relallvisible,
+ InvalidTransactionId, InvalidMultiXactId);
}
- if (rd_rel->reltuples != (float4) reltuples)
- {
- rd_rel->reltuples = (float4) reltuples;
- dirty = true;
- }
- if (rd_rel->relallvisible != (int32) relallvisible)
+ else
{
- rd_rel->relallvisible = (int32) relallvisible;
- dirty = true;
+ if (rd_rel->relpages != (int32) relpages)
+ {
+ rd_rel->relpages = (int32) relpages;
+ dirty = true;
+ }
+ if (rd_rel->reltuples != (float4) reltuples)
+ {
+ rd_rel->reltuples = (float4) reltuples;
+ dirty = true;
+ }
+ if (rd_rel->relallvisible != (int32) relallvisible)
+ {
+ rd_rel->relallvisible = (int32) relallvisible;
+ dirty = true;
+ }
}
}
@@ -2827,6 +2864,13 @@ index_build(Relation heapRelation,
pgstat_progress_update_multi_param(6, index, val);
}
+ /* POALR */
+ if (RELATION_IS_GLOBAL_TEMP(indexRelation))
+ {
+ if (!gtt_storage_attached(indexRelation->rd_node.relNode))
+ RelationCreateStorage(indexRelation->rd_node, RELPERSISTENCE_GLOBAL_TEMP, indexRelation);
+ }
+
/*
* Call the access method's build procedure
*/
@@ -3159,12 +3203,22 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
/*
* Scan the index and gather up all the TIDs into a tuplesort object.
*/
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = indexRelation;
ivinfo.analyze_only = false;
ivinfo.report_progress = true;
ivinfo.estimated_count = true;
ivinfo.message_level = DEBUG2;
- ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
+
+ /* get relstats abort global temp table from hashtable, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ get_gtt_relstats(RelationGetRelid(heapRelation),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
ivinfo.strategy = NULL;
/*
@@ -3422,6 +3476,15 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
errmsg("cannot reindex temporary tables of other sessions")));
/*
+ * Because global temp table cannot change relfilenode
+ * no support reindex on global temp table yet.
+ */
+ if (RELATION_IS_GLOBAL_TEMP(iRel))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot reindex global temporary tables")));
+
+ /*
* Also check for active uses of the index in the current transaction; we
* don't want to reindex underneath an open indexscan.
*/
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 8d0896c..4c04833 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -647,6 +647,13 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
errmsg("cannot create temporary relation in non-temporary schema")));
}
break;
+ /* global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ if (isAnyTempNamespace(nspid))
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot create global temp relations in temporary schemas")));
+ break;
case RELPERSISTENCE_PERMANENT:
if (isTempOrTempToastNamespace(nspid))
newRelation->relpersistence = RELPERSISTENCE_TEMP;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 3cc886f..6295f81 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -28,6 +28,7 @@
#include "access/xlogutils.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "storage/freespace.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
@@ -74,9 +75,10 @@ static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
*
* This function is transactional. The creation is WAL-logged, and if the
* transaction aborts later on, the storage will be destroyed.
+ *
*/
SMgrRelation
-RelationCreateStorage(RelFileNode rnode, char relpersistence)
+RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel)
{
PendingRelDelete *pending;
SMgrRelation srel;
@@ -86,6 +88,8 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
switch (relpersistence)
{
case RELPERSISTENCE_TEMP:
+ /* global temp table use same storage strategy as local temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
needs_wal = false;
break;
@@ -118,6 +122,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
pending->next = pendingDeletes;
pendingDeletes = pending;
+ /* remember global temp table storage info to localhash */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP && rel)
+ remember_gtt_storage_info(rnode, rel);
+
return srel;
}
@@ -455,8 +463,15 @@ smgrDoPendingDeletes(bool isCommit)
smgrdounlinkall(srels, nrels, false);
for (i = 0; i < nrels; i++)
+ {
smgrclose(srels[i]);
+ /* clean global temp table flags when transaction commit or rollback */
+ if (SmgrIsTemp(srels[i]) &&
+ gtt_storage_attached(srels[i]->smgr_rnode.node.relNode))
+ forget_gtt_storage_info(srels[i]->smgr_rnode.node.relNode);
+ }
+
pfree(srels);
}
}
diff --git a/src/backend/catalog/storage_gtt.c b/src/backend/catalog/storage_gtt.c
new file mode 100644
index 0000000..37a8a97
--- /dev/null
+++ b/src/backend/catalog/storage_gtt.c
@@ -0,0 +1,814 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.c
+ * code to create and destroy physical storage for global temparary table
+ *
+ * IDENTIFICATION
+ * src/backend/catalog/storage_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+
+#include "access/visibilitymap.h"
+#include "access/xact.h"
+#include "access/xlog.h"
+#include "access/xloginsert.h"
+#include "access/xlogutils.h"
+#include "access/htup_details.h"
+#include "access/multixact.h"
+#include "catalog/storage.h"
+#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/heap.h"
+#include "commands/tablecmds.h"
+#include "nodes/primnodes.h"
+#include "nodes/pg_list.h"
+#include "miscadmin.h"
+#include "storage/freespace.h"
+#include "storage/smgr.h"
+#include "storage/ipc.h"
+#include "storage/proc.h"
+#include "storage/lwlock.h"
+#include "storage/shmem.h"
+#include "utils/memutils.h"
+#include "utils/rel.h"
+#include "utils/hsearch.h"
+#include "utils/catcache.h"
+#include <utils/relcache.h>
+#include "utils/inval.h"
+#include "utils/guc.h"
+#include "utils/guc.h"
+
+
+/* Copy from bitmapset.c, because gtt used the function in bitmapset.c */
+#define WORDNUM(x) ((x) / BITS_PER_BITMAPWORD)
+#define BITNUM(x) ((x) % BITS_PER_BITMAPWORD)
+
+#define BITMAPSET_SIZE(nwords) \
+ (offsetof(Bitmapset, words) + (nwords) * sizeof(bitmapword))
+
+static bool gtt_cleaner_exit_registered = false;
+static HTAB *gtt_storage_local_hash = NULL;
+static HTAB *active_gtt_shared_hash = NULL;
+static MemoryContext gtt_relstats_context = NULL;
+
+/* relfrozenxid of all gtts in the current session */
+static List *gtt_session_relfrozenxid_list = NIL;
+static TransactionId gtt_session_frozenxid = InvalidTransactionId;
+
+typedef struct gtt_ctl_data
+{
+ LWLock lock;
+ int max_entry;
+ int entry_size;
+}gtt_ctl_data;
+
+static gtt_ctl_data *gtt_shared_ctl = NULL;
+
+typedef struct
+{
+ RelFileNode rnode;
+ Bitmapset *map;
+ /* bitmap data */
+} gtt_shared_hash_entry;
+
+typedef struct
+{
+ Oid relid;
+
+ Oid spcnode;
+ /* pg_class stat */
+ int32 relpages;
+ float4 reltuples;
+ int32 relallvisible;
+ TransactionId relfrozenxid;
+ TransactionId relminmxid;
+ char relkind;
+ bool on_commit_delete;
+
+ /* pg_statistic */
+ int natts;
+ int *attnum;
+ HeapTuple *att_stat_tups;
+} gtt_local_hash_entry;
+
+static Size action_gtt_shared_hash_entry_size(void);
+static void gtt_storage_checkin(RelFileNode rnode);
+static void gtt_storage_checkout(RelFileNode rnode, bool skiplock);
+static void gtt_storage_removeall(int code, Datum arg);
+static void insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid);
+static void remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid);
+static void set_gtt_session_relfrozenxid(void);
+
+static Size
+action_gtt_shared_hash_entry_size(void)
+{
+ int wordnum;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ wordnum = WORDNUM(MaxBackends + 1);
+ hash_entry_size += MAXALIGN(sizeof(gtt_shared_hash_entry));
+ hash_entry_size += MAXALIGN(BITMAPSET_SIZE(wordnum + 1));
+
+ return hash_entry_size;
+}
+
+Size
+active_gtt_shared_hash_size(void)
+{
+ Size size = 0;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ size = MAXALIGN(sizeof(gtt_ctl_data));
+ hash_entry_size = action_gtt_shared_hash_entry_size();
+ size += hash_estimate_size(max_active_gtt, hash_entry_size);
+
+ return size;
+}
+
+void
+active_gtt_shared_hash_init(void)
+{
+ HASHCTL info;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ gtt_shared_ctl =
+ ShmemInitStruct("gtt_shared_ctl",
+ sizeof(gtt_ctl_data),
+ &found);
+
+ if (!found)
+ {
+ LWLockRegisterTranche(LWTRANCHE_GTT_CTL, "gtt_shared_ctl");
+ LWLockInitialize(>t_shared_ctl->lock, LWTRANCHE_GTT_CTL);
+ gtt_shared_ctl->max_entry = max_active_gtt;
+ gtt_shared_ctl->entry_size = action_gtt_shared_hash_entry_size();
+ }
+
+ info.keysize = sizeof(RelFileNode);
+ info.entrysize = gtt_shared_ctl->entry_size;
+ active_gtt_shared_hash =
+ ShmemInitHash("active gtt shared hash",
+ gtt_shared_ctl->max_entry,
+ gtt_shared_ctl->max_entry,
+ &info, HASH_ELEM | HASH_BLOBS | HASH_FIXED_SIZE);
+}
+
+static void
+gtt_storage_checkin(RelFileNode rnode)
+{
+ gtt_shared_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ entry = (gtt_shared_hash_entry *) hash_search(active_gtt_shared_hash,
+ &rnode, HASH_ENTER_NULL, &found);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of shared memory"),
+ errhint("You might need to increase max_active_gtt.")));
+ }
+
+ if (found == false)
+ {
+ int wordnum;
+
+ entry->map = (Bitmapset *)((char *)entry + MAXALIGN(sizeof(gtt_shared_hash_entry)));
+ wordnum = WORDNUM(MaxBackends + 1);
+ memset(entry->map, 0, BITMAPSET_SIZE(wordnum + 1));
+ entry->map->nwords = wordnum + 1;
+ }
+
+ bms_add_member(entry->map, MyBackendId);
+ LWLockRelease(>t_shared_ctl->lock);
+}
+
+static void
+gtt_storage_checkout(RelFileNode rnode, bool skiplock)
+{
+ gtt_shared_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (!skiplock)
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(rnode), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ elog(WARNING, "relfilenode %u/%u/%u not exist in gtt shared hash when forget",
+ rnode.dbNode, rnode.spcNode, rnode.relNode);
+ return;
+ }
+
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+ bms_del_member(entry->map, MyBackendId);
+
+ if (bms_is_empty(entry->map))
+ {
+ if (!hash_search(active_gtt_shared_hash, &rnode, HASH_REMOVE, NULL))
+ elog(PANIC, "gtt shared hash table corrupted");
+ }
+
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return;
+}
+
+Bitmapset *
+copy_active_gtt_bitmap(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ Bitmapset *map_copy = NULL;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return NULL;
+ }
+
+ Assert(entry->map);
+ if (!bms_is_empty(entry->map))
+ map_copy = bms_copy(entry->map);
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return map_copy;
+}
+
+bool
+is_other_backend_use_gtt(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ bool in_use = false;
+ int num_use = 0;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return false;
+ }
+
+ Assert(entry->map);
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+
+ num_use = bms_num_members(entry->map);
+ if (num_use == 0)
+ in_use = false;
+ else if (num_use == 1)
+ {
+ if(bms_is_member(MyBackendId, entry->map))
+ in_use = false;
+ else
+ in_use = true;
+ }
+ else
+ in_use = true;
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return in_use;
+}
+
+void
+remember_gtt_storage_info(RelFileNode rnode, Relation rel)
+{
+ gtt_local_hash_entry *entry;
+ MemoryContext oldcontext;
+ Oid relid = rnode.relNode;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temporary table feature is disable"),
+ errhint("You might need to increase max_active_gtt to enable this feature.")));
+
+ if (RecoveryInProgress())
+ elog(ERROR, "readonly mode not support access global temp table yet");
+
+ if (gtt_storage_local_hash == NULL)
+ {
+#define GTT_LOCAL_HASH_SIZE 1024
+ /* First time through: initialize the hash table */
+ HASHCTL ctl;
+
+ MemSet(&ctl, 0, sizeof(ctl));
+ ctl.keysize = sizeof(Oid);
+ ctl.entrysize = sizeof(gtt_local_hash_entry);
+ gtt_storage_local_hash =
+ hash_create("global temp relation table",
+ GTT_LOCAL_HASH_SIZE,
+ &ctl, HASH_ELEM | HASH_BLOBS);
+
+ if (!CacheMemoryContext)
+ CreateCacheMemoryContext();
+
+ gtt_relstats_context =
+ AllocSetContextCreate(CacheMemoryContext,
+ "gtt relstats context",
+ ALLOCSET_DEFAULT_SIZES);
+ }
+
+ /* Look up or create an entry */
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_ENTER, &found);
+
+ if (found)
+ {
+ elog(ERROR, "backend %d relid %u already exists in global temp table local hash",
+ MyBackendId, relid);
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+
+ entry->spcnode = rnode.spcNode;
+ entry->relpages = 0;
+ entry->reltuples = 0;
+ entry->relallvisible = 0;
+ entry->relkind = rel->rd_rel->relkind;
+ /* only heap contain transaction information */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ int natts = RelationGetNumberOfAttributes(rel);
+ entry->natts = natts;
+ entry->attnum = palloc0(sizeof(int) * natts);
+ entry->att_stat_tups = palloc0(sizeof(HeapTuple) * natts);
+
+ if (RELATION_GTT_ON_COMMIT_DELETE(rel))
+ {
+ entry->on_commit_delete = true;
+ register_on_commit_action(rel->rd_node.relNode, ONCOMMIT_DELETE_ROWS);
+ }
+
+ entry->relfrozenxid = RecentXmin;
+ entry->relminmxid = GetOldestMultiXactId();
+ insert_gtt_relfrozenxid_to_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ gtt_storage_checkin(rnode);
+ }
+ else
+ {
+ entry->natts = 0;
+ entry->attnum = 0;
+ entry->att_stat_tups = NULL;
+ entry->on_commit_delete = false;
+ entry->relfrozenxid = 0;
+ entry->relminmxid = 0;
+ }
+
+ MemoryContextSwitchTo(oldcontext);
+
+ if (!gtt_cleaner_exit_registered)
+ {
+ before_shmem_exit(gtt_storage_removeall, 0);
+ gtt_cleaner_exit_registered = true;
+ }
+
+ return;
+}
+
+void
+forget_gtt_storage_info(Oid relid)
+{
+ gtt_local_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, NULL);
+
+ if (entry && entry->relkind == RELKIND_RELATION)
+ {
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ gtt_storage_checkout(rnode, false);
+
+ Assert(TransactionIdIsNormal(entry->relfrozenxid));
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_REMOVE, NULL);
+
+ return;
+}
+
+/* is the storage file was created in this backend */
+bool
+gtt_storage_attached(Oid relid)
+{
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ if (gtt_storage_local_hash == NULL)
+ return false;
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, &found);
+
+ return found;
+}
+
+static void
+gtt_storage_removeall(int code, Datum arg)
+{
+ HASH_SEQ_STATUS status;
+ gtt_local_hash_entry *entry;
+ int nrels = 0,
+ maxrels = 0;
+ SMgrRelation *srels = NULL;
+ RelFileNode *rnodes = NULL;
+ char *relkinds = NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ hash_seq_init(&status, gtt_storage_local_hash);
+ while ((entry = (gtt_local_hash_entry *) hash_seq_search(&status)) != NULL)
+ {
+ SMgrRelation srel;
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ srel = smgropen(rnode, MyBackendId);
+
+ /* allocate the initial array, or extend it, if needed */
+ if (maxrels == 0)
+ {
+ maxrels = 32;
+ srels = palloc(sizeof(SMgrRelation) * maxrels);
+ rnodes = palloc(sizeof(RelFileNode) * maxrels);
+ relkinds = palloc(sizeof(char) * maxrels);
+ }
+ else if (maxrels <= nrels)
+ {
+ maxrels *= 2;
+ srels = repalloc(srels, sizeof(SMgrRelation) * maxrels);
+ rnodes = repalloc(rnodes, sizeof(RelFileNode) * maxrels);
+ relkinds = repalloc(relkinds, sizeof(char) * maxrels);
+ }
+
+ srels[nrels] = srel;
+ rnodes[nrels] = rnode;
+ relkinds[nrels] = entry->relkind;
+ nrels++;
+ }
+
+ if (nrels > 0)
+ {
+ int i;
+
+ smgrdounlinkall(srels, nrels, false);
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ for (i = 0; i < nrels; i++)
+ {
+ smgrclose(srels[i]);
+ if (relkinds[i] == RELKIND_RELATION)
+ gtt_storage_checkout(rnodes[i], true);
+ }
+ LWLockRelease(>t_shared_ctl->lock);
+
+ pfree(srels);
+ pfree(rnodes);
+ pfree(relkinds);
+ }
+
+ MyProc->session_gtt_frozenxid = InvalidTransactionId;
+
+ return;
+}
+
+/*
+ * Update global temp table relstats(relpage/reltuple/relallvisible)
+ * to local hashtable
+ */
+void
+up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid)
+{
+ Oid relid = RelationGetRelid(relation);
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->spcnode);
+
+ if (num_pages >= 0 &&
+ entry->relpages != (int32)num_pages)
+ entry->relpages = (int32)num_pages;
+
+ if (num_tuples >= 0 &&
+ num_tuples != (float4)entry->reltuples)
+ entry->reltuples = (float4)num_tuples;
+
+ /* only heap contain transaction information and relallvisible */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ if (entry->relallvisible >= 0 &&
+ entry->relallvisible != (int32)num_all_visible_pages)
+ {
+ entry->relallvisible = (int32)num_all_visible_pages;
+ }
+
+ if (TransactionIdIsNormal(relfrozenxid) &&
+ entry->relfrozenxid != relfrozenxid &&
+ (TransactionIdPrecedes(entry->relfrozenxid, relfrozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(), entry->relfrozenxid)))
+ {
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ entry->relfrozenxid = relfrozenxid;
+ insert_gtt_relfrozenxid_to_ordered_list(relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ if (MultiXactIdIsValid(relminmxid) &&
+ entry->relminmxid != relminmxid &&
+ (MultiXactIdPrecedes(entry->relminmxid, relminmxid) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), entry->relminmxid)))
+ {
+ entry->relminmxid = relminmxid;
+ }
+ }
+
+ return;
+}
+
+/*
+ * Search global temp table relstats(relpage/reltuple/relallvisible)
+ * from local hashtable.
+ */
+void
+get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->relid == relid);
+
+ if (relpages)
+ *relpages = entry->relpages;
+
+ if (reltuples)
+ *reltuples = entry->reltuples;
+
+ if (relallvisible)
+ *relallvisible = entry->relallvisible;
+
+ if (relfrozenxid)
+ *relfrozenxid = entry->relfrozenxid;
+
+ if (relminmxid)
+ *relminmxid = entry->relminmxid;
+
+ return;
+}
+
+/*
+ * Update global temp table statistic info(definition is same as pg_statistic)
+ * to local hashtable where ananyze global temp table
+ */
+void
+up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ MemoryContext oldcontext;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ if (entry->relkind != RELKIND_RELATION)
+ {
+ elog(WARNING, "oid %u not a relation", reloid);
+ return;
+ }
+
+ /* todo */
+ if (entry->natts < natts)
+ {
+ elog(WARNING, "reloid %u not support update attstat after add colunm", reloid);
+ return;
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ Assert(entry->relid == reloid);
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == 0)
+ {
+ entry->attnum[i] = attnum;
+ break;
+ }
+ else if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ heap_freetuple(entry->att_stat_tups[i]);
+ entry->att_stat_tups[i] = NULL;
+ break;
+ }
+ }
+
+ Assert(i < entry->natts);
+ Assert(entry->att_stat_tups[i] == NULL);
+ entry->att_stat_tups[i] = heap_form_tuple(tupleDescriptor, values, isnull);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+/*
+ * Search global temp table statistic info(definition is same as pg_statistic)
+ * from local hashtable.
+ */
+HeapTuple
+get_gtt_att_statistic(Oid reloid, int attnum, bool inh)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return NULL;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return NULL;
+
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ return entry->att_stat_tups[i];
+ }
+ }
+
+ return NULL;
+}
+
+void
+release_gtt_statistic_cache(HeapTuple tup)
+{
+ /* do nothing */
+ return;
+}
+
+static void
+insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid)
+{
+ MemoryContext oldcontext;
+ ListCell *prev;
+
+ Assert(TransactionIdIsNormal(relfrozenxid));
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ /* Does the datum belong at the front? */
+ if (gtt_session_relfrozenxid_list == NIL ||
+ TransactionIdFollowsOrEquals(relfrozenxid,
+ linitial_oid(gtt_session_relfrozenxid_list)))
+ {
+ gtt_session_relfrozenxid_list =
+ lcons_oid(relfrozenxid, gtt_session_relfrozenxid_list);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+ }
+ /* No, so find the entry it belongs after */
+ prev = list_head(gtt_session_relfrozenxid_list);
+ for (;;)
+ {
+ ListCell *curr = lnext(prev);
+
+ if (curr == NULL ||
+ TransactionIdFollowsOrEquals(relfrozenxid, lfirst_oid(curr)))
+ break; /* it belongs after 'prev', before 'curr' */
+
+ prev = curr;
+ }
+ /* Insert datum into list after 'prev' */
+ lappend_cell_oid(gtt_session_relfrozenxid_list, prev, relfrozenxid);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+static void
+remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid)
+{
+ gtt_session_relfrozenxid_list =
+ list_delete_oid(gtt_session_relfrozenxid_list, relfrozenxid);
+}
+
+static void
+set_gtt_session_relfrozenxid(void)
+{
+ TransactionId gtt_frozenxid = InvalidTransactionId;
+
+ if (gtt_session_relfrozenxid_list)
+ gtt_frozenxid = llast_oid(gtt_session_relfrozenxid_list);
+
+ gtt_session_frozenxid = gtt_frozenxid;
+ if (MyProc->session_gtt_frozenxid != gtt_frozenxid)
+ MyProc->session_gtt_frozenxid = gtt_frozenxid;
+}
+
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index faabbeb..d79535d 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -65,6 +65,7 @@
#include "utils/syscache.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/* Per-index data for ANALYZE */
typedef struct AnlIndexData
@@ -102,7 +103,7 @@ static int acquire_inherited_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
static void update_attstats(Oid relid, bool inh,
- int natts, VacAttrStats **vacattrstats);
+ int natts, VacAttrStats **vacattrstats, char relpersistence);
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
@@ -563,14 +564,15 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* pg_statistic for columns we didn't process, we leave them alone.)
*/
update_attstats(RelationGetRelid(onerel), inh,
- attr_cnt, vacattrstats);
+ attr_cnt, vacattrstats, RelationGetRelPersistence(onerel));
for (ind = 0; ind < nindexes; ind++)
{
AnlIndexData *thisdata = &indexdata[ind];
update_attstats(RelationGetRelid(Irel[ind]), false,
- thisdata->attr_cnt, thisdata->vacattrstats);
+ thisdata->attr_cnt, thisdata->vacattrstats,
+ RelationGetRelPersistence(Irel[ind]));
}
/*
@@ -647,11 +649,20 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
IndexBulkDeleteResult *stats;
IndexVacuumInfo ivinfo;
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = Irel[ind];
ivinfo.analyze_only = true;
ivinfo.estimated_count = true;
ivinfo.message_level = elevel;
- ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
+ /* get global temp relstats from localhash, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
ivinfo.strategy = vac_strategy;
stats = index_vacuum_cleanup(&ivinfo, NULL);
@@ -1414,7 +1425,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
* by taking a self-exclusive lock on the relation in analyze_rel().
*/
static void
-update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
+update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats, char relpersistence)
{
Relation sd;
int attno;
@@ -1516,31 +1527,45 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
}
}
- /* Is there already a pg_statistic tuple for this attribute? */
- oldtup = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(relid),
- Int16GetDatum(stats->attr->attnum),
- BoolGetDatum(inh));
-
- if (HeapTupleIsValid(oldtup))
+ /* Update column statistic to localhash, not catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
- /* Yes, replace it */
- stup = heap_modify_tuple(oldtup,
- RelationGetDescr(sd),
- values,
- nulls,
- replaces);
- ReleaseSysCache(oldtup);
- CatalogTupleUpdate(sd, &stup->t_self, stup);
+ up_gtt_att_statistic(relid,
+ stats->attr->attnum,
+ inh,
+ natts,
+ RelationGetDescr(sd),
+ values,
+ nulls);
}
else
{
- /* No, insert new tuple */
- stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
- CatalogTupleInsert(sd, stup);
- }
+ /* Is there already a pg_statistic tuple for this attribute? */
+ oldtup = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh));
+
+ if (HeapTupleIsValid(oldtup))
+ {
+ /* Yes, replace it */
+ stup = heap_modify_tuple(oldtup,
+ RelationGetDescr(sd),
+ values,
+ nulls,
+ replaces);
+ ReleaseSysCache(oldtup);
+ CatalogTupleUpdate(sd, &stup->t_self, stup);
+ }
+ else
+ {
+ /* No, insert new tuple */
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ CatalogTupleInsert(sd, stup);
+ }
- heap_freetuple(stup);
+ heap_freetuple(stup);
+ }
}
table_close(sd, RowExclusiveLock);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index ebaec4f..356df7c 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -392,6 +392,12 @@ cluster_rel(Oid tableOid, Oid indexOid, int options)
errmsg("cannot vacuum temporary tables of other sessions")));
}
+ /* not support cluster global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(OldHeap))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support cluster global temporary tables yet")));
+
/*
* Also check for active uses of the relation in the current transaction,
* including open scans and pending AFTER trigger events.
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index a528241..66f4b10 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2584,6 +2584,16 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind,
!isTempNamespace(classtuple->relnamespace))
continue;
+ /* not support reindex on global temp table, so skip it */
+ if (classtuple->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(WARNING,
+ (errmsg("global temp table \"%s.%s\" skip reindexed",
+ get_namespace_name(get_rel_namespace(relid)),
+ get_rel_name(relid))));
+ continue;
+ }
+
/* Check user/system classification, and optionally skip */
if (objectKind == REINDEX_OBJECT_SYSTEM &&
!IsSystemClass(relid, classtuple))
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index 417d595..b9c3a40 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -107,7 +107,8 @@ RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid,
* transaction.
*/
relpersistence = get_rel_persistence(relid);
- if (relpersistence == RELPERSISTENCE_TEMP)
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE;
/* Check permissions. */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 792ba56..7a42efd 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -48,6 +48,7 @@
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
#include "catalog/toasting.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/comment.h"
#include "commands/defrem.h"
@@ -530,6 +531,7 @@ static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,
Relation partitionTbl);
static List *GetParentedForeignKeyRefs(Relation partition);
static void ATDetachCheckNoForeignKeyRefs(Relation partition);
+static bool has_oncommit_option(List *options);
/* ----------------------------------------------------------------
@@ -575,6 +577,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
LOCKMODE parentLockmode;
const char *accessMethod = NULL;
Oid accessMethodId = InvalidOid;
+ bool has_oncommit_clause = false;
/*
* Truncate relname to appropriate length (probably a waste of time, as
@@ -585,8 +588,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Check consistency of arguments
*/
+ /* global temp table same as local temp table */
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !(stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -616,12 +621,28 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* code. This is needed because calling code might not expect untrusted
* tables to appear in pg_temp at the front of its search path.
*/
- if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
+ /* global temp table same as local temp table */
+ if ((stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
&& InSecurityRestrictedOperation())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("cannot create temporary table within security-restricted operation")));
+ /* Not support partitioned or inherited global temp table yet */
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (relkind == RELKIND_PARTITIONED_TABLE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary partition table yet")));
+
+ if (stmt->inhRelations)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary inheritance table yet")));
+ }
+
/*
* Determine the lockmode to use when scanning parents. A self-exclusive
* lock is needed here.
@@ -717,6 +738,40 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Parse and validate reloptions, if any.
*/
+ /* global temp table */
+ has_oncommit_clause = has_oncommit_option(stmt->options);
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (has_oncommit_clause)
+ {
+ if (stmt->oncommit != ONCOMMIT_NOOP)
+ elog(ERROR, "can not defeine global temp table with on commit and with clause at same time");
+ }
+ else
+ {
+ DefElem *opt = makeNode(DefElem);
+
+ opt->type = T_DefElem;
+ opt->defnamespace = NULL;
+ opt->defname = "on_commit_delete_rows";
+ opt->defaction = DEFELEM_UNSPEC;
+
+ /* use reloptions to remember on commit clause */
+ if (stmt->oncommit == ONCOMMIT_DELETE_ROWS)
+ opt->arg = (Node *)makeString("true");
+ else if (stmt->oncommit == ONCOMMIT_PRESERVE_ROWS)
+ opt->arg = (Node *)makeString("false");
+ else if (stmt->oncommit == ONCOMMIT_NOOP)
+ opt->arg = (Node *)makeString("true");
+ else
+ elog(ERROR, "global temp table not support on commit drop clause");
+
+ stmt->options = lappend(stmt->options, opt);
+ }
+ }
+ else if (has_oncommit_clause)
+ elog(ERROR, "regular table cannot specifie on_commit_delete_rows");
+
reloptions = transformRelOptions((Datum) 0, stmt->options, NULL, validnsps,
true, false);
@@ -1772,7 +1827,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ RELATION_IS_GLOBAL_TEMP(rel))
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -3332,6 +3388,13 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bo
* specially.
*/
targetrelation = relation_open(myrelid, is_index ? ShareUpdateExclusiveLock : AccessExclusiveLock);
+
+ /* not support rename global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(targetrelation))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support rename global temporary tables yet")));
+
namespaceId = RelationGetNamespace(targetrelation);
/*
@@ -3501,6 +3564,14 @@ AlterTable(Oid relid, LOCKMODE lockmode, AlterTableStmt *stmt)
/* Caller is required to provide an adequate lock. */
rel = relation_open(relid, NoLock);
+ /* not support alter global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support alter global temporary tables yet")));
+ }
+
CheckTableNotInUse(rel, "ALTER TABLE");
ATController(stmt, rel, stmt->cmds, stmt->relation->inh, lockmode);
@@ -7651,6 +7722,13 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("referenced relation \"%s\" is not a table",
RelationGetRelationName(pkrel))));
+ /* global temp table not support foreign key constraint yet */
+ if (RELATION_IS_GLOBAL_TEMP(pkrel))
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("referenced relation \"%s\" is not a global temp table",
+ RelationGetRelationName(pkrel))));
+
if (!allowSystemTableMods && IsSystemRelation(pkrel))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -7690,6 +7768,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on temporary tables must involve temporary tables of this session")));
break;
+ /* global temp table not support foreign key constraint yet */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("not support foreign key constraints on global temp table yet")));
+ break;
}
/*
@@ -12702,7 +12786,7 @@ index_copy_data(Relation rel, RelFileNode newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
@@ -14109,7 +14193,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
*/
switch (rel->rd_rel->relpersistence)
{
+ /* global temp table same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("cannot change logged status of table \"%s\" because it is temporary",
@@ -16716,3 +16802,20 @@ ATDetachCheckNoForeignKeyRefs(Relation partition)
table_close(rel, NoLock);
}
}
+
+static bool
+has_oncommit_option(List *options)
+{
+ ListCell *listptr;
+
+ foreach(listptr, options)
+ {
+ DefElem *def = (DefElem *) lfirst(listptr);
+
+ if (pg_strcasecmp(def->defname, "on_commit_delete_rows") == 0)
+ return true;
+ }
+
+ return false;
+}
+
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index ef275c0..c44fad8 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -35,6 +35,7 @@
#include "catalog/pg_database.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_namespace.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/defrem.h"
#include "commands/vacuum.h"
@@ -1068,12 +1069,25 @@ vac_estimate_reltuples(Relation relation,
BlockNumber scanned_pages,
double scanned_tuples)
{
- BlockNumber old_rel_pages = relation->rd_rel->relpages;
- double old_rel_tuples = relation->rd_rel->reltuples;
+ BlockNumber old_rel_pages = 0;
+ double old_rel_tuples = 0;
double old_density;
double unscanned_pages;
double total_tuples;
+ /* get relstat from gtt local hash */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ {
+ get_gtt_relstats(RelationGetRelid(relation),
+ &old_rel_pages, &old_rel_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ {
+ old_rel_pages = relation->rd_rel->relpages;
+ old_rel_tuples = relation->rd_rel->reltuples;
+ }
+
/* If we did scan the whole table, just use the count as-is */
if (scanned_pages >= total_pages)
return scanned_tuples;
@@ -1173,24 +1187,8 @@ vac_update_relstats(Relation relation,
/* Apply statistical updates, if any, to copied tuple */
dirty = false;
- if (pgcform->relpages != (int32) num_pages)
- {
- pgcform->relpages = (int32) num_pages;
- dirty = true;
- }
- if (pgcform->reltuples != (float4) num_tuples)
- {
- pgcform->reltuples = (float4) num_tuples;
- dirty = true;
- }
- if (pgcform->relallvisible != (int32) num_all_visible_pages)
- {
- pgcform->relallvisible = (int32) num_all_visible_pages;
- dirty = true;
- }
/* Apply DDL updates, but not inside an outer transaction (see above) */
-
if (!in_outer_xact)
{
/*
@@ -1215,37 +1213,64 @@ vac_update_relstats(Relation relation,
}
}
- /*
- * Update relfrozenxid, unless caller passed InvalidTransactionId
- * indicating it has no new data.
- *
- * Ordinarily, we don't let relfrozenxid go backwards: if things are
- * working correctly, the only way the new frozenxid could be older would
- * be if a previous VACUUM was done with a tighter freeze_min_age, in
- * which case we don't want to forget the work it already did. However,
- * if the stored relfrozenxid is "in the future", then it must be corrupt
- * and it seems best to overwrite it with the cutoff we used this time.
- * This should match vac_update_datfrozenxid() concerning what we consider
- * to be "in the future".
- */
- if (TransactionIdIsNormal(frozenxid) &&
- pgcform->relfrozenxid != frozenxid &&
- (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
- TransactionIdPrecedes(ReadNewTransactionId(),
- pgcform->relfrozenxid)))
+ /* global temp table remember relstats to localhash not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
{
- pgcform->relfrozenxid = frozenxid;
- dirty = true;
+ up_gtt_relstats(relation,
+ num_pages, num_tuples,
+ num_all_visible_pages,
+ frozenxid, minmulti);
}
-
- /* Similarly for relminmxid */
- if (MultiXactIdIsValid(minmulti) &&
- pgcform->relminmxid != minmulti &&
- (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
- MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ else
{
- pgcform->relminmxid = minmulti;
- dirty = true;
+ if (pgcform->relpages != (int32) num_pages)
+ {
+ pgcform->relpages = (int32) num_pages;
+ dirty = true;
+ }
+ if (pgcform->reltuples != (float4) num_tuples)
+ {
+ pgcform->reltuples = (float4) num_tuples;
+ dirty = true;
+ }
+ if (pgcform->relallvisible != (int32) num_all_visible_pages)
+ {
+ pgcform->relallvisible = (int32) num_all_visible_pages;
+ dirty = true;
+ }
+
+ /*
+ * Update relfrozenxid, unless caller passed InvalidTransactionId
+ * indicating it has no new data.
+ *
+ * Ordinarily, we don't let relfrozenxid go backwards: if things are
+ * working correctly, the only way the new frozenxid could be older would
+ * be if a previous VACUUM was done with a tighter freeze_min_age, in
+ * which case we don't want to forget the work it already did. However,
+ * if the stored relfrozenxid is "in the future", then it must be corrupt
+ * and it seems best to overwrite it with the cutoff we used this time.
+ * This should match vac_update_datfrozenxid() concerning what we consider
+ * to be "in the future".
+ */
+ if (TransactionIdIsNormal(frozenxid) &&
+ pgcform->relfrozenxid != frozenxid &&
+ (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(),
+ pgcform->relfrozenxid)))
+ {
+ pgcform->relfrozenxid = frozenxid;
+ dirty = true;
+ }
+
+ /* Similarly for relminmxid */
+ if (MultiXactIdIsValid(minmulti) &&
+ pgcform->relminmxid != minmulti &&
+ (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ {
+ pgcform->relminmxid = minmulti;
+ dirty = true;
+ }
}
/* If anything changed, write out the tuple. */
@@ -1337,6 +1362,10 @@ vac_update_datfrozenxid(void)
continue;
}
+ /* global temp table relstats not in pg_class */
+ if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ continue;
+
/*
* Some table AMs might not need per-relation xid / multixid horizons.
* It therefore seems reasonable to allow relfrozenxid and relminmxid
@@ -1394,6 +1423,25 @@ vac_update_datfrozenxid(void)
Assert(TransactionIdIsNormal(newFrozenXid));
Assert(MultiXactIdIsValid(newMinMulti));
+ /*
+ * Global temp table get frozenxid from MyProc
+ * to avoid the vacuum truncate clog that gtt need.
+ */
+ if (max_active_gtt > 0)
+ {
+ TransactionId oldest_gtt_frozenxid =
+ list_all_session_gtt_frozenxids(0, NULL, NULL, NULL);
+
+ if (TransactionIdIsNormal(oldest_gtt_frozenxid) &&
+ TransactionIdPrecedes(oldest_gtt_frozenxid, newFrozenXid))
+ {
+ ereport(WARNING,
+ (errmsg("global temp table oldest FrozenXid is far in the past"),
+ errhint("please truncate them or kill those sessions that use them.")));
+ newFrozenXid = oldest_gtt_frozenxid;
+ }
+ }
+
/* Now fetch the pg_database tuple we need to update. */
relation = table_open(DatabaseRelationId, RowExclusiveLock);
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index b772348..cf1c7e0 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -591,6 +591,8 @@ static void
set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte)
{
+ char relpersistence;
+
/*
* The flag has previously been initialized to false, so we can just
* return if it becomes clear that we can't safely set it.
@@ -618,7 +620,11 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
* the rest of the necessary infrastructure right now anyway. So
* for now, bail out if we see a temporary table.
*/
- if (get_rel_persistence(rte->relid) == RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ relpersistence = get_rel_persistence(rte->relid);
+
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
return;
/*
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 401299e..7d63265 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6306,7 +6306,9 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
* Furthermore, any index predicate or index expressions must be parallel
* safe.
*/
+ /* global temp table is same as local temp table */
if (heap->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ heap->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ||
!is_parallel_safe(root, (Node *) RelationGetIndexExpressions(index)) ||
!is_parallel_safe(root, (Node *) RelationGetIndexPredicate(index)))
{
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 40f4976..535cf80 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -53,6 +53,7 @@
#include "utils/syscache.h"
#include "utils/snapmgr.h"
+#include "catalog/storage_gtt.h"
/* GUC parameter */
int constraint_exclusion = CONSTRAINT_EXCLUSION_PARTITION;
@@ -937,10 +938,10 @@ void
estimate_rel_size(Relation rel, int32 *attr_widths,
BlockNumber *pages, double *tuples, double *allvisfrac)
{
- BlockNumber curpages;
- BlockNumber relpages;
- double reltuples;
- BlockNumber relallvisible;
+ BlockNumber curpages = 0;
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
double density;
switch (rel->rd_rel->relkind)
@@ -954,6 +955,21 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
case RELKIND_INDEX:
+ /* global temp table get relstats from localhash */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ get_gtt_relstats(RelationGetRelid(rel),
+ &relpages, &reltuples, &relallvisible,
+ NULL, NULL);
+ }
+ else
+ {
+ /* coerce values in pg_class to more desirable types */
+ relpages = (BlockNumber) rel->rd_rel->relpages;
+ reltuples = (double) rel->rd_rel->reltuples;
+ relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
+ }
+
/*
* XXX: It'd probably be good to move this into a callback,
* individual index types e.g. know if they have a metapage.
@@ -962,11 +978,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
/* it has storage, ok to call the smgr */
curpages = RelationGetNumberOfBlocks(rel);
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
-
/* report estimated # pages */
*pages = curpages;
/* quick exit if rel is clearly empty */
@@ -976,10 +987,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
*allvisfrac = 0;
break;
}
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
/*
* Discount the metapage while estimating the number of tuples.
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 345a8e6..076a210 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -2579,6 +2579,11 @@ transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("materialized views must not use temporary tables or views")));
+ if (is_query_using_gtt(query))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialized views must not use global temporary tables or views")));
+
/*
* A materialized view would either need to save parameters for use in
* maintaining/loading the data or prohibit them entirely. The latter
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 208b4a1..8cc52d9 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3267,17 +3267,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMPORARY
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
@@ -11476,19 +11470,13 @@ OptTempTableName:
}
| GLOBAL TEMPORARY opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED opt_table qualified_name
{
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 77a48b0..7f14d41 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -59,6 +59,7 @@ static void expandTupleDesc(TupleDesc tupdesc, Alias *eref,
List **colnames, List **colvars);
static int specialAttNum(const char *attname);
static bool isQueryUsingTempRelation_walker(Node *node, void *context);
+static bool is_query_using_gtt_walker(Node *node, void *context);
/*
@@ -3425,3 +3426,49 @@ isQueryUsingTempRelation_walker(Node *node, void *context)
isQueryUsingTempRelation_walker,
context);
}
+
+/* check if the query uses global temp table */
+static bool
+is_query_using_gtt_walker(Node *node, void *context)
+{
+ if (node == NULL)
+ return false;
+
+ if (IsA(node, Query))
+ {
+ Query *query = (Query *) node;
+ ListCell *rtable;
+
+ foreach(rtable, query->rtable)
+ {
+ RangeTblEntry *rte = lfirst(rtable);
+
+ if (rte->rtekind == RTE_RELATION)
+ {
+ Relation rel = heap_open(rte->relid, AccessShareLock);
+ char relpersistence = rel->rd_rel->relpersistence;
+
+ heap_close(rel, AccessShareLock);
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ return true;
+ }
+ }
+
+ return query_tree_walker(query,
+ is_query_using_gtt_walker,
+ context,
+ QTW_IGNORE_JOINALIASES);
+ }
+
+ return expression_tree_walker(node,
+ is_query_using_gtt_walker,
+ context);
+}
+
+/* check if the query uses global temp table */
+bool
+is_query_using_gtt(Query *query)
+{
+ return is_query_using_gtt_walker((Node *) query, NULL);
+}
+
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 2406ca7..ab6fc9a 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -359,6 +359,13 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
AlterSeqStmt *altseqstmt;
List *attnamelist;
+ if (cxt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temp table does not yet support serial column")));
+ }
+
/*
* Determine namespace and name to use for the sequence.
*
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index fd85b9c..eb46e94 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2088,6 +2088,11 @@ do_autovacuum(void)
}
continue;
}
+ else if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /* autovacuum skip vacuum global temp table */
+ continue;
+ }
/* Fetch reloptions and the pgstat entry for this table */
relopts = extract_autovac_opts(tuple, pg_class_desc);
@@ -2154,7 +2159,9 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ /* autovacuum skip vacuum global temp table */
+ if (classForm->relpersistence == RELPERSISTENCE_TEMP ||
+ classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7332e6b..f023aa3 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -53,6 +53,8 @@
#include "utils/resowner_private.h"
#include "utils/timestamp.h"
+#include "utils/guc.h"
+#include "catalog/storage_gtt.h"
/* Note: these two macros only work on shared buffers, not local ones! */
#define BufHdrGetBlock(bufHdr) ((Block) (BufferBlocks + ((Size) (bufHdr)->buf_id) * BLCKSZ))
@@ -432,7 +434,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence,
ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy,
- bool *hit);
+ bool *hit, Relation rel);
static bool PinBuffer(BufferDesc *buf, BufferAccessStrategy strategy);
static void PinBuffer_Locked(BufferDesc *buf);
static void UnpinBuffer(BufferDesc *buf, bool fixOwner);
@@ -663,7 +665,8 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
*/
pgstat_count_buffer_read(reln);
buf = ReadBuffer_common(reln->rd_smgr, reln->rd_rel->relpersistence,
- forkNum, blockNum, mode, strategy, &hit);
+ forkNum, blockNum, mode, strategy, &hit,
+ reln);
if (hit)
pgstat_count_buffer_hit(reln);
return buf;
@@ -691,7 +694,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
Assert(InRecovery);
return ReadBuffer_common(smgr, RELPERSISTENCE_PERMANENT, forkNum, blockNum,
- mode, strategy, &hit);
+ mode, strategy, &hit, NULL);
}
@@ -703,7 +706,8 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
static Buffer
ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
- BufferAccessStrategy strategy, bool *hit)
+ BufferAccessStrategy strategy, bool *hit,
+ Relation rel)
{
BufferDesc *bufHdr;
Block bufBlock;
@@ -718,6 +722,15 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
isExtend = (blockNum == P_NEW);
+ /* create storage when first read data page for gtt */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP &&
+ (isExtend || blockNum == 0) &&
+ forkNum == MAIN_FORKNUM &&
+ !gtt_storage_attached(smgr->smgr_rnode.node.relNode))
+ {
+ RelationCreateStorage(smgr->smgr_rnode.node, relpersistence, rel);
+ }
+
TRACE_POSTGRESQL_BUFFER_READ_START(forkNum, blockNum,
smgr->smgr_rnode.node.spcNode,
smgr->smgr_rnode.node.dbNode,
@@ -2798,6 +2811,16 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln)
BlockNumber
RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
{
+ /*
+ * When this backend not init gtt storage
+ * return 0
+ */
+ if (RELATION_IS_GLOBAL_TEMP(relation) &&
+ !gtt_storage_attached(relation->rd_node.relNode))
+ {
+ return 0;
+ }
+
switch (relation->rd_rel->relkind)
{
case RELKIND_SEQUENCE:
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index d7d7335..3b2cc8b 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -21,6 +21,7 @@
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/twophase.h"
+#include "catalog/storage_gtt.h"
#include "commands/async.h"
#include "miscadmin.h"
#include "pgstat.h"
@@ -147,6 +148,7 @@ CreateSharedMemoryAndSemaphores(int port)
size = add_size(size, BTreeShmemSize());
size = add_size(size, SyncScanShmemSize());
size = add_size(size, AsyncShmemSize());
+ size = add_size(size, active_gtt_shared_hash_size());
#ifdef EXEC_BACKEND
size = add_size(size, ShmemBackendArraySize());
#endif
@@ -217,6 +219,8 @@ CreateSharedMemoryAndSemaphores(int port)
SUBTRANSShmemInit();
MultiXactShmemInit();
InitBufferPool();
+ /* global temporary table */
+ active_gtt_shared_hash_init();
/*
* Set up lock manager
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 18a0f62..0d926bd 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -60,6 +60,7 @@
#include "utils/builtins.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
+#include "utils/guc.h"
#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
@@ -3975,3 +3976,77 @@ KnownAssignedXidsReset(void)
LWLockRelease(ProcArrayLock);
}
+
+/*
+ * search all active backend to get oldest frozenxid
+ * for global temp table.
+ */
+int
+list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n)
+{
+ ProcArrayStruct *arrayP = procArray;
+ TransactionId result = InvalidTransactionId;
+ int index;
+ int flags = 0;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ if (max_size > 0)
+ {
+ Assert(pids);
+ Assert(xids);
+ Assert(n);
+ *n = 0;
+ }
+
+ if (max_active_gtt <= 0)
+ return InvalidTransactionId;
+
+ if (RecoveryInProgress())
+ return InvalidTransactionId;
+
+ flags |= PROC_IS_AUTOVACUUM;
+ flags |= PROC_IN_LOGICAL_DECODING;
+
+ LWLockAcquire(ProcArrayLock, LW_SHARED);
+ if (max_size > 0 && max_size < arrayP->numProcs)
+ {
+ LWLockRelease(ProcArrayLock);
+ elog(ERROR, "list_all_gtt_frozenxids require more array");
+ }
+
+ for (index = 0; index < arrayP->numProcs; index++)
+ {
+ int pgprocno = arrayP->pgprocnos[index];
+ volatile PGPROC *proc = &allProcs[pgprocno];
+ volatile PGXACT *pgxact = &allPgXact[pgprocno];
+
+ if (pgxact->vacuumFlags & flags)
+ continue;
+
+ if (proc->databaseId == MyDatabaseId &&
+ TransactionIdIsNormal(proc->session_gtt_frozenxid))
+ {
+ if (result == InvalidTransactionId)
+ result = proc->session_gtt_frozenxid;
+ else if (TransactionIdPrecedes(proc->session_gtt_frozenxid, result))
+ result = proc->session_gtt_frozenxid;
+
+ if (max_size > 0)
+ {
+ pids[i] = proc->pid;
+ xids[i] = proc->session_gtt_frozenxid;
+ i++;
+ }
+ }
+ }
+ LWLockRelease(ProcArrayLock);
+
+ if (max_size > 0)
+ *n = i;
+
+ return result;
+}
+
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 498373f..542cc6b 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -396,6 +396,7 @@ InitProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
@@ -578,6 +579,7 @@ InitAuxiliaryProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 64acc3f..fdbc95b 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -629,6 +629,12 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
*/
if (zero_damaged_pages || InRecovery)
MemSet(buffer, 0, BLCKSZ);
+ else if(SmgrIsTemp(reln) && blocknum == 0 && forknum == MAIN_FORKNUM)
+ {
+ /* global temp table init btree meta page */
+ MemSet(buffer, 0, BLCKSZ);
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..adce760 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -1008,6 +1008,10 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
Assert(backend != InvalidBackendId);
}
break;
+ /* For global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ backend = BackendIdForTempRelations();
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relform->relpersistence);
backend = InvalidBackendId; /* placate compiler */
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index a314ecc..c957d12 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -141,6 +141,7 @@
#include "utils/timestamp.h"
#include "utils/typcache.h"
+#include "catalog/storage_gtt.h"
/* Hooks for plugins to get control when we ask for stats */
get_relation_stats_hook_type get_relation_stats_hook = NULL;
@@ -4586,12 +4587,25 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
}
else if (index->indpred == NIL)
{
- vardata->statsTuple =
- SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(index->indexoid),
- Int16GetDatum(pos + 1),
- BoolGetDatum(false));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ Int16GetDatum(pos + 1),
+ false);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ vardata->statsTuple =
+ SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(index->indexoid),
+ Int16GetDatum(pos + 1),
+ BoolGetDatum(false));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -4670,15 +4684,27 @@ examine_simple_variable(PlannerInfo *root, Var *var,
}
else if (rte->rtekind == RTE_RELATION)
{
- /*
- * Plain table or parent of an inheritance appendrel, so look up the
- * column in pg_statistic
- */
- vardata->statsTuple = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(rte->relid),
- Int16GetDatum(var->varattno),
- BoolGetDatum(rte->inh));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(rte->relid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple = get_gtt_att_statistic(rte->relid,
+ var->varattno,
+ rte->inh);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ /*
+ * Plain table or parent of an inheritance appendrel, so look up the
+ * column in pg_statistic
+ */
+ vardata->statsTuple = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(rte->relid),
+ Int16GetDatum(var->varattno),
+ BoolGetDatum(rte->inh));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -5991,6 +6017,7 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
{
/* Simple variable --- look to stats for the underlying table */
RangeTblEntry *rte = planner_rt_fetch(index->rel->relid, root);
+ char rel_persistence = get_rel_persistence(rte->relid);
Assert(rte->rtekind == RTE_RELATION);
relid = rte->relid;
@@ -6008,6 +6035,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ rte->inh);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6019,6 +6053,8 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/* Expression --- maybe there are stats for the index itself */
relid = index->indexoid;
colnum = 1;
@@ -6034,6 +6070,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6900,6 +6943,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
/* attempt to lookup stats in relation for this index column */
if (attnum != 0)
{
+ char rel_persistence = get_rel_persistence(rte->relid);
+
/* Simple variable -- look to stats for the underlying table */
if (get_relation_stats_hook &&
(*get_relation_stats_hook) (root, rte, attnum, &vardata))
@@ -6912,6 +6957,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
elog(ERROR,
"no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(rte->relid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple =
@@ -6924,6 +6977,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/*
* Looks like we've found an expression column in the index. Let's
* see if there's any stats for it.
@@ -6943,6 +6998,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 27602fa..25a411a 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -34,6 +34,7 @@
#include "catalog/pg_statistic.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "utils/array.h"
@@ -46,6 +47,7 @@
#include "utils/syscache.h"
#include "utils/typcache.h"
+
/* Hook for plugins to get control in get_attavgwidth() */
get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
@@ -2878,6 +2880,18 @@ get_attavgwidth(Oid relid, AttrNumber attnum)
if (stawidth > 0)
return stawidth;
}
+ if (get_rel_persistence(relid) == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ tp = get_gtt_att_statistic(relid, attnum, false);
+ if (!HeapTupleIsValid(tp))
+ return 0;
+
+ stawidth = ((Form_pg_statistic) GETSTRUCT(tp))->stawidth;
+ if (stawidth > 0)
+ return stawidth;
+ else
+ return 0;
+ }
tp = SearchSysCache3(STATRELATTINH,
ObjectIdGetDatum(relid),
Int16GetDatum(attnum),
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index e8d11a1..0c7b455 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1131,6 +1131,16 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_islocaltemp = false;
}
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ {
+ relation->rd_backend = BackendIdForTempRelations();
+ /*
+ * For global temp table, all backend can use
+ * this relation, so rd_islocaltemp always true.
+ */
+ relation->rd_islocaltemp = true;
+ }
+ break;
default:
elog(ERROR, "invalid relpersistence: %c",
relation->rd_rel->relpersistence);
@@ -3312,6 +3322,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_backend = BackendIdForTempRelations();
rel->rd_islocaltemp = true;
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ rel->rd_backend = BackendIdForTempRelations();
+ rel->rd_islocaltemp = true;
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relpersistence);
break;
@@ -3426,6 +3440,9 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
TransactionId freezeXid = InvalidTransactionId;
RelFileNode newrnode;
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ elog(ERROR, "global temp table does not allow setting new relfilenode");
+
/* Allocate a new relfilenode */
newrelfilenode = GetNewRelFileNode(relation->rd_rel->reltablespace, NULL,
persistence);
@@ -3466,7 +3483,7 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
/* handle these directly, at least for now */
SMgrRelation srel;
- srel = RelationCreateStorage(newrnode, persistence);
+ srel = RelationCreateStorage(newrnode, persistence, relation);
smgrclose(srel);
}
break;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f0ed326..d4590a2 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -138,6 +138,18 @@ char *GUC_check_errmsg_string;
char *GUC_check_errdetail_string;
char *GUC_check_errhint_string;
+/*
+ * num = 0 means disable global temp table feature.
+ * global temp table define can still storage in catalog
+ * just can not use.
+ * num > 0 means database can management num active global temp table.
+ */
+#define MIN_NUM_ACTIVE_GTT 0
+#define DEFAULT_NUM_ACTIVE_GTT 1000
+#define MAX_NUM_ACTIVE_GTT 1000000
+
+int max_active_gtt = MIN_NUM_ACTIVE_GTT;
+
static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4);
static void set_config_sourcefile(const char *name, char *sourcefile,
@@ -1962,6 +1974,15 @@ static struct config_bool ConfigureNamesBool[] =
static struct config_int ConfigureNamesInt[] =
{
{
+ {"max_active_global_temporary_table", PGC_POSTMASTER, UNGROUPED,
+ gettext_noop("max active global temporary table."),
+ NULL
+ },
+ &max_active_gtt,
+ DEFAULT_NUM_ACTIVE_GTT, MIN_NUM_ACTIVE_GTT, MAX_NUM_ACTIVE_GTT,
+ NULL, NULL, NULL
+ },
+ {
{"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Forces a switch to the next WAL file if a "
"new file has not been started within N seconds."),
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index a9c868b..3831341 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15535,6 +15535,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
{
char *ftoptions = NULL;
char *srvname = NULL;
+ char *table_type = NULL;
switch (tbinfo->relkind)
{
@@ -15586,9 +15587,15 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
binary_upgrade_set_pg_class_oids(fout, q,
tbinfo->dobj.catId.oid, false);
+ if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED)
+ table_type = "UNLOGGED ";
+ else if (tbinfo->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ table_type = "GLOBAL TEMPORARY ";
+ else
+ table_type = "";
+
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ table_type,
reltypename,
qualrelname);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..34b4683 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_GLOBAL_TEMP 'g' /* global temporary table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h
index 3579d3f..2bde386 100644
--- a/src/include/catalog/storage.h
+++ b/src/include/catalog/storage.h
@@ -19,7 +19,7 @@
#include "storage/smgr.h"
#include "utils/relcache.h"
-extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
+extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel);
extern void RelationDropStorage(Relation rel);
extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
extern void RelationTruncate(Relation rel, BlockNumber nblocks);
diff --git a/src/include/catalog/storage_gtt.h b/src/include/catalog/storage_gtt.h
new file mode 100644
index 0000000..ea41e66
--- /dev/null
+++ b/src/include/catalog/storage_gtt.h
@@ -0,0 +1,39 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.h
+ * prototypes for functions in backend/catalog/storage_gtt.c
+ *
+ * src/include/catalog/storage_gtt.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef STORAGE_GTT_H
+#define STORAGE_GTT_H
+
+#include "access/htup.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
+
+extern Size active_gtt_shared_hash_size(void);
+extern void active_gtt_shared_hash_init(void);
+extern void remember_gtt_storage_info(RelFileNode rnode, Relation rel);
+extern void forget_gtt_storage_info(Oid relid);
+extern bool is_other_backend_use_gtt(RelFileNode node);
+extern bool gtt_storage_attached(Oid relid);
+extern Bitmapset *copy_active_gtt_bitmap(RelFileNode node);
+extern void up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull);
+extern HeapTuple get_gtt_att_statistic(Oid reloid, int attnum, bool inh);
+extern void release_gtt_statistic_cache(HeapTuple tup);
+extern void up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid);
+extern void get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid);
+
+#endif /* STORAGE_H */
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index f7e0781..4f5a353 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -130,4 +130,7 @@ extern Oid attnumTypeId(Relation rd, int attid);
extern Oid attnumCollationId(Relation rd, int attid);
extern bool isQueryUsingTempRelation(Query *query);
+/* global temp table check */
+extern bool is_query_using_gtt(Query *query);
+
#endif /* PARSE_RELATION_H */
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 08e0dc8..297e20c 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -220,6 +220,7 @@ typedef enum BuiltinTrancheIds
LWTRANCHE_TBM,
LWTRANCHE_PARALLEL_APPEND,
LWTRANCHE_SXACT,
+ LWTRANCHE_GTT_CTL,
LWTRANCHE_FIRST_USER_DEFINED
} BuiltinTrancheIds;
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index ac7ee72..74a074a 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -117,6 +117,8 @@ struct PGPROC
Oid tempNamespaceId; /* OID of temp schema this backend is
* using */
+ TransactionId session_gtt_frozenxid; /* session level global temp table relfrozenxid */
+
bool isBackgroundWorker; /* true if background worker. */
/*
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h
index da8b672..8e7d4c7 100644
--- a/src/include/storage/procarray.h
+++ b/src/include/storage/procarray.h
@@ -124,4 +124,6 @@ extern void ProcArraySetReplicationSlotXmin(TransactionId xmin,
extern void ProcArrayGetReplicationSlotXmin(TransactionId *xmin,
TransactionId *catalog_xmin);
+extern int list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n);
+
#endif /* PROCARRAY_H */
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index a93ed77..a782eee 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -276,6 +276,10 @@ extern int tcp_user_timeout;
extern bool trace_sort;
#endif
+/* global temporary table */
+extern int max_active_gtt;
+/* end */
+
/*
* Functions exported by guc.c
*/
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 1385ff3..a5a991d 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -273,6 +273,7 @@ typedef struct StdRdOptions
int parallel_workers; /* max number of parallel workers */
bool vacuum_index_cleanup; /* enables index vacuuming and cleanup */
bool vacuum_truncate; /* enables vacuum to truncate a relation */
+ bool on_commit_delete_rows; /* global temp table */
} StdRdOptions;
#define HEAP_MIN_FILLFACTOR 10
@@ -524,7 +525,8 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP || \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
/*
* RELATION_IS_LOCAL
@@ -603,6 +605,17 @@ typedef struct ViewOptions
*/
#define RelationGetPartitionDesc(relation) ((relation)->rd_partdesc)
+/* global temp table implementations */
+#define RELATION_IS_GLOBAL_TEMP(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+
+#define RELATION_GTT_ON_COMMIT_DELETE(relation) \
+ ((relation)->rd_options && \
+ (relation)->rd_rel->relkind == RELKIND_RELATION && \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ? \
+ ((StdRdOptions *) (relation)->rd_options)->on_commit_delete_rows : false)
+
+#define RelationGetRelPersistence(relation) ((relation)->rd_rel->relpersistence)
+
/* routines in utils/cache/relcache.c */
extern void RelationIncrementReferenceCount(Relation rel);
extern void RelationDecrementReferenceCount(Relation rel);
diff --git a/src/test/regress/expected/gtt_clean.out b/src/test/regress/expected/gtt_clean.out
new file mode 100644
index 0000000..50ca9ac
--- /dev/null
+++ b/src/test/regress/expected/gtt_clean.out
@@ -0,0 +1,7 @@
+reset search_path;
+drop schema gtt cascade;
+NOTICE: drop cascades to 4 other objects
+DETAIL: drop cascades to table gtt.gtt1
+drop cascades to table gtt.gtt2
+drop cascades to table gtt.gtt3
+drop cascades to table gtt.gtt_t_kenyon
diff --git a/src/test/regress/expected/gtt_error.out b/src/test/regress/expected/gtt_error.out
new file mode 100644
index 0000000..80c16dc
--- /dev/null
+++ b/src/test/regress/expected/gtt_error.out
@@ -0,0 +1,106 @@
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+set search_path=gtt_error,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+ERROR: cannot create indexes on global temporary tables using concurrent mode
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+ERROR: not support cluster global temporary tables yet
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+ERROR: ON COMMIT can only be used on temporary tables
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+ERROR: regular table cannot specifie on_commit_delete_rows
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+ERROR: not support create global temporary partition table yet
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+ERROR: not support create global temporary inheritance table yet
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+ERROR: global temp table not support on commit drop clause
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+ERROR: can not defeine global temp table with on commit and with clause at same time
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+--ERROR
+alter table gtt1 rename to gttx;
+ERROR: not support rename global temporary tables yet
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: referenced relation "products" is not a global temp table
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+ERROR: Global temp table does not yet support serial column
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+ERROR: Global temp table does not yet support serial column
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+ERROR: materialized views must not use global temporary tables or views
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+ERROR: only support btree index on global temp table
+create index idx_err on gtt1 using gist (a);
+ERROR: data type integer has no default operator class for access method "gist"
+HINT: You must specify an operator class for the index or define a default operator class for the data type.
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+ERROR: only support btree index on global temp table
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+ERROR: only support btree index on global temp table
+reset search_path;
+drop schema gtt_error cascade;
+NOTICE: drop cascades to 8 other objects
+DETAIL: drop cascades to table gtt_error.gtt1
+drop cascades to table gtt_error.gtt2
+drop cascades to table gtt_error.gtt3
+drop cascades to table gtt_error.tmp_t0
+drop cascades to table gtt_error.tbl_inherits_parent
+drop cascades to table gtt_error.tbl_inherits_parent_global_temp
+drop cascades to table gtt_error.products
+drop cascades to table gtt_error.gtt5
diff --git a/src/test/regress/expected/gtt_parallel_1.out b/src/test/regress/expected/gtt_parallel_1.out
new file mode 100644
index 0000000..30d8a7b
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_1.out
@@ -0,0 +1,84 @@
+set search_path=gtt,sys;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_parallel_2.out b/src/test/regress/expected/gtt_parallel_2.out
new file mode 100644
index 0000000..70bf4a6
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_2.out
@@ -0,0 +1,142 @@
+set search_path=gtt,sys;
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+ 3 | test1
+(3 rows)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test2
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 3 | test3
+(1 row)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 5 | test5
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 6 | test6
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+ count
+--------
+ 100000
+(1 row)
+
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+ QUERY PLAN
+------------------------------------
+ Index Scan using gtt3_pkey on gtt3
+ Index Cond: (a = 300)
+(2 rows)
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+ relname | pg_relation_size | pg_relation_size
+--------------+------------------+------------------
+ gtt_t_kenyon | 450560 | 16384
+(1 row)
+
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+ relname
+--------------
+ gtt_t_kenyon
+(1 row)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_prepare.out b/src/test/regress/expected/gtt_prepare.out
new file mode 100644
index 0000000..9e8f5f0
--- /dev/null
+++ b/src/test/regress/expected/gtt_prepare.out
@@ -0,0 +1,7 @@
+CREATE SCHEMA IF NOT EXISTS gtt;
+set search_path=gtt,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+reset search_path;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 8fb55f0..588f4e5 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -120,3 +120,9 @@ test: fast_default
# run stats by itself because its delay may be insufficient under heavy load
test: stats
+
+# global temp table test
+test: gtt_error
+test: gtt_prepare
+test: gtt_parallel_1 gtt_parallel_2
+test: gtt_clean
diff --git a/src/test/regress/sql/gtt_clean.sql b/src/test/regress/sql/gtt_clean.sql
new file mode 100644
index 0000000..f3cf710
--- /dev/null
+++ b/src/test/regress/sql/gtt_clean.sql
@@ -0,0 +1,6 @@
+
+
+reset search_path;
+
+drop schema gtt cascade;
+
diff --git a/src/test/regress/sql/gtt_error.sql b/src/test/regress/sql/gtt_error.sql
new file mode 100644
index 0000000..e895574
--- /dev/null
+++ b/src/test/regress/sql/gtt_error.sql
@@ -0,0 +1,106 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+
+set search_path=gtt_error,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+
+--ERROR
+alter table gtt1 rename to gttx;
+
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+create index idx_err on gtt1 using gist (a);
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+
+reset search_path;
+
+drop schema gtt_error cascade;
+
diff --git a/src/test/regress/sql/gtt_parallel_1.sql b/src/test/regress/sql/gtt_parallel_1.sql
new file mode 100644
index 0000000..d7d81de
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_1.sql
@@ -0,0 +1,42 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+commit;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+rollback;
+select * from gtt1 order by a;
+
+truncate gtt1;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+select * from gtt1 order by a;
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+
+begin;
+select * from gtt1 order by a;
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_parallel_2.sql b/src/test/regress/sql/gtt_parallel_2.sql
new file mode 100644
index 0000000..cb2f7a6
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_2.sql
@@ -0,0 +1,62 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+commit;
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+truncate gtt3;
+select * from gtt3 order by a;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+truncate gtt3;
+select * from gtt3 order by a;
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+begin;
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_prepare.sql b/src/test/regress/sql/gtt_prepare.sql
new file mode 100644
index 0000000..042d9e6
--- /dev/null
+++ b/src/test/regress/sql/gtt_prepare.sql
@@ -0,0 +1,15 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt;
+
+set search_path=gtt,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+
+reset search_path;
+
--
libgit2 0.23.3
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-06 16:08 ` Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-06 16:08 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; +Cc: pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 06.11.2019 16:24, 曾文旌(义从) wrote:
> Dear Hackers
>
>
> I attached the patch of GTT implementationI base on PG12.
> The GTT design came from my first email.
> Some limitations in patch will be eliminated in later versions.
>
> Later, I will comment on Konstantin's patch and make some proposals for cooperation.
> Looking forward to your feedback.
>
> Thanks.
>
> Zeng Wenjing
>
Thank you for this patch.
My first comments:
1. I have ported you patch to the latest Postgres version (my patch is
attached).
2. You patch is supporting only B-Tree index for GTT. All other indexes
(hash, gin, gist, brin,...) are not currently supported.
3. I do not understand the reason for the following limitation:
"We allow to create index on global temp table only this session use it"
First of all it seems to significantly reduce usage of global temp tables.
Why do we need GTT at all? Mostly because we need to access temporary
data in more than one backend. Otherwise we can just use normal table.
If temp table is expected to be larger enough, so that we need to create
index for it, then it is hard to believe that it will be needed only in
one backend.
May be the assumption is that all indexes has to be created before GTT
start to be used.
But right now this check is not working correctly in any case - if you
insert some data into the table, then
you can not create index any more:
postgres=# create global temp table gtt(x integer primary key, y integer);
CREATE TABLE
postgres=# insert into gtt values (generate_series(1,100000),
generate_series(1,100000));
INSERT 0 100000
postgres=# create index on gtt(y);
ERROR: can not create index when have one or more backend attached this
global temp table
I wonder why do you need such restriction?
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] global_temporary_table_v1-pg13.patch (128.5K, ../../[email protected]/2-global_temporary_table_v1-pg13.patch)
download | inline diff:
diff --git a/contrib/Makefile b/contrib/Makefile
index 92184ed..4b1a596 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -48,7 +48,8 @@ SUBDIRS = \
tsm_system_rows \
tsm_system_time \
unaccent \
- vacuumlo
+ vacuumlo \
+ pg_gtt
ifeq ($(with_openssl),yes)
SUBDIRS += sslinfo
diff --git a/contrib/pg_gtt/Makefile b/contrib/pg_gtt/Makefile
new file mode 100644
index 0000000..1d2ef64
--- /dev/null
+++ b/contrib/pg_gtt/Makefile
@@ -0,0 +1,22 @@
+# contrib/pg_gtt/Makefile
+
+MODULE_big = pg_gtt
+OBJS = pg_gtt.o
+
+EXTENSION = pg_gtt
+DATA = pg_gtt--1.0.sql
+
+LDFLAGS_SL += $(filter -lm, $(LIBS))
+
+NO_INSTALLCHECK = 1
+
+ifdef USE_PGXS
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
+else
+subdir = contrib/pg_pfs
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/contrib/pg_gtt/pg_gtt--1.0.sql b/contrib/pg_gtt/pg_gtt--1.0.sql
new file mode 100644
index 0000000..3f794d7
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt--1.0.sql
@@ -0,0 +1,28 @@
+/* contrib/pg_gtt/pg_gtt--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION pg_gtt" to load this file. \quit
+
+
+CREATE FUNCTION pg_gtt_att_statistic(text, text, int)
+RETURNS setof pg_statistic
+AS 'MODULE_PATHNAME','pg_gtt_att_statistic'
+LANGUAGE C STRICT;
+
+CREATE TYPE relstats_type AS (relpages int4, reltuples float4, relallvisible int4, relfrozenxid xid, relminmxid xid);
+CREATE TYPE rel_vac_type AS (pid int4, relfrozenxid xid, relminmxid xid);
+
+CREATE FUNCTION pg_gtt_relstats(text, text)
+RETURNS relstats_type
+AS 'MODULE_PATHNAME','pg_gtt_relstats'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_gtt_attached_pid(text, text)
+RETURNS setof int4
+AS 'MODULE_PATHNAME','pg_gtt_attached_pid'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_list_gtt_relfrozenxids()
+RETURNS setof rel_vac_type
+AS 'MODULE_PATHNAME','pg_list_gtt_relfrozenxids'
+LANGUAGE C STRICT;
diff --git a/contrib/pg_gtt/pg_gtt.c b/contrib/pg_gtt/pg_gtt.c
new file mode 100644
index 0000000..19e1ec0
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.c
@@ -0,0 +1,474 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_gtt.c
+ * code to management function for global temparary table
+ *
+ * IDENTIFICATION
+ * contrib/pg_gtt/pg_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres.h"
+
+#include <unistd.h>
+#include <sys/time.h>
+#include "port.h"
+#include "access/htup_details.h"
+#include "access/table.h"
+#include "access/xlog.h"
+#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/namespace.h"
+#include "catalog/pg_class.h"
+#include "funcapi.h"
+#include "storage/ipc.h"
+#include "storage/shmem.h"
+#include "storage/lwlock.h"
+#include "storage/procarray.h"
+#include "storage/proc.h"
+#include "tcop/utility.h"
+#include "utils/builtins.h"
+#include "utils/memutils.h"
+#include "utils/timeout.h"
+#include "utils/guc.h"
+#include "utils/lsyscache.h"
+#include "utils/rel.h"
+#include <nodes/makefuncs.h>
+#include "storage/sinvaladt.h"
+#include "miscadmin.h"
+
+PG_MODULE_MAGIC;
+
+static Oid pg_get_relid(const char *relname, char *schema);
+
+Datum pg_gtt_att_statistic(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_att_statistic);
+
+Datum pg_gtt_relstats(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_relstats);
+
+Datum pg_gtt_attached_pid(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_attached_pid);
+
+Datum pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_list_gtt_relfrozenxids);
+
+void _PG_init(void);
+void _PG_fini(void);
+
+void
+_PG_init(void)
+{
+ return;
+}
+
+void
+_PG_fini(void)
+{
+ return;
+}
+
+static Oid
+pg_get_relid(const char *relname, char *schema)
+{
+ Oid relid;
+ RangeVar *rv = makeRangeVar(schema, (char *)relname, -1);
+
+ relid = RangeVarGetRelid(rv, NoLock, true);
+
+ pfree(rv);
+ return relid;
+}
+
+Datum
+pg_gtt_att_statistic(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Relation rel = NULL;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ int attnum = PG_GETARG_INT32(2);
+ Oid reloid;
+ char rel_persistence;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(31);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starelid",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "staattnum",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "stainherit",
+ BOOLOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "stanullfrac",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "stawidth",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 6, "stadistinct",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 7, "stakind1",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 8, "stakind2",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 9, "stakind3",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 10, "stakind4",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 11, "stakind5",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 12, "staop1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 13, "staop2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 14, "staop3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 15, "staop4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 16, "staop5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 17, "stacoll1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 18, "stacoll2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 19, "stacoll3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 20, "stacoll4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 21, "stacoll5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 22, "stanumbers1",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 23, "stanumbers2",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 24, "stanumbers3",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 25, "stanumbers4",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 26, "stanumbers5",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 27, "stavalues1",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 28, "stavalues2",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 29, "stavalues3",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 30, "stavalues4",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 31, "stavalues5",
+ ANYARRAYOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ tuple = get_gtt_att_statistic(reloid, attnum, false);
+ if (tuple)
+ {
+ HeapTuple tp = heap_copytuple(tuple);
+ tuplestore_puttuple(tupstore, tp);
+ }
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_relstats(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[5];
+ bool isnull[5];
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
+ uint32 relfrozenxid = 0;
+ uint32 relminmxid = 0;
+ Relation rel = NULL;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(5);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpages",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "reltuples",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relallvisible",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ table_close(rel, NoLock);
+ return (Datum) 0;
+ }
+
+ get_gtt_relstats(reloid,
+ &relpages, &reltuples, &relallvisible,
+ &relfrozenxid, &relminmxid);
+
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(relpages);
+ values[1] = Float4GetDatum((float4)reltuples);
+ values[2] = Int32GetDatum(relallvisible);
+ values[3] = UInt32GetDatum(relfrozenxid);
+ values[4] = UInt32GetDatum(relminmxid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_attached_pid(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[1];
+ bool isnull[1];
+ Relation rel = NULL;
+ PGPROC *proc = NULL;
+ Bitmapset *map = NULL;
+ pid_t pid = 0;
+ int backendid = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(1);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ map = copy_active_gtt_bitmap(rel->rd_node);
+ if (map)
+ {
+ backendid = bms_first_member(map);
+
+ do
+ {
+ proc = BackendIdGetProc(backendid);
+ pid = proc->pid;
+ if (pid > 0)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ backendid = bms_next_member(map, backendid);
+ } while (backendid > 0);
+
+ pfree(map);
+ }
+
+ tuplestore_donestoring(tupstore);
+ table_close(rel, NoLock);
+
+ return (Datum) 0;
+}
+
+Datum
+pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Datum values[3];
+ bool isnull[3];
+ int num_xid = MaxBackends + 1;
+ int *pids = NULL;
+ uint32 *xids = NULL;
+ int i = 0;
+ int j = 0;
+ uint32 oldest = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(3);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (max_active_gtt <= 0)
+ return (Datum) 0;
+
+ if (RecoveryInProgress())
+ return (Datum) 0;
+
+ pids = palloc0(sizeof(int) * num_xid);
+ xids = palloc0(sizeof(int) * num_xid);
+ oldest = list_all_session_gtt_frozenxids(num_xid, pids, xids, &i);
+ if (i > 0)
+ {
+ if (i > 0)
+ {
+ pids[i] = 0;
+ xids[i] = oldest;
+ i++;
+ }
+
+ for(j = 0; j < i; j++)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pids[j]);
+ values[1] = UInt32GetDatum(xids[j]);
+ values[2] = UInt32GetDatum(0);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ }
+ tuplestore_donestoring(tupstore);
+ pfree(pids);
+ pfree(xids);
+
+ return (Datum) 0;
+}
+
diff --git a/contrib/pg_gtt/pg_gtt.control b/contrib/pg_gtt/pg_gtt.control
new file mode 100644
index 0000000..342af1d
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.control
@@ -0,0 +1,4 @@
+comment = 'pg_gtt'
+default_version = '1.0'
+module_pathname = '$libdir/pg_gtt'
+relocatable = true
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index d8790ad..7e30039 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -158,6 +158,19 @@ static relopt_bool boolRelOpts[] =
},
true
},
+ /*
+ * For global temp table only
+ * use AccessExclusiveLock for ensure safety
+ */
+ {
+ {
+ "on_commit_delete_rows",
+ "global temp table on commit options",
+ RELOPT_KIND_HEAP,
+ ShareUpdateExclusiveLock
+ },
+ true
+ },
/* list terminator */
{{NULL}}
};
@@ -1475,6 +1488,8 @@ bytea *
default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
{
static const relopt_parse_elt tab[] = {
+ {"on_commit_delete_rows", RELOPT_TYPE_BOOL,
+ offsetof(StdRdOptions, on_commit_delete_rows)},
{"fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor)},
{"autovacuum_enabled", RELOPT_TYPE_BOOL,
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index a23dec7..79bdb26 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1014,7 +1014,9 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ /* global temp is same as local temp table */
+ if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 5cc30da..49b7d2e 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -148,7 +148,9 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* metapage, nor the first bitmap page.
*/
sort_threshold = (maintenance_work_mem * 1024L) / BLCKSZ;
- if (index->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ if (!(index->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ index->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
sort_threshold = Min(sort_threshold, NBuffers);
else
sort_threshold = Min(sort_threshold, NLocBuffer);
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..24c56b9 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -601,7 +601,7 @@ heapam_relation_set_new_filenode(Relation rel,
*/
*minmulti = GetOldestMultiXactId();
- srel = RelationCreateStorage(*newrnode, persistence);
+ srel = RelationCreateStorage(*newrnode, persistence, rel);
/*
* If required, set up an init fork for an unlogged table so that it can
@@ -654,7 +654,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index a3c4a1d..03fac55 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -60,6 +60,7 @@
#include "utils/pg_rusage.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/*
* Space/time tradeoff parameters: do these need to be user-tunable?
@@ -214,8 +215,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
Assert(params->truncate != VACOPT_TERNARY_DEFAULT);
/* not every AM requires these to be valid, but heap does */
- Assert(TransactionIdIsNormal(onerel->rd_rel->relfrozenxid));
- Assert(MultiXactIdIsValid(onerel->rd_rel->relminmxid));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relfrozenxid == InvalidTransactionId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && TransactionIdIsNormal(onerel->rd_rel->relfrozenxid)));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relminmxid == InvalidMultiXactId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && MultiXactIdIsValid(onerel->rd_rel->relminmxid)));
/* measure elapsed time iff autovacuum logging requires it */
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
@@ -274,8 +277,19 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
vacrelstats = (LVRelStats *) palloc0(sizeof(LVRelStats));
- vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
- vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ /* get relstat from gtt localhash */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ &vacrelstats->old_rel_pages,
+ &vacrelstats->old_live_tuples,
+ NULL, NULL, NULL);
+ }
+ else
+ {
+ vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
+ vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ }
vacrelstats->num_index_scans = 0;
vacrelstats->pages_removed = 0;
vacrelstats->lock_waiter_detected = false;
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 268f869..8b2e610 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -763,7 +763,14 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+
+ /* global temp table may be not yet initialized for this backend. */
+ if (RELATION_IS_GLOBAL_TEMP(rel) &&
+ blkno == BTREE_METAPAGE &&
+ PageIsNew(BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2e3cc51..b8a57b6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6314,6 +6314,10 @@ StartupXLOG(void)
else
recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
+ /* clean temp relation files */
+ if (max_active_gtt > 0)
+ RemovePgTempFiles();
+
/*
* Check for signal files, and if so set up state for offline recovery
*/
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index a511532..665b7fb 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -44,6 +44,8 @@ OBJS = \
storage.o \
toasting.o
+OBJS += storage_gtt.o
+
BKIFILES = postgres.bki postgres.description postgres.shdescription
include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 1af31c2..ecb516e 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -399,7 +399,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
switch (relpersistence)
{
+ /* global temp table is same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
break;
case RELPERSISTENCE_UNLOGGED:
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index b7bcdd9..6e089dd 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -61,6 +61,7 @@
#include "catalog/pg_type.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "commands/tablecmds.h"
#include "commands/typecmds.h"
#include "executor/executor.h"
@@ -100,6 +101,7 @@ static void AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -405,6 +407,10 @@ heap_create(const char *relname,
relpersistence,
relkind);
+ /* global temp table not create storage file when catalog create */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ create_storage = false;
+
/*
* Have the storage manager create the relation's disk file, if needed.
*
@@ -428,7 +434,7 @@ heap_create(const char *relname,
case RELKIND_INDEX:
case RELKIND_SEQUENCE:
- RelationCreateStorage(rel->rd_node, relpersistence);
+ RelationCreateStorage(rel->rd_node, relpersistence, rel);
break;
case RELKIND_RELATION:
@@ -925,6 +931,7 @@ AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -963,8 +970,18 @@ AddNewRelationTuple(Relation pg_class_desc,
break;
}
- new_rel_reltup->relfrozenxid = relfrozenxid;
- new_rel_reltup->relminmxid = relminmxid;
+ /* global temp table not remember transaction info in catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ new_rel_reltup->relfrozenxid = InvalidTransactionId;
+ new_rel_reltup->relminmxid = InvalidMultiXactId;
+ }
+ else
+ {
+ new_rel_reltup->relfrozenxid = relfrozenxid;
+ new_rel_reltup->relminmxid = relminmxid;
+ }
+
new_rel_reltup->relowner = relowner;
new_rel_reltup->reltype = new_type_oid;
new_rel_reltup->reloftype = reloftype;
@@ -1326,6 +1343,7 @@ heap_create_with_catalog(const char *relname,
reloftypeid,
ownerid,
relkind,
+ relpersistence,
relfrozenxid,
relminmxid,
PointerGetDatum(relacl),
@@ -1410,11 +1428,15 @@ heap_create_with_catalog(const char *relname,
*/
StoreConstraints(new_rel_desc, cooked_constraints, is_internal);
- /*
- * If there's a special on-commit action, remember it
- */
- if (oncommit != ONCOMMIT_NOOP)
- register_on_commit_action(relid, oncommit);
+ /* global temp table register action when storage init */
+ if (relpersistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /*
+ * If there's a special on-commit action, remember it
+ */
+ if (oncommit != ONCOMMIT_NOOP)
+ register_on_commit_action(relid, oncommit);
+ }
/*
* ok, the relation has been cataloged, so close our relations and return
@@ -1906,6 +1928,13 @@ heap_drop_with_catalog(Oid relid)
if (relid == defaultPartOid)
update_default_partition_oid(parentOid, InvalidOid);
+ /* We allow to drop global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ if (is_other_backend_use_gtt(rel->rd_node))
+ elog(ERROR, "can not drop relation when other backend attached this global temp table");
+ }
+
/*
* Schedule unlinking of the relation's physical files at commit.
*/
@@ -3132,9 +3161,10 @@ RemoveStatistics(Oid relid, AttrNumber attnum)
*
* The routine will truncate and then reconstruct the indexes on
* the specified relation. Caller must hold exclusive lock on rel.
+ *
*/
static void
-RelationTruncateIndexes(Relation heapRelation)
+RelationTruncateIndexes(Relation heapRelation, LOCKMODE lockmode)
{
ListCell *indlist;
@@ -3146,7 +3176,7 @@ RelationTruncateIndexes(Relation heapRelation)
IndexInfo *indexInfo;
/* Open the index relation; use exclusive lock, just to be sure */
- currentIndex = index_open(indexId, AccessExclusiveLock);
+ currentIndex = index_open(indexId, lockmode);
/* Fetch info needed for index_build */
indexInfo = BuildIndexInfo(currentIndex);
@@ -3185,8 +3215,13 @@ heap_truncate(List *relids)
{
Oid rid = lfirst_oid(cell);
Relation rel;
+ LOCKMODE lockmode = AccessExclusiveLock;
- rel = table_open(rid, AccessExclusiveLock);
+ /* truncate global temp table only need RowExclusiveLock */
+ if (get_rel_persistence(rid) == RELPERSISTENCE_GLOBAL_TEMP)
+ lockmode = RowExclusiveLock;
+
+ rel = table_open(rid, lockmode);
relations = lappend(relations, rel);
}
@@ -3219,6 +3254,8 @@ void
heap_truncate_one_rel(Relation rel)
{
Oid toastrelid;
+ LOCKMODE lockmode = AccessExclusiveLock;
+ bool truncate_toastrel = false;
/*
* Truncate the relation. Partitioned tables have no storage, so there is
@@ -3227,23 +3264,40 @@ heap_truncate_one_rel(Relation rel)
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
return;
+ toastrelid = rel->rd_rel->reltoastrelid;
+
+ /*
+ * Truncate global temp table only need RowExclusiveLock
+ */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ lockmode = RowExclusiveLock;
+ if (OidIsValid(toastrelid) &&
+ gtt_storage_attached(toastrelid))
+ truncate_toastrel = true;
+ }
+ else if (OidIsValid(toastrelid))
+ truncate_toastrel = true;
+
/* Truncate the underlying relation */
table_relation_nontransactional_truncate(rel);
/* If the relation has indexes, truncate the indexes too */
- RelationTruncateIndexes(rel);
+ RelationTruncateIndexes(rel, lockmode);
/* If there is a toast table, truncate that too */
- toastrelid = rel->rd_rel->reltoastrelid;
- if (OidIsValid(toastrelid))
+ if (truncate_toastrel)
{
- Relation toastrel = table_open(toastrelid, AccessExclusiveLock);
+ Relation toastrel = table_open(toastrelid, lockmode);
table_relation_nontransactional_truncate(toastrel);
- RelationTruncateIndexes(toastrel);
+ RelationTruncateIndexes(toastrel, lockmode);
/* keep the lock... */
table_close(toastrel, NoLock);
}
+
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ up_gtt_relstats(rel, 0, 0, 0, RecentXmin, InvalidMultiXactId);
}
/*
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 7c34509..f623626 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -52,6 +52,7 @@
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
#include "catalog/storage.h"
+#include "catalog/storage_gtt.h"
#include "commands/event_trigger.h"
#include "commands/progress.h"
#include "commands/tablecmds.h"
@@ -879,6 +880,26 @@ index_create(Relation heapRelation,
indexRelationName, RelationGetRelationName(heapRelation))));
}
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ if (accessMethodObjectId != BTREE_AM_OID)
+ elog(ERROR, "only support btree index on global temp table");
+
+ /* We allow to create index on global temp table only this session use it */
+ if (is_other_backend_use_gtt(heapRelation->rd_node) ||
+ gtt_storage_attached(heapRelation->rd_node.relNode))
+ elog(ERROR, "can not create index when have one or more backend attached this global temp table");
+
+ /* No support create index on global temp table use concurrent mode yet */
+ if (concurrent)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot create indexes on global temporary tables using concurrent mode")));
+
+ /* if global temp table not init storage, then skip build index */
+ flags |= INDEX_CREATE_SKIP_BUILD;
+ }
+
/*
* construct tuple descriptor for index tuples
*/
@@ -2047,6 +2068,13 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
*/
CheckTableNotInUse(userIndexRelation, "DROP INDEX");
+ /* We allow to drop index on global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(userHeapRelation))
+ {
+ if (is_other_backend_use_gtt(userHeapRelation->rd_node))
+ elog(ERROR, "can not drop index when other backend attached this global temp table");
+ }
+
/*
* Drop Index Concurrently is more or less the reverse process of Create
* Index Concurrently.
@@ -2688,20 +2716,29 @@ index_update_stats(Relation rel,
else /* don't bother for indexes */
relallvisible = 0;
- if (rd_rel->relpages != (int32) relpages)
+ /* update index stats into localhash for global temp table */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
{
- rd_rel->relpages = (int32) relpages;
- dirty = true;
+ up_gtt_relstats(rel, relpages, reltuples, relallvisible,
+ InvalidTransactionId, InvalidMultiXactId);
}
- if (rd_rel->reltuples != (float4) reltuples)
- {
- rd_rel->reltuples = (float4) reltuples;
- dirty = true;
- }
- if (rd_rel->relallvisible != (int32) relallvisible)
+ else
{
- rd_rel->relallvisible = (int32) relallvisible;
- dirty = true;
+ if (rd_rel->relpages != (int32) relpages)
+ {
+ rd_rel->relpages = (int32) relpages;
+ dirty = true;
+ }
+ if (rd_rel->reltuples != (float4) reltuples)
+ {
+ rd_rel->reltuples = (float4) reltuples;
+ dirty = true;
+ }
+ if (rd_rel->relallvisible != (int32) relallvisible)
+ {
+ rd_rel->relallvisible = (int32) relallvisible;
+ dirty = true;
+ }
}
}
@@ -2816,6 +2853,13 @@ index_build(Relation heapRelation,
pgstat_progress_update_multi_param(6, index, val);
}
+ /* POALR */
+ if (RELATION_IS_GLOBAL_TEMP(indexRelation))
+ {
+ if (!gtt_storage_attached(indexRelation->rd_node.relNode))
+ RelationCreateStorage(indexRelation->rd_node, RELPERSISTENCE_GLOBAL_TEMP, indexRelation);
+ }
+
/*
* Call the access method's build procedure
*/
@@ -3148,12 +3192,22 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
/*
* Scan the index and gather up all the TIDs into a tuplesort object.
*/
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = indexRelation;
ivinfo.analyze_only = false;
ivinfo.report_progress = true;
ivinfo.estimated_count = true;
ivinfo.message_level = DEBUG2;
- ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
+
+ /* get relstats abort global temp table from hashtable, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ get_gtt_relstats(RelationGetRelid(heapRelation),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
ivinfo.strategy = NULL;
/*
@@ -3411,6 +3465,15 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
errmsg("cannot reindex temporary tables of other sessions")));
/*
+ * Because global temp table cannot change relfilenode
+ * no support reindex on global temp table yet.
+ */
+ if (RELATION_IS_GLOBAL_TEMP(iRel))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot reindex global temporary tables")));
+
+ /*
* Also check for active uses of the index in the current transaction; we
* don't want to reindex underneath an open indexscan.
*/
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index e251f5a..97bf247 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -647,6 +647,13 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
errmsg("cannot create temporary relation in non-temporary schema")));
}
break;
+ /* global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ if (isAnyTempNamespace(nspid))
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot create global temp relations in temporary schemas")));
+ break;
case RELPERSISTENCE_PERMANENT:
if (isTempOrTempToastNamespace(nspid))
newRelation->relpersistence = RELPERSISTENCE_TEMP;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 625af8d..baf7d61 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -28,6 +28,7 @@
#include "access/xlogutils.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "storage/freespace.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
@@ -74,9 +75,10 @@ static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
*
* This function is transactional. The creation is WAL-logged, and if the
* transaction aborts later on, the storage will be destroyed.
+ *
*/
SMgrRelation
-RelationCreateStorage(RelFileNode rnode, char relpersistence)
+RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel)
{
PendingRelDelete *pending;
SMgrRelation srel;
@@ -86,6 +88,8 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
switch (relpersistence)
{
case RELPERSISTENCE_TEMP:
+ /* global temp table use same storage strategy as local temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
needs_wal = false;
break;
@@ -118,6 +122,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
pending->next = pendingDeletes;
pendingDeletes = pending;
+ /* remember global temp table storage info to localhash */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP && rel)
+ remember_gtt_storage_info(rnode, rel);
+
return srel;
}
@@ -487,8 +495,15 @@ smgrDoPendingDeletes(bool isCommit)
smgrdounlinkall(srels, nrels, false);
for (i = 0; i < nrels; i++)
+ {
smgrclose(srels[i]);
+ /* clean global temp table flags when transaction commit or rollback */
+ if (SmgrIsTemp(srels[i]) &&
+ gtt_storage_attached(srels[i]->smgr_rnode.node.relNode))
+ forget_gtt_storage_info(srels[i]->smgr_rnode.node.relNode);
+ }
+
pfree(srels);
}
}
diff --git a/src/backend/catalog/storage_gtt.c b/src/backend/catalog/storage_gtt.c
new file mode 100644
index 0000000..c7b9a48
--- /dev/null
+++ b/src/backend/catalog/storage_gtt.c
@@ -0,0 +1,810 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.c
+ * code to create and destroy physical storage for global temparary table
+ *
+ * IDENTIFICATION
+ * src/backend/catalog/storage_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+
+#include "access/visibilitymap.h"
+#include "access/xact.h"
+#include "access/xlog.h"
+#include "access/xloginsert.h"
+#include "access/xlogutils.h"
+#include "access/htup_details.h"
+#include "access/multixact.h"
+#include "catalog/storage.h"
+#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/heap.h"
+#include "commands/tablecmds.h"
+#include "nodes/primnodes.h"
+#include "nodes/pg_list.h"
+#include "miscadmin.h"
+#include "storage/freespace.h"
+#include "storage/smgr.h"
+#include "storage/ipc.h"
+#include "storage/proc.h"
+#include "storage/lwlock.h"
+#include "storage/shmem.h"
+#include "utils/memutils.h"
+#include "utils/rel.h"
+#include "utils/hsearch.h"
+#include "utils/catcache.h"
+#include <utils/relcache.h>
+#include "utils/inval.h"
+#include "utils/guc.h"
+#include "utils/guc.h"
+
+
+/* Copy from bitmapset.c, because gtt used the function in bitmapset.c */
+#define WORDNUM(x) ((x) / BITS_PER_BITMAPWORD)
+#define BITNUM(x) ((x) % BITS_PER_BITMAPWORD)
+
+#define BITMAPSET_SIZE(nwords) \
+ (offsetof(Bitmapset, words) + (nwords) * sizeof(bitmapword))
+
+static bool gtt_cleaner_exit_registered = false;
+static HTAB *gtt_storage_local_hash = NULL;
+static HTAB *active_gtt_shared_hash = NULL;
+static MemoryContext gtt_relstats_context = NULL;
+
+/* relfrozenxid of all gtts in the current session */
+static List *gtt_session_relfrozenxid_list = NIL;
+static TransactionId gtt_session_frozenxid = InvalidTransactionId;
+
+typedef struct gtt_ctl_data
+{
+ LWLock lock;
+ int max_entry;
+ int entry_size;
+}gtt_ctl_data;
+
+static gtt_ctl_data *gtt_shared_ctl = NULL;
+
+typedef struct
+{
+ RelFileNode rnode;
+ Bitmapset *map;
+ /* bitmap data */
+} gtt_shared_hash_entry;
+
+typedef struct
+{
+ Oid relid;
+
+ Oid spcnode;
+ /* pg_class stat */
+ int32 relpages;
+ float4 reltuples;
+ int32 relallvisible;
+ TransactionId relfrozenxid;
+ TransactionId relminmxid;
+ char relkind;
+ bool on_commit_delete;
+
+ /* pg_statistic */
+ int natts;
+ int *attnum;
+ HeapTuple *att_stat_tups;
+} gtt_local_hash_entry;
+
+static Size action_gtt_shared_hash_entry_size(void);
+static void gtt_storage_checkin(RelFileNode rnode);
+static void gtt_storage_checkout(RelFileNode rnode, bool skiplock);
+static void gtt_storage_removeall(int code, Datum arg);
+static void insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid);
+static void remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid);
+static void set_gtt_session_relfrozenxid(void);
+
+static Size
+action_gtt_shared_hash_entry_size(void)
+{
+ int wordnum;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ wordnum = WORDNUM(MaxBackends + 1);
+ hash_entry_size += MAXALIGN(sizeof(gtt_shared_hash_entry));
+ hash_entry_size += MAXALIGN(BITMAPSET_SIZE(wordnum + 1));
+
+ return hash_entry_size;
+}
+
+Size
+active_gtt_shared_hash_size(void)
+{
+ Size size = 0;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ size = MAXALIGN(sizeof(gtt_ctl_data));
+ hash_entry_size = action_gtt_shared_hash_entry_size();
+ size += hash_estimate_size(max_active_gtt, hash_entry_size);
+
+ return size;
+}
+
+void
+active_gtt_shared_hash_init(void)
+{
+ HASHCTL info;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ gtt_shared_ctl =
+ ShmemInitStruct("gtt_shared_ctl",
+ sizeof(gtt_ctl_data),
+ &found);
+
+ if (!found)
+ {
+ LWLockRegisterTranche(LWTRANCHE_GTT_CTL, "gtt_shared_ctl");
+ LWLockInitialize(>t_shared_ctl->lock, LWTRANCHE_GTT_CTL);
+ gtt_shared_ctl->max_entry = max_active_gtt;
+ gtt_shared_ctl->entry_size = action_gtt_shared_hash_entry_size();
+ }
+
+ info.keysize = sizeof(RelFileNode);
+ info.entrysize = gtt_shared_ctl->entry_size;
+ active_gtt_shared_hash =
+ ShmemInitHash("active gtt shared hash",
+ gtt_shared_ctl->max_entry,
+ gtt_shared_ctl->max_entry,
+ &info, HASH_ELEM | HASH_BLOBS | HASH_FIXED_SIZE);
+}
+
+static void
+gtt_storage_checkin(RelFileNode rnode)
+{
+ gtt_shared_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ entry = (gtt_shared_hash_entry *) hash_search(active_gtt_shared_hash,
+ &rnode, HASH_ENTER_NULL, &found);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of shared memory"),
+ errhint("You might need to increase max_active_gtt.")));
+ }
+
+ if (found == false)
+ {
+ int wordnum;
+
+ entry->map = (Bitmapset *)((char *)entry + MAXALIGN(sizeof(gtt_shared_hash_entry)));
+ wordnum = WORDNUM(MaxBackends + 1);
+ memset(entry->map, 0, BITMAPSET_SIZE(wordnum + 1));
+ entry->map->nwords = wordnum + 1;
+ }
+
+ bms_add_member(entry->map, MyBackendId);
+ LWLockRelease(>t_shared_ctl->lock);
+}
+
+static void
+gtt_storage_checkout(RelFileNode rnode, bool skiplock)
+{
+ gtt_shared_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (!skiplock)
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(rnode), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ elog(WARNING, "relfilenode %u/%u/%u not exist in gtt shared hash when forget",
+ rnode.dbNode, rnode.spcNode, rnode.relNode);
+ return;
+ }
+
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+ bms_del_member(entry->map, MyBackendId);
+
+ if (bms_is_empty(entry->map))
+ {
+ if (!hash_search(active_gtt_shared_hash, &rnode, HASH_REMOVE, NULL))
+ elog(PANIC, "gtt shared hash table corrupted");
+ }
+
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return;
+}
+
+Bitmapset *
+copy_active_gtt_bitmap(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ Bitmapset *map_copy = NULL;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return NULL;
+ }
+
+ Assert(entry->map);
+ if (!bms_is_empty(entry->map))
+ map_copy = bms_copy(entry->map);
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return map_copy;
+}
+
+bool
+is_other_backend_use_gtt(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ bool in_use = false;
+ int num_use = 0;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return false;
+ }
+
+ Assert(entry->map);
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+
+ num_use = bms_num_members(entry->map);
+ if (num_use == 0)
+ in_use = false;
+ else if (num_use == 1)
+ {
+ if(bms_is_member(MyBackendId, entry->map))
+ in_use = false;
+ else
+ in_use = true;
+ }
+ else
+ in_use = true;
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return in_use;
+}
+
+void
+remember_gtt_storage_info(RelFileNode rnode, Relation rel)
+{
+ gtt_local_hash_entry *entry;
+ MemoryContext oldcontext;
+ Oid relid = rnode.relNode;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temporary table feature is disable"),
+ errhint("You might need to increase max_active_gtt to enable this feature.")));
+
+ if (RecoveryInProgress())
+ elog(ERROR, "readonly mode not support access global temp table yet");
+
+ if (gtt_storage_local_hash == NULL)
+ {
+#define GTT_LOCAL_HASH_SIZE 1024
+ /* First time through: initialize the hash table */
+ HASHCTL ctl;
+
+ MemSet(&ctl, 0, sizeof(ctl));
+ ctl.keysize = sizeof(Oid);
+ ctl.entrysize = sizeof(gtt_local_hash_entry);
+ gtt_storage_local_hash =
+ hash_create("global temp relation table",
+ GTT_LOCAL_HASH_SIZE,
+ &ctl, HASH_ELEM | HASH_BLOBS);
+
+ if (!CacheMemoryContext)
+ CreateCacheMemoryContext();
+
+ gtt_relstats_context =
+ AllocSetContextCreate(CacheMemoryContext,
+ "gtt relstats context",
+ ALLOCSET_DEFAULT_SIZES);
+ }
+
+ /* Look up or create an entry */
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_ENTER, &found);
+
+ if (found)
+ {
+ elog(ERROR, "backend %d relid %u already exists in global temp table local hash",
+ MyBackendId, relid);
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+
+ entry->spcnode = rnode.spcNode;
+ entry->relpages = 0;
+ entry->reltuples = 0;
+ entry->relallvisible = 0;
+ entry->relkind = rel->rd_rel->relkind;
+ /* only heap contain transaction information */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ int natts = RelationGetNumberOfAttributes(rel);
+ entry->natts = natts;
+ entry->attnum = palloc0(sizeof(int) * natts);
+ entry->att_stat_tups = palloc0(sizeof(HeapTuple) * natts);
+
+ if (RELATION_GTT_ON_COMMIT_DELETE(rel))
+ {
+ entry->on_commit_delete = true;
+ register_on_commit_action(rel->rd_node.relNode, ONCOMMIT_DELETE_ROWS);
+ }
+
+ entry->relfrozenxid = RecentXmin;
+ entry->relminmxid = GetOldestMultiXactId();
+ insert_gtt_relfrozenxid_to_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ gtt_storage_checkin(rnode);
+ }
+ else
+ {
+ entry->natts = 0;
+ entry->attnum = 0;
+ entry->att_stat_tups = NULL;
+ entry->on_commit_delete = false;
+ entry->relfrozenxid = 0;
+ entry->relminmxid = 0;
+ }
+
+ MemoryContextSwitchTo(oldcontext);
+
+ if (!gtt_cleaner_exit_registered)
+ {
+ before_shmem_exit(gtt_storage_removeall, 0);
+ gtt_cleaner_exit_registered = true;
+ }
+
+ return;
+}
+
+void
+forget_gtt_storage_info(Oid relid)
+{
+ gtt_local_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, NULL);
+
+ if (entry && entry->relkind == RELKIND_RELATION)
+ {
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ gtt_storage_checkout(rnode, false);
+
+ Assert(TransactionIdIsNormal(entry->relfrozenxid));
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_REMOVE, NULL);
+
+ return;
+}
+
+/* is the storage file was created in this backend */
+bool
+gtt_storage_attached(Oid relid)
+{
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ if (gtt_storage_local_hash == NULL)
+ return false;
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, &found);
+
+ return found;
+}
+
+static void
+gtt_storage_removeall(int code, Datum arg)
+{
+ HASH_SEQ_STATUS status;
+ gtt_local_hash_entry *entry;
+ int nrels = 0,
+ maxrels = 0;
+ SMgrRelation *srels = NULL;
+ RelFileNode *rnodes = NULL;
+ char *relkinds = NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ hash_seq_init(&status, gtt_storage_local_hash);
+ while ((entry = (gtt_local_hash_entry *) hash_seq_search(&status)) != NULL)
+ {
+ SMgrRelation srel;
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ srel = smgropen(rnode, MyBackendId);
+
+ /* allocate the initial array, or extend it, if needed */
+ if (maxrels == 0)
+ {
+ maxrels = 32;
+ srels = palloc(sizeof(SMgrRelation) * maxrels);
+ rnodes = palloc(sizeof(RelFileNode) * maxrels);
+ relkinds = palloc(sizeof(char) * maxrels);
+ }
+ else if (maxrels <= nrels)
+ {
+ maxrels *= 2;
+ srels = repalloc(srels, sizeof(SMgrRelation) * maxrels);
+ rnodes = repalloc(rnodes, sizeof(RelFileNode) * maxrels);
+ relkinds = repalloc(relkinds, sizeof(char) * maxrels);
+ }
+
+ srels[nrels] = srel;
+ rnodes[nrels] = rnode;
+ relkinds[nrels] = entry->relkind;
+ nrels++;
+ }
+
+ if (nrels > 0)
+ {
+ int i;
+
+ smgrdounlinkall(srels, nrels, false);
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ for (i = 0; i < nrels; i++)
+ {
+ smgrclose(srels[i]);
+ if (relkinds[i] == RELKIND_RELATION)
+ gtt_storage_checkout(rnodes[i], true);
+ }
+ LWLockRelease(>t_shared_ctl->lock);
+
+ pfree(srels);
+ pfree(rnodes);
+ pfree(relkinds);
+ }
+
+ MyProc->session_gtt_frozenxid = InvalidTransactionId;
+
+ return;
+}
+
+/*
+ * Update global temp table relstats(relpage/reltuple/relallvisible)
+ * to local hashtable
+ */
+void
+up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid)
+{
+ Oid relid = RelationGetRelid(relation);
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->spcnode);
+
+ if (num_pages >= 0 &&
+ entry->relpages != (int32)num_pages)
+ entry->relpages = (int32)num_pages;
+
+ if (num_tuples >= 0 &&
+ num_tuples != (float4)entry->reltuples)
+ entry->reltuples = (float4)num_tuples;
+
+ /* only heap contain transaction information and relallvisible */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ if (entry->relallvisible >= 0 &&
+ entry->relallvisible != (int32)num_all_visible_pages)
+ {
+ entry->relallvisible = (int32)num_all_visible_pages;
+ }
+
+ if (TransactionIdIsNormal(relfrozenxid) &&
+ entry->relfrozenxid != relfrozenxid &&
+ (TransactionIdPrecedes(entry->relfrozenxid, relfrozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(), entry->relfrozenxid)))
+ {
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ entry->relfrozenxid = relfrozenxid;
+ insert_gtt_relfrozenxid_to_ordered_list(relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ if (MultiXactIdIsValid(relminmxid) &&
+ entry->relminmxid != relminmxid &&
+ (MultiXactIdPrecedes(entry->relminmxid, relminmxid) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), entry->relminmxid)))
+ {
+ entry->relminmxid = relminmxid;
+ }
+ }
+
+ return;
+}
+
+/*
+ * Search global temp table relstats(relpage/reltuple/relallvisible)
+ * from local hashtable.
+ */
+void
+get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->relid == relid);
+
+ if (relpages)
+ *relpages = entry->relpages;
+
+ if (reltuples)
+ *reltuples = entry->reltuples;
+
+ if (relallvisible)
+ *relallvisible = entry->relallvisible;
+
+ if (relfrozenxid)
+ *relfrozenxid = entry->relfrozenxid;
+
+ if (relminmxid)
+ *relminmxid = entry->relminmxid;
+
+ return;
+}
+
+/*
+ * Update global temp table statistic info(definition is same as pg_statistic)
+ * to local hashtable where ananyze global temp table
+ */
+void
+up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ MemoryContext oldcontext;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ if (entry->relkind != RELKIND_RELATION)
+ {
+ elog(WARNING, "oid %u not a relation", reloid);
+ return;
+ }
+
+ /* todo */
+ if (entry->natts < natts)
+ {
+ elog(WARNING, "reloid %u not support update attstat after add colunm", reloid);
+ return;
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ Assert(entry->relid == reloid);
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == 0)
+ {
+ entry->attnum[i] = attnum;
+ break;
+ }
+ else if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ heap_freetuple(entry->att_stat_tups[i]);
+ entry->att_stat_tups[i] = NULL;
+ break;
+ }
+ }
+
+ Assert(i < entry->natts);
+ Assert(entry->att_stat_tups[i] == NULL);
+ entry->att_stat_tups[i] = heap_form_tuple(tupleDescriptor, values, isnull);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+/*
+ * Search global temp table statistic info(definition is same as pg_statistic)
+ * from local hashtable.
+ */
+HeapTuple
+get_gtt_att_statistic(Oid reloid, int attnum, bool inh)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return NULL;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return NULL;
+
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ return entry->att_stat_tups[i];
+ }
+ }
+
+ return NULL;
+}
+
+void
+release_gtt_statistic_cache(HeapTuple tup)
+{
+ /* do nothing */
+ return;
+}
+
+static void
+insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid)
+{
+ MemoryContext oldcontext;
+ ListCell *cell;
+ int i;
+ Assert(TransactionIdIsNormal(relfrozenxid));
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ /* Does the datum belong at the front? */
+ if (gtt_session_relfrozenxid_list == NIL ||
+ TransactionIdFollowsOrEquals(relfrozenxid,
+ linitial_oid(gtt_session_relfrozenxid_list)))
+ {
+ gtt_session_relfrozenxid_list =
+ lcons_oid(relfrozenxid, gtt_session_relfrozenxid_list);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+ }
+ /* No, so find the entry it belongs after */
+
+ i = 0;
+ foreach (cell, gtt_session_relfrozenxid_list)
+ {
+ if (TransactionIdFollowsOrEquals(relfrozenxid, lfirst_oid(cell)))
+ break; /* it belongs after 'prev', before 'curr' */
+
+ i += 1;
+ }
+ /* Insert datum into list after 'prev' */
+ list_insert_nth_oid(gtt_session_relfrozenxid_list, i, relfrozenxid);
+ MemoryContextSwitchTo(oldcontext);
+}
+
+static void
+remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid)
+{
+ gtt_session_relfrozenxid_list =
+ list_delete_oid(gtt_session_relfrozenxid_list, relfrozenxid);
+}
+
+static void
+set_gtt_session_relfrozenxid(void)
+{
+ TransactionId gtt_frozenxid = InvalidTransactionId;
+
+ if (gtt_session_relfrozenxid_list)
+ gtt_frozenxid = llast_oid(gtt_session_relfrozenxid_list);
+
+ gtt_session_frozenxid = gtt_frozenxid;
+ if (MyProc->session_gtt_frozenxid != gtt_frozenxid)
+ MyProc->session_gtt_frozenxid = gtt_frozenxid;
+}
+
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 7accb95..e0dc376 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -65,6 +65,7 @@
#include "utils/syscache.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/* Per-index data for ANALYZE */
typedef struct AnlIndexData
@@ -102,7 +103,7 @@ static int acquire_inherited_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
static void update_attstats(Oid relid, bool inh,
- int natts, VacAttrStats **vacattrstats);
+ int natts, VacAttrStats **vacattrstats, char relpersistence);
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
@@ -575,14 +576,15 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* pg_statistic for columns we didn't process, we leave them alone.)
*/
update_attstats(RelationGetRelid(onerel), inh,
- attr_cnt, vacattrstats);
+ attr_cnt, vacattrstats, RelationGetRelPersistence(onerel));
for (ind = 0; ind < nindexes; ind++)
{
AnlIndexData *thisdata = &indexdata[ind];
update_attstats(RelationGetRelid(Irel[ind]), false,
- thisdata->attr_cnt, thisdata->vacattrstats);
+ thisdata->attr_cnt, thisdata->vacattrstats,
+ RelationGetRelPersistence(Irel[ind]));
}
/*
@@ -659,11 +661,20 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
IndexBulkDeleteResult *stats;
IndexVacuumInfo ivinfo;
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = Irel[ind];
ivinfo.analyze_only = true;
ivinfo.estimated_count = true;
ivinfo.message_level = elevel;
- ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
+ /* get global temp relstats from localhash, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
ivinfo.strategy = vac_strategy;
stats = index_vacuum_cleanup(&ivinfo, NULL);
@@ -1425,7 +1436,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
* by taking a self-exclusive lock on the relation in analyze_rel().
*/
static void
-update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
+update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats, char relpersistence)
{
Relation sd;
int attno;
@@ -1527,31 +1538,45 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
}
}
- /* Is there already a pg_statistic tuple for this attribute? */
- oldtup = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(relid),
- Int16GetDatum(stats->attr->attnum),
- BoolGetDatum(inh));
-
- if (HeapTupleIsValid(oldtup))
+ /* Update column statistic to localhash, not catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
- /* Yes, replace it */
- stup = heap_modify_tuple(oldtup,
- RelationGetDescr(sd),
- values,
- nulls,
- replaces);
- ReleaseSysCache(oldtup);
- CatalogTupleUpdate(sd, &stup->t_self, stup);
+ up_gtt_att_statistic(relid,
+ stats->attr->attnum,
+ inh,
+ natts,
+ RelationGetDescr(sd),
+ values,
+ nulls);
}
else
{
- /* No, insert new tuple */
- stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
- CatalogTupleInsert(sd, stup);
- }
+ /* Is there already a pg_statistic tuple for this attribute? */
+ oldtup = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh));
+
+ if (HeapTupleIsValid(oldtup))
+ {
+ /* Yes, replace it */
+ stup = heap_modify_tuple(oldtup,
+ RelationGetDescr(sd),
+ values,
+ nulls,
+ replaces);
+ ReleaseSysCache(oldtup);
+ CatalogTupleUpdate(sd, &stup->t_self, stup);
+ }
+ else
+ {
+ /* No, insert new tuple */
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ CatalogTupleInsert(sd, stup);
+ }
- heap_freetuple(stup);
+ heap_freetuple(stup);
+ }
}
table_close(sd, RowExclusiveLock);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a23128d..0d38988 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -392,6 +392,12 @@ cluster_rel(Oid tableOid, Oid indexOid, int options)
errmsg("cannot vacuum temporary tables of other sessions")));
}
+ /* not support cluster global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(OldHeap))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support cluster global temporary tables yet")));
+
/*
* Also check for active uses of the relation in the current transaction,
* including open scans and pending AFTER trigger events.
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 374e2d0..8e88a59 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2585,6 +2585,16 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind,
!isTempNamespace(classtuple->relnamespace))
continue;
+ /* not support reindex on global temp table, so skip it */
+ if (classtuple->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(WARNING,
+ (errmsg("global temp table \"%s.%s\" skip reindexed",
+ get_namespace_name(get_rel_namespace(relid)),
+ get_rel_name(relid))));
+ continue;
+ }
+
/* Check user/system classification, and optionally skip */
if (objectKind == REINDEX_OBJECT_SYSTEM &&
!IsSystemClass(relid, classtuple))
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index bae3b38..ff9d5cb 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -107,7 +107,8 @@ RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid,
* transaction.
*/
relpersistence = get_rel_persistence(relid);
- if (relpersistence == RELPERSISTENCE_TEMP)
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE;
/* Check permissions. */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 5597be6..4bf4b9a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -48,6 +48,7 @@
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
#include "catalog/toasting.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/comment.h"
#include "commands/defrem.h"
@@ -531,6 +532,7 @@ static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,
Relation partitionTbl);
static List *GetParentedForeignKeyRefs(Relation partition);
static void ATDetachCheckNoForeignKeyRefs(Relation partition);
+static bool has_oncommit_option(List *options);
/* ----------------------------------------------------------------
@@ -576,6 +578,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
LOCKMODE parentLockmode;
const char *accessMethod = NULL;
Oid accessMethodId = InvalidOid;
+ bool has_oncommit_clause = false;
/*
* Truncate relname to appropriate length (probably a waste of time, as
@@ -586,8 +589,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Check consistency of arguments
*/
+ /* global temp table same as local temp table */
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !(stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -617,12 +622,28 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* code. This is needed because calling code might not expect untrusted
* tables to appear in pg_temp at the front of its search path.
*/
- if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
+ /* global temp table same as local temp table */
+ if ((stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
&& InSecurityRestrictedOperation())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("cannot create temporary table within security-restricted operation")));
+ /* Not support partitioned or inherited global temp table yet */
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (relkind == RELKIND_PARTITIONED_TABLE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary partition table yet")));
+
+ if (stmt->inhRelations)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary inheritance table yet")));
+ }
+
/*
* Determine the lockmode to use when scanning parents. A self-exclusive
* lock is needed here.
@@ -718,6 +739,40 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Parse and validate reloptions, if any.
*/
+ /* global temp table */
+ has_oncommit_clause = has_oncommit_option(stmt->options);
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (has_oncommit_clause)
+ {
+ if (stmt->oncommit != ONCOMMIT_NOOP)
+ elog(ERROR, "can not defeine global temp table with on commit and with clause at same time");
+ }
+ else
+ {
+ DefElem *opt = makeNode(DefElem);
+
+ opt->type = T_DefElem;
+ opt->defnamespace = NULL;
+ opt->defname = "on_commit_delete_rows";
+ opt->defaction = DEFELEM_UNSPEC;
+
+ /* use reloptions to remember on commit clause */
+ if (stmt->oncommit == ONCOMMIT_DELETE_ROWS)
+ opt->arg = (Node *)makeString("true");
+ else if (stmt->oncommit == ONCOMMIT_PRESERVE_ROWS)
+ opt->arg = (Node *)makeString("false");
+ else if (stmt->oncommit == ONCOMMIT_NOOP)
+ opt->arg = (Node *)makeString("true");
+ else
+ elog(ERROR, "global temp table not support on commit drop clause");
+
+ stmt->options = lappend(stmt->options, opt);
+ }
+ }
+ else if (has_oncommit_clause)
+ elog(ERROR, "regular table cannot specifie on_commit_delete_rows");
+
reloptions = transformRelOptions((Datum) 0, stmt->options, NULL, validnsps,
true, false);
@@ -1772,7 +1827,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ RELATION_IS_GLOBAL_TEMP(rel))
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -3330,6 +3386,13 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bo
* specially.
*/
targetrelation = relation_open(myrelid, is_index ? ShareUpdateExclusiveLock : AccessExclusiveLock);
+
+ /* not support rename global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(targetrelation))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support rename global temporary tables yet")));
+
namespaceId = RelationGetNamespace(targetrelation);
/*
@@ -3499,6 +3562,14 @@ AlterTable(Oid relid, LOCKMODE lockmode, AlterTableStmt *stmt)
/* Caller is required to provide an adequate lock. */
rel = relation_open(relid, NoLock);
+ /* not support alter global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support alter global temporary tables yet")));
+ }
+
CheckTableNotInUse(rel, "ALTER TABLE");
ATController(stmt, rel, stmt->cmds, stmt->relation->inh, lockmode);
@@ -7679,6 +7750,13 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("referenced relation \"%s\" is not a table",
RelationGetRelationName(pkrel))));
+ /* global temp table not support foreign key constraint yet */
+ if (RELATION_IS_GLOBAL_TEMP(pkrel))
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("referenced relation \"%s\" is not a global temp table",
+ RelationGetRelationName(pkrel))));
+
if (!allowSystemTableMods && IsSystemRelation(pkrel))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -7718,6 +7796,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on temporary tables must involve temporary tables of this session")));
break;
+ /* global temp table not support foreign key constraint yet */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("not support foreign key constraints on global temp table yet")));
+ break;
}
/*
@@ -12726,7 +12810,7 @@ index_copy_data(Relation rel, RelFileNode newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
@@ -14133,7 +14217,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
*/
switch (rel->rd_rel->relpersistence)
{
+ /* global temp table same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("cannot change logged status of table \"%s\" because it is temporary",
@@ -16723,3 +16809,20 @@ ATDetachCheckNoForeignKeyRefs(Relation partition)
table_close(rel, NoLock);
}
}
+
+static bool
+has_oncommit_option(List *options)
+{
+ ListCell *listptr;
+
+ foreach(listptr, options)
+ {
+ DefElem *def = (DefElem *) lfirst(listptr);
+
+ if (pg_strcasecmp(def->defname, "on_commit_delete_rows") == 0)
+ return true;
+ }
+
+ return false;
+}
+
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index da1da23..70278a6 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -35,6 +35,7 @@
#include "catalog/pg_database.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_namespace.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/defrem.h"
#include "commands/vacuum.h"
@@ -1070,12 +1071,25 @@ vac_estimate_reltuples(Relation relation,
BlockNumber scanned_pages,
double scanned_tuples)
{
- BlockNumber old_rel_pages = relation->rd_rel->relpages;
- double old_rel_tuples = relation->rd_rel->reltuples;
+ BlockNumber old_rel_pages = 0;
+ double old_rel_tuples = 0;
double old_density;
double unscanned_pages;
double total_tuples;
+ /* get relstat from gtt local hash */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ {
+ get_gtt_relstats(RelationGetRelid(relation),
+ &old_rel_pages, &old_rel_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ {
+ old_rel_pages = relation->rd_rel->relpages;
+ old_rel_tuples = relation->rd_rel->reltuples;
+ }
+
/* If we did scan the whole table, just use the count as-is */
if (scanned_pages >= total_pages)
return scanned_tuples;
@@ -1175,24 +1189,8 @@ vac_update_relstats(Relation relation,
/* Apply statistical updates, if any, to copied tuple */
dirty = false;
- if (pgcform->relpages != (int32) num_pages)
- {
- pgcform->relpages = (int32) num_pages;
- dirty = true;
- }
- if (pgcform->reltuples != (float4) num_tuples)
- {
- pgcform->reltuples = (float4) num_tuples;
- dirty = true;
- }
- if (pgcform->relallvisible != (int32) num_all_visible_pages)
- {
- pgcform->relallvisible = (int32) num_all_visible_pages;
- dirty = true;
- }
/* Apply DDL updates, but not inside an outer transaction (see above) */
-
if (!in_outer_xact)
{
/*
@@ -1217,37 +1215,64 @@ vac_update_relstats(Relation relation,
}
}
- /*
- * Update relfrozenxid, unless caller passed InvalidTransactionId
- * indicating it has no new data.
- *
- * Ordinarily, we don't let relfrozenxid go backwards: if things are
- * working correctly, the only way the new frozenxid could be older would
- * be if a previous VACUUM was done with a tighter freeze_min_age, in
- * which case we don't want to forget the work it already did. However,
- * if the stored relfrozenxid is "in the future", then it must be corrupt
- * and it seems best to overwrite it with the cutoff we used this time.
- * This should match vac_update_datfrozenxid() concerning what we consider
- * to be "in the future".
- */
- if (TransactionIdIsNormal(frozenxid) &&
- pgcform->relfrozenxid != frozenxid &&
- (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
- TransactionIdPrecedes(ReadNewTransactionId(),
- pgcform->relfrozenxid)))
+ /* global temp table remember relstats to localhash not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
{
- pgcform->relfrozenxid = frozenxid;
- dirty = true;
+ up_gtt_relstats(relation,
+ num_pages, num_tuples,
+ num_all_visible_pages,
+ frozenxid, minmulti);
}
-
- /* Similarly for relminmxid */
- if (MultiXactIdIsValid(minmulti) &&
- pgcform->relminmxid != minmulti &&
- (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
- MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ else
{
- pgcform->relminmxid = minmulti;
- dirty = true;
+ if (pgcform->relpages != (int32) num_pages)
+ {
+ pgcform->relpages = (int32) num_pages;
+ dirty = true;
+ }
+ if (pgcform->reltuples != (float4) num_tuples)
+ {
+ pgcform->reltuples = (float4) num_tuples;
+ dirty = true;
+ }
+ if (pgcform->relallvisible != (int32) num_all_visible_pages)
+ {
+ pgcform->relallvisible = (int32) num_all_visible_pages;
+ dirty = true;
+ }
+
+ /*
+ * Update relfrozenxid, unless caller passed InvalidTransactionId
+ * indicating it has no new data.
+ *
+ * Ordinarily, we don't let relfrozenxid go backwards: if things are
+ * working correctly, the only way the new frozenxid could be older would
+ * be if a previous VACUUM was done with a tighter freeze_min_age, in
+ * which case we don't want to forget the work it already did. However,
+ * if the stored relfrozenxid is "in the future", then it must be corrupt
+ * and it seems best to overwrite it with the cutoff we used this time.
+ * This should match vac_update_datfrozenxid() concerning what we consider
+ * to be "in the future".
+ */
+ if (TransactionIdIsNormal(frozenxid) &&
+ pgcform->relfrozenxid != frozenxid &&
+ (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(),
+ pgcform->relfrozenxid)))
+ {
+ pgcform->relfrozenxid = frozenxid;
+ dirty = true;
+ }
+
+ /* Similarly for relminmxid */
+ if (MultiXactIdIsValid(minmulti) &&
+ pgcform->relminmxid != minmulti &&
+ (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ {
+ pgcform->relminmxid = minmulti;
+ dirty = true;
+ }
}
/* If anything changed, write out the tuple. */
@@ -1339,6 +1364,10 @@ vac_update_datfrozenxid(void)
continue;
}
+ /* global temp table relstats not in pg_class */
+ if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ continue;
+
/*
* Some table AMs might not need per-relation xid / multixid horizons.
* It therefore seems reasonable to allow relfrozenxid and relminmxid
@@ -1396,6 +1425,25 @@ vac_update_datfrozenxid(void)
Assert(TransactionIdIsNormal(newFrozenXid));
Assert(MultiXactIdIsValid(newMinMulti));
+ /*
+ * Global temp table get frozenxid from MyProc
+ * to avoid the vacuum truncate clog that gtt need.
+ */
+ if (max_active_gtt > 0)
+ {
+ TransactionId oldest_gtt_frozenxid =
+ list_all_session_gtt_frozenxids(0, NULL, NULL, NULL);
+
+ if (TransactionIdIsNormal(oldest_gtt_frozenxid) &&
+ TransactionIdPrecedes(oldest_gtt_frozenxid, newFrozenXid))
+ {
+ ereport(WARNING,
+ (errmsg("global temp table oldest FrozenXid is far in the past"),
+ errhint("please truncate them or kill those sessions that use them.")));
+ newFrozenXid = oldest_gtt_frozenxid;
+ }
+ }
+
/* Now fetch the pg_database tuple we need to update. */
relation = table_open(DatabaseRelationId, RowExclusiveLock);
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index db3a68a..b41a920 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -591,6 +591,8 @@ static void
set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte)
{
+ char relpersistence;
+
/*
* The flag has previously been initialized to false, so we can just
* return if it becomes clear that we can't safely set it.
@@ -618,7 +620,11 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
* the rest of the necessary infrastructure right now anyway. So
* for now, bail out if we see a temporary table.
*/
- if (get_rel_persistence(rte->relid) == RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ relpersistence = get_rel_persistence(rte->relid);
+
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
return;
/*
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 17c5f08..fa6aee5 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6307,7 +6307,9 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
* Furthermore, any index predicate or index expressions must be parallel
* safe.
*/
+ /* global temp table is same as local temp table */
if (heap->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ heap->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ||
!is_parallel_safe(root, (Node *) RelationGetIndexExpressions(index)) ||
!is_parallel_safe(root, (Node *) RelationGetIndexPredicate(index)))
{
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index e5f9e04..ecc4543 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -53,6 +53,7 @@
#include "utils/syscache.h"
#include "utils/snapmgr.h"
+#include "catalog/storage_gtt.h"
/* GUC parameter */
int constraint_exclusion = CONSTRAINT_EXCLUSION_PARTITION;
@@ -947,10 +948,10 @@ void
estimate_rel_size(Relation rel, int32 *attr_widths,
BlockNumber *pages, double *tuples, double *allvisfrac)
{
- BlockNumber curpages;
- BlockNumber relpages;
- double reltuples;
- BlockNumber relallvisible;
+ BlockNumber curpages = 0;
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
double density;
switch (rel->rd_rel->relkind)
@@ -964,6 +965,21 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
case RELKIND_INDEX:
+ /* global temp table get relstats from localhash */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ get_gtt_relstats(RelationGetRelid(rel),
+ &relpages, &reltuples, &relallvisible,
+ NULL, NULL);
+ }
+ else
+ {
+ /* coerce values in pg_class to more desirable types */
+ relpages = (BlockNumber) rel->rd_rel->relpages;
+ reltuples = (double) rel->rd_rel->reltuples;
+ relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
+ }
+
/*
* XXX: It'd probably be good to move this into a callback,
* individual index types e.g. know if they have a metapage.
@@ -972,11 +988,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
/* it has storage, ok to call the smgr */
curpages = RelationGetNumberOfBlocks(rel);
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
-
/* report estimated # pages */
*pages = curpages;
/* quick exit if rel is clearly empty */
@@ -986,10 +997,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
*allvisfrac = 0;
break;
}
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
/*
* Discount the metapage while estimating the number of tuples.
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 85d7a96..67b200d 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -2579,6 +2579,11 @@ transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("materialized views must not use temporary tables or views")));
+ if (is_query_using_gtt(query))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialized views must not use global temporary tables or views")));
+
/*
* A materialized view would either need to save parameters for use in
* maintaining/loading the data or prohibit them entirely. The latter
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 3f67aaf..333e54f 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3268,17 +3268,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMPORARY
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
@@ -11505,19 +11499,13 @@ OptTempTableName:
}
| GLOBAL TEMPORARY opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED opt_table qualified_name
{
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 4dd8150..637a15c 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -59,6 +59,7 @@ static void expandTupleDesc(TupleDesc tupdesc, Alias *eref,
List **colnames, List **colvars);
static int specialAttNum(const char *attname);
static bool isQueryUsingTempRelation_walker(Node *node, void *context);
+static bool is_query_using_gtt_walker(Node *node, void *context);
/*
@@ -3420,3 +3421,49 @@ isQueryUsingTempRelation_walker(Node *node, void *context)
isQueryUsingTempRelation_walker,
context);
}
+
+/* check if the query uses global temp table */
+static bool
+is_query_using_gtt_walker(Node *node, void *context)
+{
+ if (node == NULL)
+ return false;
+
+ if (IsA(node, Query))
+ {
+ Query *query = (Query *) node;
+ ListCell *rtable;
+
+ foreach(rtable, query->rtable)
+ {
+ RangeTblEntry *rte = lfirst(rtable);
+
+ if (rte->rtekind == RTE_RELATION)
+ {
+ Relation rel = relation_open(rte->relid, AccessShareLock);
+ char relpersistence = rel->rd_rel->relpersistence;
+
+ relation_close(rel, AccessShareLock);
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ return true;
+ }
+ }
+
+ return query_tree_walker(query,
+ is_query_using_gtt_walker,
+ context,
+ QTW_IGNORE_JOINALIASES);
+ }
+
+ return expression_tree_walker(node,
+ is_query_using_gtt_walker,
+ context);
+}
+
+/* check if the query uses global temp table */
+bool
+is_query_using_gtt(Query *query)
+{
+ return is_query_using_gtt_walker((Node *) query, NULL);
+}
+
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index ee47547..d13e253 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -359,6 +359,13 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
AlterSeqStmt *altseqstmt;
List *attnamelist;
+ if (cxt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temp table does not yet support serial column")));
+ }
+
/*
* Determine namespace and name to use for the sequence.
*
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index c1dd816..f2d3df9 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2091,6 +2091,11 @@ do_autovacuum(void)
}
continue;
}
+ else if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /* autovacuum skip vacuum global temp table */
+ continue;
+ }
/* Fetch reloptions and the pgstat entry for this table */
relopts = extract_autovac_opts(tuple, pg_class_desc);
@@ -2157,7 +2162,9 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ /* autovacuum skip vacuum global temp table */
+ if (classForm->relpersistence == RELPERSISTENCE_TEMP ||
+ classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7ad1073..8e81701 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -53,6 +53,8 @@
#include "utils/resowner_private.h"
#include "utils/timestamp.h"
+#include "utils/guc.h"
+#include "catalog/storage_gtt.h"
/* Note: these two macros only work on shared buffers, not local ones! */
#define BufHdrGetBlock(bufHdr) ((Block) (BufferBlocks + ((Size) (bufHdr)->buf_id) * BLCKSZ))
@@ -432,7 +434,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence,
ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy,
- bool *hit);
+ bool *hit, Relation rel);
static bool PinBuffer(BufferDesc *buf, BufferAccessStrategy strategy);
static void PinBuffer_Locked(BufferDesc *buf);
static void UnpinBuffer(BufferDesc *buf, bool fixOwner);
@@ -664,7 +666,8 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
*/
pgstat_count_buffer_read(reln);
buf = ReadBuffer_common(reln->rd_smgr, reln->rd_rel->relpersistence,
- forkNum, blockNum, mode, strategy, &hit);
+ forkNum, blockNum, mode, strategy, &hit,
+ reln);
if (hit)
pgstat_count_buffer_hit(reln);
return buf;
@@ -692,7 +695,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
Assert(InRecovery);
return ReadBuffer_common(smgr, RELPERSISTENCE_PERMANENT, forkNum, blockNum,
- mode, strategy, &hit);
+ mode, strategy, &hit, NULL);
}
@@ -704,7 +707,8 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
static Buffer
ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
- BufferAccessStrategy strategy, bool *hit)
+ BufferAccessStrategy strategy, bool *hit,
+ Relation rel)
{
BufferDesc *bufHdr;
Block bufBlock;
@@ -719,6 +723,15 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
isExtend = (blockNum == P_NEW);
+ /* create storage when first read data page for gtt */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP &&
+ (isExtend || blockNum == 0) &&
+ forkNum == MAIN_FORKNUM &&
+ !gtt_storage_attached(smgr->smgr_rnode.node.relNode))
+ {
+ RelationCreateStorage(smgr->smgr_rnode.node, relpersistence, rel);
+ }
+
TRACE_POSTGRESQL_BUFFER_READ_START(forkNum, blockNum,
smgr->smgr_rnode.node.spcNode,
smgr->smgr_rnode.node.dbNode,
@@ -2799,6 +2812,16 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln)
BlockNumber
RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
{
+ /*
+ * When this backend not init gtt storage
+ * return 0
+ */
+ if (RELATION_IS_GLOBAL_TEMP(relation) &&
+ !gtt_storage_attached(relation->rd_node.relNode))
+ {
+ return 0;
+ }
+
switch (relation->rd_rel->relkind)
{
case RELKIND_SEQUENCE:
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index 8853706..b3544dd 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -21,6 +21,7 @@
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/twophase.h"
+#include "catalog/storage_gtt.h"
#include "commands/async.h"
#include "miscadmin.h"
#include "pgstat.h"
@@ -147,6 +148,7 @@ CreateSharedMemoryAndSemaphores(void)
size = add_size(size, BTreeShmemSize());
size = add_size(size, SyncScanShmemSize());
size = add_size(size, AsyncShmemSize());
+ size = add_size(size, active_gtt_shared_hash_size());
#ifdef EXEC_BACKEND
size = add_size(size, ShmemBackendArraySize());
#endif
@@ -217,6 +219,8 @@ CreateSharedMemoryAndSemaphores(void)
SUBTRANSShmemInit();
MultiXactShmemInit();
InitBufferPool();
+ /* global temporary table */
+ active_gtt_shared_hash_init();
/*
* Set up lock manager
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 3da5307..21bd1f2 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -60,6 +60,7 @@
#include "utils/builtins.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
+#include "utils/guc.h"
#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
@@ -3973,3 +3974,77 @@ KnownAssignedXidsReset(void)
LWLockRelease(ProcArrayLock);
}
+
+/*
+ * search all active backend to get oldest frozenxid
+ * for global temp table.
+ */
+int
+list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n)
+{
+ ProcArrayStruct *arrayP = procArray;
+ TransactionId result = InvalidTransactionId;
+ int index;
+ int flags = 0;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ if (max_size > 0)
+ {
+ Assert(pids);
+ Assert(xids);
+ Assert(n);
+ *n = 0;
+ }
+
+ if (max_active_gtt <= 0)
+ return InvalidTransactionId;
+
+ if (RecoveryInProgress())
+ return InvalidTransactionId;
+
+ flags |= PROC_IS_AUTOVACUUM;
+ flags |= PROC_IN_LOGICAL_DECODING;
+
+ LWLockAcquire(ProcArrayLock, LW_SHARED);
+ if (max_size > 0 && max_size < arrayP->numProcs)
+ {
+ LWLockRelease(ProcArrayLock);
+ elog(ERROR, "list_all_gtt_frozenxids require more array");
+ }
+
+ for (index = 0; index < arrayP->numProcs; index++)
+ {
+ int pgprocno = arrayP->pgprocnos[index];
+ volatile PGPROC *proc = &allProcs[pgprocno];
+ volatile PGXACT *pgxact = &allPgXact[pgprocno];
+
+ if (pgxact->vacuumFlags & flags)
+ continue;
+
+ if (proc->databaseId == MyDatabaseId &&
+ TransactionIdIsNormal(proc->session_gtt_frozenxid))
+ {
+ if (result == InvalidTransactionId)
+ result = proc->session_gtt_frozenxid;
+ else if (TransactionIdPrecedes(proc->session_gtt_frozenxid, result))
+ result = proc->session_gtt_frozenxid;
+
+ if (max_size > 0)
+ {
+ pids[i] = proc->pid;
+ xids[i] = proc->session_gtt_frozenxid;
+ i++;
+ }
+ }
+ }
+ LWLockRelease(ProcArrayLock);
+
+ if (max_size > 0)
+ *n = i;
+
+ return result;
+}
+
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index b3c54a6..645456c 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -396,6 +396,7 @@ InitProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
@@ -578,6 +579,7 @@ InitAuxiliaryProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 07f3c93..cee8f9e 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -654,6 +654,12 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
*/
if (zero_damaged_pages || InRecovery)
MemSet(buffer, 0, BLCKSZ);
+ else if(SmgrIsTemp(reln) && blocknum == 0 && forknum == MAIN_FORKNUM)
+ {
+ /* global temp table init btree meta page */
+ MemSet(buffer, 0, BLCKSZ);
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..adce760 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -1008,6 +1008,10 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
Assert(backend != InvalidBackendId);
}
break;
+ /* For global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ backend = BackendIdForTempRelations();
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relform->relpersistence);
backend = InvalidBackendId; /* placate compiler */
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 35a8995..42dc3a5 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -141,6 +141,7 @@
#include "utils/timestamp.h"
#include "utils/typcache.h"
+#include "catalog/storage_gtt.h"
/* Hooks for plugins to get control when we ask for stats */
get_relation_stats_hook_type get_relation_stats_hook = NULL;
@@ -4568,12 +4569,25 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
}
else if (index->indpred == NIL)
{
- vardata->statsTuple =
- SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(index->indexoid),
- Int16GetDatum(pos + 1),
- BoolGetDatum(false));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ Int16GetDatum(pos + 1),
+ false);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ vardata->statsTuple =
+ SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(index->indexoid),
+ Int16GetDatum(pos + 1),
+ BoolGetDatum(false));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -4652,15 +4666,27 @@ examine_simple_variable(PlannerInfo *root, Var *var,
}
else if (rte->rtekind == RTE_RELATION)
{
- /*
- * Plain table or parent of an inheritance appendrel, so look up the
- * column in pg_statistic
- */
- vardata->statsTuple = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(rte->relid),
- Int16GetDatum(var->varattno),
- BoolGetDatum(rte->inh));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(rte->relid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple = get_gtt_att_statistic(rte->relid,
+ var->varattno,
+ rte->inh);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ /*
+ * Plain table or parent of an inheritance appendrel, so look up the
+ * column in pg_statistic
+ */
+ vardata->statsTuple = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(rte->relid),
+ Int16GetDatum(var->varattno),
+ BoolGetDatum(rte->inh));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -5972,6 +5998,7 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
{
/* Simple variable --- look to stats for the underlying table */
RangeTblEntry *rte = planner_rt_fetch(index->rel->relid, root);
+ char rel_persistence = get_rel_persistence(rte->relid);
Assert(rte->rtekind == RTE_RELATION);
relid = rte->relid;
@@ -5989,6 +6016,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ rte->inh);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6000,6 +6034,8 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/* Expression --- maybe there are stats for the index itself */
relid = index->indexoid;
colnum = 1;
@@ -6015,6 +6051,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6881,6 +6924,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
/* attempt to lookup stats in relation for this index column */
if (attnum != 0)
{
+ char rel_persistence = get_rel_persistence(rte->relid);
+
/* Simple variable -- look to stats for the underlying table */
if (get_relation_stats_hook &&
(*get_relation_stats_hook) (root, rte, attnum, &vardata))
@@ -6893,6 +6938,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
elog(ERROR,
"no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(rte->relid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple =
@@ -6905,6 +6958,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/*
* Looks like we've found an expression column in the index. Let's
* see if there's any stats for it.
@@ -6924,6 +6979,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 27602fa..25a411a 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -34,6 +34,7 @@
#include "catalog/pg_statistic.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "utils/array.h"
@@ -46,6 +47,7 @@
#include "utils/syscache.h"
#include "utils/typcache.h"
+
/* Hook for plugins to get control in get_attavgwidth() */
get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
@@ -2878,6 +2880,18 @@ get_attavgwidth(Oid relid, AttrNumber attnum)
if (stawidth > 0)
return stawidth;
}
+ if (get_rel_persistence(relid) == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ tp = get_gtt_att_statistic(relid, attnum, false);
+ if (!HeapTupleIsValid(tp))
+ return 0;
+
+ stawidth = ((Form_pg_statistic) GETSTRUCT(tp))->stawidth;
+ if (stawidth > 0)
+ return stawidth;
+ else
+ return 0;
+ }
tp = SearchSysCache3(STATRELATTINH,
ObjectIdGetDatum(relid),
Int16GetDatum(attnum),
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 585dcee..b8f2a41 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1130,6 +1130,16 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_islocaltemp = false;
}
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ {
+ relation->rd_backend = BackendIdForTempRelations();
+ /*
+ * For global temp table, all backend can use
+ * this relation, so rd_islocaltemp always true.
+ */
+ relation->rd_islocaltemp = true;
+ }
+ break;
default:
elog(ERROR, "invalid relpersistence: %c",
relation->rd_rel->relpersistence);
@@ -3311,6 +3321,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_backend = BackendIdForTempRelations();
rel->rd_islocaltemp = true;
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ rel->rd_backend = BackendIdForTempRelations();
+ rel->rd_islocaltemp = true;
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relpersistence);
break;
@@ -3425,6 +3439,9 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
TransactionId freezeXid = InvalidTransactionId;
RelFileNode newrnode;
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ elog(ERROR, "global temp table does not allow setting new relfilenode");
+
/* Allocate a new relfilenode */
newrelfilenode = GetNewRelFileNode(relation->rd_rel->reltablespace, NULL,
persistence);
@@ -3465,7 +3482,7 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
/* handle these directly, at least for now */
SMgrRelation srel;
- srel = RelationCreateStorage(newrnode, persistence);
+ srel = RelationCreateStorage(newrnode, persistence, relation);
smgrclose(srel);
}
break;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 31a5ef0..518d0fa 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -138,6 +138,18 @@ char *GUC_check_errmsg_string;
char *GUC_check_errdetail_string;
char *GUC_check_errhint_string;
+/*
+ * num = 0 means disable global temp table feature.
+ * global temp table define can still storage in catalog
+ * just can not use.
+ * num > 0 means database can management num active global temp table.
+ */
+#define MIN_NUM_ACTIVE_GTT 0
+#define DEFAULT_NUM_ACTIVE_GTT 1000
+#define MAX_NUM_ACTIVE_GTT 1000000
+
+int max_active_gtt = MIN_NUM_ACTIVE_GTT;
+
static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4);
static void set_config_sourcefile(const char *name, char *sourcefile,
@@ -1962,6 +1974,15 @@ static struct config_bool ConfigureNamesBool[] =
static struct config_int ConfigureNamesInt[] =
{
{
+ {"max_active_global_temporary_table", PGC_POSTMASTER, UNGROUPED,
+ gettext_noop("max active global temporary table."),
+ NULL
+ },
+ &max_active_gtt,
+ DEFAULT_NUM_ACTIVE_GTT, MIN_NUM_ACTIVE_GTT, MAX_NUM_ACTIVE_GTT,
+ NULL, NULL, NULL
+ },
+ {
{"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Forces a switch to the next WAL file if a "
"new file has not been started within N seconds."),
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index bf69adc..72e291b 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15585,6 +15585,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
{
char *ftoptions = NULL;
char *srvname = NULL;
+ char *table_type = NULL;
switch (tbinfo->relkind)
{
@@ -15636,9 +15637,15 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
binary_upgrade_set_pg_class_oids(fout, q,
tbinfo->dobj.catId.oid, false);
+ if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED)
+ table_type = "UNLOGGED ";
+ else if (tbinfo->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ table_type = "GLOBAL TEMPORARY ";
+ else
+ table_type = "";
+
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ table_type,
reltypename,
qualrelname);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..34b4683 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_GLOBAL_TEMP 'g' /* global temporary table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h
index 3579d3f..2bde386 100644
--- a/src/include/catalog/storage.h
+++ b/src/include/catalog/storage.h
@@ -19,7 +19,7 @@
#include "storage/smgr.h"
#include "utils/relcache.h"
-extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
+extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel);
extern void RelationDropStorage(Relation rel);
extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
extern void RelationTruncate(Relation rel, BlockNumber nblocks);
diff --git a/src/include/catalog/storage_gtt.h b/src/include/catalog/storage_gtt.h
new file mode 100644
index 0000000..ea41e66
--- /dev/null
+++ b/src/include/catalog/storage_gtt.h
@@ -0,0 +1,39 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.h
+ * prototypes for functions in backend/catalog/storage_gtt.c
+ *
+ * src/include/catalog/storage_gtt.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef STORAGE_GTT_H
+#define STORAGE_GTT_H
+
+#include "access/htup.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
+
+extern Size active_gtt_shared_hash_size(void);
+extern void active_gtt_shared_hash_init(void);
+extern void remember_gtt_storage_info(RelFileNode rnode, Relation rel);
+extern void forget_gtt_storage_info(Oid relid);
+extern bool is_other_backend_use_gtt(RelFileNode node);
+extern bool gtt_storage_attached(Oid relid);
+extern Bitmapset *copy_active_gtt_bitmap(RelFileNode node);
+extern void up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull);
+extern HeapTuple get_gtt_att_statistic(Oid reloid, int attnum, bool inh);
+extern void release_gtt_statistic_cache(HeapTuple tup);
+extern void up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid);
+extern void get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid);
+
+#endif /* STORAGE_H */
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index f7e0781..4f5a353 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -130,4 +130,7 @@ extern Oid attnumTypeId(Relation rd, int attid);
extern Oid attnumCollationId(Relation rd, int attid);
extern bool isQueryUsingTempRelation(Query *query);
+/* global temp table check */
+extern bool is_query_using_gtt(Query *query);
+
#endif /* PARSE_RELATION_H */
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index f627dfe..cfc6c78 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -220,6 +220,7 @@ typedef enum BuiltinTrancheIds
LWTRANCHE_TBM,
LWTRANCHE_PARALLEL_APPEND,
LWTRANCHE_SXACT,
+ LWTRANCHE_GTT_CTL,
LWTRANCHE_FIRST_USER_DEFINED
} BuiltinTrancheIds;
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 281e1db..2ab8e91 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -117,6 +117,8 @@ struct PGPROC
Oid tempNamespaceId; /* OID of temp schema this backend is
* using */
+ TransactionId session_gtt_frozenxid; /* session level global temp table relfrozenxid */
+
bool isBackgroundWorker; /* true if background worker. */
/*
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h
index da8b672..8e7d4c7 100644
--- a/src/include/storage/procarray.h
+++ b/src/include/storage/procarray.h
@@ -124,4 +124,6 @@ extern void ProcArraySetReplicationSlotXmin(TransactionId xmin,
extern void ProcArrayGetReplicationSlotXmin(TransactionId *xmin,
TransactionId *catalog_xmin);
+extern int list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n);
+
#endif /* PROCARRAY_H */
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index 6791e0c..82b672f 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -276,6 +276,10 @@ extern int tcp_user_timeout;
extern bool trace_sort;
#endif
+/* global temporary table */
+extern int max_active_gtt;
+/* end */
+
/*
* Functions exported by guc.c
*/
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 8b8b237..c1962b7 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -272,6 +272,7 @@ typedef struct StdRdOptions
int parallel_workers; /* max number of parallel workers */
bool vacuum_index_cleanup; /* enables index vacuuming and cleanup */
bool vacuum_truncate; /* enables vacuum to truncate a relation */
+ bool on_commit_delete_rows; /* global temp table */
} StdRdOptions;
#define HEAP_MIN_FILLFACTOR 10
@@ -530,7 +531,8 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP || \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
/*
* RELATION_IS_LOCAL
@@ -609,6 +611,17 @@ typedef struct ViewOptions
*/
#define RelationGetPartitionDesc(relation) ((relation)->rd_partdesc)
+/* global temp table implementations */
+#define RELATION_IS_GLOBAL_TEMP(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+
+#define RELATION_GTT_ON_COMMIT_DELETE(relation) \
+ ((relation)->rd_options && \
+ (relation)->rd_rel->relkind == RELKIND_RELATION && \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ? \
+ ((StdRdOptions *) (relation)->rd_options)->on_commit_delete_rows : false)
+
+#define RelationGetRelPersistence(relation) ((relation)->rd_rel->relpersistence)
+
/* routines in utils/cache/relcache.c */
extern void RelationIncrementReferenceCount(Relation rel);
extern void RelationDecrementReferenceCount(Relation rel);
diff --git a/src/test/regress/expected/gtt_clean.out b/src/test/regress/expected/gtt_clean.out
new file mode 100644
index 0000000..50ca9ac
--- /dev/null
+++ b/src/test/regress/expected/gtt_clean.out
@@ -0,0 +1,7 @@
+reset search_path;
+drop schema gtt cascade;
+NOTICE: drop cascades to 4 other objects
+DETAIL: drop cascades to table gtt.gtt1
+drop cascades to table gtt.gtt2
+drop cascades to table gtt.gtt3
+drop cascades to table gtt.gtt_t_kenyon
diff --git a/src/test/regress/expected/gtt_error.out b/src/test/regress/expected/gtt_error.out
new file mode 100644
index 0000000..80c16dc
--- /dev/null
+++ b/src/test/regress/expected/gtt_error.out
@@ -0,0 +1,106 @@
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+set search_path=gtt_error,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+ERROR: cannot create indexes on global temporary tables using concurrent mode
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+ERROR: not support cluster global temporary tables yet
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+ERROR: ON COMMIT can only be used on temporary tables
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+ERROR: regular table cannot specifie on_commit_delete_rows
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+ERROR: not support create global temporary partition table yet
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+ERROR: not support create global temporary inheritance table yet
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+ERROR: global temp table not support on commit drop clause
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+ERROR: can not defeine global temp table with on commit and with clause at same time
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+--ERROR
+alter table gtt1 rename to gttx;
+ERROR: not support rename global temporary tables yet
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: referenced relation "products" is not a global temp table
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+ERROR: Global temp table does not yet support serial column
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+ERROR: Global temp table does not yet support serial column
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+ERROR: materialized views must not use global temporary tables or views
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+ERROR: only support btree index on global temp table
+create index idx_err on gtt1 using gist (a);
+ERROR: data type integer has no default operator class for access method "gist"
+HINT: You must specify an operator class for the index or define a default operator class for the data type.
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+ERROR: only support btree index on global temp table
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+ERROR: only support btree index on global temp table
+reset search_path;
+drop schema gtt_error cascade;
+NOTICE: drop cascades to 8 other objects
+DETAIL: drop cascades to table gtt_error.gtt1
+drop cascades to table gtt_error.gtt2
+drop cascades to table gtt_error.gtt3
+drop cascades to table gtt_error.tmp_t0
+drop cascades to table gtt_error.tbl_inherits_parent
+drop cascades to table gtt_error.tbl_inherits_parent_global_temp
+drop cascades to table gtt_error.products
+drop cascades to table gtt_error.gtt5
diff --git a/src/test/regress/expected/gtt_parallel_1.out b/src/test/regress/expected/gtt_parallel_1.out
new file mode 100644
index 0000000..30d8a7b
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_1.out
@@ -0,0 +1,84 @@
+set search_path=gtt,sys;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_parallel_2.out b/src/test/regress/expected/gtt_parallel_2.out
new file mode 100644
index 0000000..70bf4a6
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_2.out
@@ -0,0 +1,142 @@
+set search_path=gtt,sys;
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+ 3 | test1
+(3 rows)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test2
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 3 | test3
+(1 row)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 5 | test5
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 6 | test6
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+ count
+--------
+ 100000
+(1 row)
+
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+ QUERY PLAN
+------------------------------------
+ Index Scan using gtt3_pkey on gtt3
+ Index Cond: (a = 300)
+(2 rows)
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+ relname | pg_relation_size | pg_relation_size
+--------------+------------------+------------------
+ gtt_t_kenyon | 450560 | 16384
+(1 row)
+
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+ relname
+--------------
+ gtt_t_kenyon
+(1 row)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_prepare.out b/src/test/regress/expected/gtt_prepare.out
new file mode 100644
index 0000000..9e8f5f0
--- /dev/null
+++ b/src/test/regress/expected/gtt_prepare.out
@@ -0,0 +1,7 @@
+CREATE SCHEMA IF NOT EXISTS gtt;
+set search_path=gtt,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+reset search_path;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index fc0f141..6836eeb 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -121,3 +121,9 @@ test: fast_default
# run stats by itself because its delay may be insufficient under heavy load
test: stats
+
+# global temp table test
+test: gtt_error
+test: gtt_prepare
+test: gtt_parallel_1 gtt_parallel_2
+test: gtt_clean
diff --git a/src/test/regress/sql/gtt_error.sql b/src/test/regress/sql/gtt_error.sql
new file mode 100644
index 0000000..e895574
--- /dev/null
+++ b/src/test/regress/sql/gtt_error.sql
@@ -0,0 +1,106 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+
+set search_path=gtt_error,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+
+--ERROR
+alter table gtt1 rename to gttx;
+
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+create index idx_err on gtt1 using gist (a);
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+
+reset search_path;
+
+drop schema gtt_error cascade;
+
diff --git a/src/test/regress/sql/gtt_parallel_1.sql b/src/test/regress/sql/gtt_parallel_1.sql
new file mode 100644
index 0000000..d7d81de
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_1.sql
@@ -0,0 +1,42 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+commit;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+rollback;
+select * from gtt1 order by a;
+
+truncate gtt1;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+select * from gtt1 order by a;
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+
+begin;
+select * from gtt1 order by a;
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_parallel_2.sql b/src/test/regress/sql/gtt_parallel_2.sql
new file mode 100644
index 0000000..cb2f7a6
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_2.sql
@@ -0,0 +1,62 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+commit;
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+truncate gtt3;
+select * from gtt3 order by a;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+truncate gtt3;
+select * from gtt3 order by a;
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+begin;
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_prepare.sql b/src/test/regress/sql/gtt_prepare.sql
new file mode 100644
index 0000000..042d9e6
--- /dev/null
+++ b/src/test/regress/sql/gtt_prepare.sql
@@ -0,0 +1,15 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt;
+
+set search_path=gtt,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+
+reset search_path;
+
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-07 09:30 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 09:40 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-07 11:49 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 16:32 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
0 siblings, 3 replies; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-07 09:30 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年11月7日 上午12:08,Konstantin Knizhnik <[email protected]> 写道:
>
>
>
> On 06.11.2019 16:24, 曾文旌(义从) wrote:
>> Dear Hackers
>>
>>
>> I attached the patch of GTT implementationI base on PG12.
>> The GTT design came from my first email.
>> Some limitations in patch will be eliminated in later versions.
>>
>> Later, I will comment on Konstantin's patch and make some proposals for cooperation.
>> Looking forward to your feedback.
>>
>> Thanks.
>>
>> Zeng Wenjing
>>
>
> Thank you for this patch.
> My first comments:
>
> 1. I have ported you patch to the latest Postgres version (my patch is attached).
> 2. You patch is supporting only B-Tree index for GTT. All other indexes (hash, gin, gist, brin,...) are not currently supported.
Currently I only support btree index.
I noticed that your patch supports more index types, which is where I'd like to work with you.
> 3. I do not understand the reason for the following limitation:
> "We allow to create index on global temp table only this session use it"
>
> First of all it seems to significantly reduce usage of global temp tables.
> Why do we need GTT at all? Mostly because we need to access temporary data in more than one backend. Otherwise we can just use normal table.
> If temp table is expected to be larger enough, so that we need to create index for it, then it is hard to believe that it will be needed only in one backend.
>
> May be the assumption is that all indexes has to be created before GTT start to be used.
Yes, Currently, GTT's index is only supported and created in an empty table state, and other sessions are not using it.
There has two improvements pointer:
1 Index can create on GTT(A) when the GTT(A) in the current session is not empty, requiring the GTT table to be empty in the other session.
Index_build needs to be done in the current session just like a normal table. This improvement is relatively easy.
2 Index can create on GTT(A) when more than one session are using this GTT(A).
Because when I'm done creating an index of the GTT in this session and setting it to be an valid index, it's not true for the GTT in other sessions.
Indexes on gtt in other sessions require "rebuild_index" before using it.
I don't have a better solution right now, maybe you have some suggestions.
> But right now this check is not working correctly in any case - if you insert some data into the table, then
> you can not create index any more:
>
> postgres=# create global temp table gtt(x integer primary key, y integer);
> CREATE TABLE
> postgres=# insert into gtt values (generate_series(1,100000), generate_series(1,100000));
> INSERT 0 100000
> postgres=# create index on gtt(y);
> ERROR: can not create index when have one or more backend attached this global temp table
>
> I wonder why do you need such restriction?
>
>
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
> <global_temporary_table_v1-pg13.patch>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-07 09:40 ` Pavel Stehule <[email protected]>
2019-11-07 12:17 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 1 reply; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-07 09:40 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
čt 7. 11. 2019 v 10:30 odesílatel 曾文旌(义从) <[email protected]>
napsal:
>
>
> > 2019年11月7日 上午12:08,Konstantin Knizhnik <[email protected]> 写道:
> >
> >
> >
> > On 06.11.2019 16:24, 曾文旌(义从) wrote:
> >> Dear Hackers
> >>
> >>
> >> I attached the patch of GTT implementationI base on PG12.
> >> The GTT design came from my first email.
> >> Some limitations in patch will be eliminated in later versions.
> >>
> >> Later, I will comment on Konstantin's patch and make some proposals for
> cooperation.
> >> Looking forward to your feedback.
> >>
> >> Thanks.
> >>
> >> Zeng Wenjing
> >>
> >
> > Thank you for this patch.
> > My first comments:
> >
> > 1. I have ported you patch to the latest Postgres version (my patch is
> attached).
> > 2. You patch is supporting only B-Tree index for GTT. All other indexes
> (hash, gin, gist, brin,...) are not currently supported.
> Currently I only support btree index.
> I noticed that your patch supports more index types, which is where I'd
> like to work with you.
>
> > 3. I do not understand the reason for the following limitation:
> > "We allow to create index on global temp table only this session use it"
> >
> > First of all it seems to significantly reduce usage of global temp
> tables.
> > Why do we need GTT at all? Mostly because we need to access temporary
> data in more than one backend. Otherwise we can just use normal table.
> > If temp table is expected to be larger enough, so that we need to create
> index for it, then it is hard to believe that it will be needed only in one
> backend.
> >
> > May be the assumption is that all indexes has to be created before GTT
> start to be used.
> Yes, Currently, GTT's index is only supported and created in an empty
> table state, and other sessions are not using it.
> There has two improvements pointer:
> 1 Index can create on GTT(A) when the GTT(A) in the current session is
> not empty, requiring the GTT table to be empty in the other session.
> Index_build needs to be done in the current session just like a normal
> table. This improvement is relatively easy.
>
> 2 Index can create on GTT(A) when more than one session are using this
> GTT(A).
> Because when I'm done creating an index of the GTT in this session and
> setting it to be an valid index, it's not true for the GTT in other
> sessions.
> Indexes on gtt in other sessions require "rebuild_index" before using it.
> I don't have a better solution right now, maybe you have some suggestions.
>
I think so DDL operations can be implemented in some reduced form - so DDL
are active only for one session, and for other sessions are invisible.
Important is state of GTT object on session start.
For example ALTER TABLE DROP COLUMN can has very fatal impact on other
sessions. So I think the best of GTT can be pattern - the structure of GTT
table is immutable for any session that doesn't do DDL operations.
>
> > But right now this check is not working correctly in any case - if you
> insert some data into the table, then
> > you can not create index any more:
> >
> > postgres=# create global temp table gtt(x integer primary key, y
> integer);
> > CREATE TABLE
> > postgres=# insert into gtt values (generate_series(1,100000),
> generate_series(1,100000));
> > INSERT 0 100000
> > postgres=# create index on gtt(y);
> > ERROR: can not create index when have one or more backend attached this
> global temp table
> >
> > I wonder why do you need such restriction?
> >
> >
> > --
> > Konstantin Knizhnik
> > Postgres Professional: http://www.postgrespro.com
> > The Russian Postgres Company
> >
> > <global_temporary_table_v1-pg13.patch>
>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 09:40 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-07 12:17 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 12:29 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-07 12:17 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年11月7日 下午5:40,Pavel Stehule <[email protected]> 写道:
>
>
>
> čt 7. 11. 2019 v 10:30 odesílatel 曾文旌(义从) <[email protected] <mailto:[email protected]>> napsal:
>
>
> > 2019年11月7日 上午12:08,Konstantin Knizhnik <[email protected] <mailto:[email protected]>> 写道:
> >
> >
> >
> > On 06.11.2019 16:24, 曾文旌(义从) wrote:
> >> Dear Hackers
> >>
> >>
> >> I attached the patch of GTT implementationI base on PG12.
> >> The GTT design came from my first email.
> >> Some limitations in patch will be eliminated in later versions.
> >>
> >> Later, I will comment on Konstantin's patch and make some proposals for cooperation.
> >> Looking forward to your feedback.
> >>
> >> Thanks.
> >>
> >> Zeng Wenjing
> >>
> >
> > Thank you for this patch.
> > My first comments:
> >
> > 1. I have ported you patch to the latest Postgres version (my patch is attached).
> > 2. You patch is supporting only B-Tree index for GTT. All other indexes (hash, gin, gist, brin,...) are not currently supported.
> Currently I only support btree index.
> I noticed that your patch supports more index types, which is where I'd like to work with you.
>
> > 3. I do not understand the reason for the following limitation:
> > "We allow to create index on global temp table only this session use it"
> >
> > First of all it seems to significantly reduce usage of global temp tables.
> > Why do we need GTT at all? Mostly because we need to access temporary data in more than one backend. Otherwise we can just use normal table.
> > If temp table is expected to be larger enough, so that we need to create index for it, then it is hard to believe that it will be needed only in one backend.
> >
> > May be the assumption is that all indexes has to be created before GTT start to be used.
> Yes, Currently, GTT's index is only supported and created in an empty table state, and other sessions are not using it.
> There has two improvements pointer:
> 1 Index can create on GTT(A) when the GTT(A) in the current session is not empty, requiring the GTT table to be empty in the other session.
> Index_build needs to be done in the current session just like a normal table. This improvement is relatively easy.
>
> 2 Index can create on GTT(A) when more than one session are using this GTT(A).
> Because when I'm done creating an index of the GTT in this session and setting it to be an valid index, it's not true for the GTT in other sessions.
> Indexes on gtt in other sessions require "rebuild_index" before using it.
> I don't have a better solution right now, maybe you have some suggestions.
>
> I think so DDL operations can be implemented in some reduced form - so DDL are active only for one session, and for other sessions are invisible. Important is state of GTT object on session start.
>
> For example ALTER TABLE DROP COLUMN can has very fatal impact on other sessions. So I think the best of GTT can be pattern - the structure of GTT table is immutable for any session that doesn't do DDL operations.
Yes, Those ddl that need to rewrite data files will have this problem.
This is why I disabled alter GTT in the current version.
It can be improved, such as Alter GTT can also be allowed when only the current session is in use.
Users can also choose to kick off other sessions that are using gtt, then do alter GTT.
I provide a function(pg_gtt_attached_pid(relation, schema)) to query which session a GTT is being used by.
>
>
>
> > But right now this check is not working correctly in any case - if you insert some data into the table, then
> > you can not create index any more:
> >
> > postgres=# create global temp table gtt(x integer primary key, y integer);
> > CREATE TABLE
> > postgres=# insert into gtt values (generate_series(1,100000), generate_series(1,100000));
> > INSERT 0 100000
> > postgres=# create index on gtt(y);
> > ERROR: can not create index when have one or more backend attached this global temp table
> >
> > I wonder why do you need such restriction?
> >
> >
> > --
> > Konstantin Knizhnik
> > Postgres Professional: http://www.postgrespro.com <http://www.postgrespro.com/;
> > The Russian Postgres Company
> >
> > <global_temporary_table_v1-pg13.patch>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 09:40 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-07 12:17 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-07 12:29 ` Pavel Stehule <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-07 12:29 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
čt 7. 11. 2019 v 13:17 odesílatel 曾文旌(义从) <[email protected]>
napsal:
>
>
> 2019年11月7日 下午5:40,Pavel Stehule <[email protected]> 写道:
>
>
>
> čt 7. 11. 2019 v 10:30 odesílatel 曾文旌(义从) <[email protected]>
> napsal:
>
>>
>>
>> > 2019年11月7日 上午12:08,Konstantin Knizhnik <[email protected]> 写道:
>> >
>> >
>> >
>> > On 06.11.2019 16:24, 曾文旌(义从) wrote:
>> >> Dear Hackers
>> >>
>> >>
>> >> I attached the patch of GTT implementationI base on PG12.
>> >> The GTT design came from my first email.
>> >> Some limitations in patch will be eliminated in later versions.
>> >>
>> >> Later, I will comment on Konstantin's patch and make some proposals
>> for cooperation.
>> >> Looking forward to your feedback.
>> >>
>> >> Thanks.
>> >>
>> >> Zeng Wenjing
>> >>
>> >
>> > Thank you for this patch.
>> > My first comments:
>> >
>> > 1. I have ported you patch to the latest Postgres version (my patch is
>> attached).
>> > 2. You patch is supporting only B-Tree index for GTT. All other indexes
>> (hash, gin, gist, brin,...) are not currently supported.
>> Currently I only support btree index.
>> I noticed that your patch supports more index types, which is where I'd
>> like to work with you.
>>
>> > 3. I do not understand the reason for the following limitation:
>> > "We allow to create index on global temp table only this session use it"
>> >
>> > First of all it seems to significantly reduce usage of global temp
>> tables.
>> > Why do we need GTT at all? Mostly because we need to access temporary
>> data in more than one backend. Otherwise we can just use normal table.
>> > If temp table is expected to be larger enough, so that we need to
>> create index for it, then it is hard to believe that it will be needed only
>> in one backend.
>> >
>> > May be the assumption is that all indexes has to be created before GTT
>> start to be used.
>> Yes, Currently, GTT's index is only supported and created in an empty
>> table state, and other sessions are not using it.
>> There has two improvements pointer:
>> 1 Index can create on GTT(A) when the GTT(A) in the current session is
>> not empty, requiring the GTT table to be empty in the other session.
>> Index_build needs to be done in the current session just like a normal
>> table. This improvement is relatively easy.
>>
>> 2 Index can create on GTT(A) when more than one session are using this
>> GTT(A).
>> Because when I'm done creating an index of the GTT in this session and
>> setting it to be an valid index, it's not true for the GTT in other
>> sessions.
>> Indexes on gtt in other sessions require "rebuild_index" before using it.
>> I don't have a better solution right now, maybe you have some suggestions.
>>
>
> I think so DDL operations can be implemented in some reduced form - so DDL
> are active only for one session, and for other sessions are invisible.
> Important is state of GTT object on session start.
>
> For example ALTER TABLE DROP COLUMN can has very fatal impact on other
> sessions. So I think the best of GTT can be pattern - the structure of GTT
> table is immutable for any session that doesn't do DDL operations.
>
> Yes, Those ddl that need to rewrite data files will have this problem.
> This is why I disabled alter GTT in the current version.
> It can be improved, such as Alter GTT can also be allowed when only the
> current session is in use.
>
I think so it is acceptable solution for some first steps, but I cannot to
imagine so this behave can be good for production usage. But can be good
enough for some time.
Regards
Pavel
Users can also choose to kick off other sessions that are using gtt, then
> do alter GTT.
> I provide a function(pg_gtt_attached_pid(relation, schema)) to query which
> session a GTT is being used by.
>
>
>
>>
>> > But right now this check is not working correctly in any case - if you
>> insert some data into the table, then
>> > you can not create index any more:
>> >
>> > postgres=# create global temp table gtt(x integer primary key, y
>> integer);
>> > CREATE TABLE
>> > postgres=# insert into gtt values (generate_series(1,100000),
>> generate_series(1,100000));
>> > INSERT 0 100000
>> > postgres=# create index on gtt(y);
>> > ERROR: can not create index when have one or more backend attached
>> this global temp table
>> >
>> > I wonder why do you need such restriction?
>> >
>> >
>> > --
>> > Konstantin Knizhnik
>> > Postgres Professional: http://www.postgrespro.com
>> > The Russian Postgres Company
>> >
>> > <global_temporary_table_v1-pg13.patch>
>>
>>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-07 11:49 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 0 replies; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-07 11:49 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年11月7日 下午5:30,曾文旌(义从) <[email protected]> 写道:
>
>
>
>> 2019年11月7日 上午12:08,Konstantin Knizhnik <[email protected] <mailto:[email protected]>> 写道:
>>
>>
>>
>> On 06.11.2019 16:24, 曾文旌(义从) wrote:
>>> Dear Hackers
>>>
>>>
>>> I attached the patch of GTT implementationI base on PG12.
>>> The GTT design came from my first email.
>>> Some limitations in patch will be eliminated in later versions.
>>>
>>> Later, I will comment on Konstantin's patch and make some proposals for cooperation.
>>> Looking forward to your feedback.
>>>
>>> Thanks.
>>>
>>> Zeng Wenjing
>>>
>>
>> Thank you for this patch.
>> My first comments:
>>
>> 1. I have ported you patch to the latest Postgres version (my patch is attached).
>> 2. You patch is supporting only B-Tree index for GTT. All other indexes (hash, gin, gist, brin,...) are not currently supported.
> Currently I only support btree index.
> I noticed that your patch supports more index types, which is where I'd like to work with you.
>
>> 3. I do not understand the reason for the following limitation:
>> "We allow to create index on global temp table only this session use it"
>>
>> First of all it seems to significantly reduce usage of global temp tables.
>> Why do we need GTT at all? Mostly because we need to access temporary data in more than one backend. Otherwise we can just use normal table.
>> If temp table is expected to be larger enough, so that we need to create index for it, then it is hard to believe that it will be needed only in one backend.
>>
>> May be the assumption is that all indexes has to be created before GTT start to be used.
> Yes, Currently, GTT's index is only supported and created in an empty table state, and other sessions are not using it.
> There has two improvements pointer:
> 1 Index can create on GTT(A) when the GTT(A) in the current session is not empty, requiring the GTT table to be empty in the other session.
> Index_build needs to be done in the current session just like a normal table. This improvement is relatively easy.
This part of the improvement has been completed.
New patch is attached.
>
> 2 Index can create on GTT(A) when more than one session are using this GTT(A).
> Because when I'm done creating an index of the GTT in this session and setting it to be an valid index, it's not true for the GTT in other sessions.
> Indexes on gtt in other sessions require "rebuild_index" before using it.
> I don't have a better solution right now, maybe you have some suggestions.
>
>
>> But right now this check is not working correctly in any case - if you insert some data into the table, then
>> you can not create index any more:
>>
>> postgres=# create global temp table gtt(x integer primary key, y integer);
>> CREATE TABLE
>> postgres=# insert into gtt values (generate_series(1,100000), generate_series(1,100000));
>> INSERT 0 100000
>> postgres=# create index on gtt(y);
>> ERROR: can not create index when have one or more backend attached this global temp table
>>
Index can create on GTT(A) when the GTT(A) in the current session is not empty now.
But still requiring the GTT table to be empty in the other session.
>> I wonder why do you need such restriction?
>>
>>
>> --
>> Konstantin Knizhnik
>> Postgres Professional: http://www.postgrespro.com
>> The Russian Postgres Company
>>
>> <global_temporary_table_v1-pg13.patch>
Zeng Wenjing
Attachments:
[application/octet-stream] global_temporary_table_v2.patch (136.5K, ../../[email protected]/3-global_temporary_table_v2.patch)
download | inline diff:
From 94c807315d12a8c30a1654947d289775a6b7682b Mon Sep 17 00:00:00 2001
From: wenjing.zwj <[email protected]>
Date: Tue, 25 Jun 2019 17:44:26 +0800
Subject: [PATCH] support global temp table
---
contrib/Makefile | 3 ++-
contrib/pg_gtt/Makefile | 22 ++++++++++++++++++++++
contrib/pg_gtt/pg_gtt--1.0.sql | 28 ++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.control | 4 ++++
src/backend/access/common/reloptions.c | 17 +++++++++++++++++
src/backend/access/gist/gistutil.c | 4 +++-
src/backend/access/hash/hash.c | 4 +++-
src/backend/access/heap/heapam_handler.c | 4 ++--
src/backend/access/heap/vacuumlazy.c | 22 ++++++++++++++++++----
src/backend/access/nbtree/nbtpage.c | 9 ++++++++-
src/backend/access/transam/xlog.c | 4 ++++
src/backend/catalog/Makefile | 2 ++
src/backend/catalog/catalog.c | 2 ++
src/backend/catalog/heap.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
src/backend/catalog/index.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
src/backend/catalog/namespace.c | 7 +++++++
src/backend/catalog/storage.c | 17 ++++++++++++++++-
src/backend/catalog/storage_gtt.c | 814 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/commands/analyze.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
src/backend/commands/cluster.c | 6 ++++++
src/backend/commands/indexcmds.c | 10 ++++++++++
src/backend/commands/lockcmds.c | 3 ++-
src/backend/commands/tablecmds.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
src/backend/commands/vacuum.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
src/backend/optimizer/path/allpaths.c | 8 +++++++-
src/backend/optimizer/plan/planner.c | 2 ++
src/backend/optimizer/util/plancat.c | 33 ++++++++++++++++++++-------------
src/backend/parser/analyze.c | 5 +++++
src/backend/parser/gram.y | 20 ++++----------------
src/backend/parser/parse_relation.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/backend/parser/parse_utilcmd.c | 7 +++++++
src/backend/postmaster/autovacuum.c | 9 ++++++++-
src/backend/storage/buffer/bufmgr.c | 31 +++++++++++++++++++++++++++----
src/backend/storage/ipc/ipci.c | 4 ++++
src/backend/storage/ipc/procarray.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/storage/lmgr/proc.c | 2 ++
src/backend/storage/smgr/md.c | 6 ++++++
src/backend/utils/adt/dbsize.c | 4 ++++
src/backend/utils/adt/selfuncs.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
src/backend/utils/cache/lsyscache.c | 14 ++++++++++++++
src/backend/utils/cache/relcache.c | 19 ++++++++++++++++++-
src/backend/utils/misc/guc.c | 21 +++++++++++++++++++++
src/bin/pg_dump/pg_dump.c | 11 +++++++++--
src/include/catalog/pg_class.h | 1 +
src/include/catalog/storage.h | 2 +-
src/include/catalog/storage_gtt.h | 39 +++++++++++++++++++++++++++++++++++++++
src/include/parser/parse_relation.h | 3 +++
src/include/storage/lwlock.h | 1 +
src/include/storage/proc.h | 2 ++
src/include/storage/procarray.h | 2 ++
src/include/utils/guc.h | 4 ++++
src/include/utils/rel.h | 15 ++++++++++++++-
src/test/regress/expected/gtt_clean.out | 7 +++++++
src/test/regress/expected/gtt_error.out | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_1.out | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_2.out | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_prepare.out | 7 +++++++
src/test/regress/parallel_schedule | 6 ++++++
src/test/regress/sql/gtt_clean.sql | 6 ++++++
src/test/regress/sql/gtt_error.sql | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_1.sql | 42 ++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_2.sql | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_prepare.sql | 15 +++++++++++++++
64 files changed, 2848 insertions(+), 170 deletions(-)
create mode 100644 contrib/pg_gtt/Makefile
create mode 100644 contrib/pg_gtt/pg_gtt--1.0.sql
create mode 100644 contrib/pg_gtt/pg_gtt.c
create mode 100644 contrib/pg_gtt/pg_gtt.control
create mode 100644 src/backend/catalog/storage_gtt.c
create mode 100644 src/include/catalog/storage_gtt.h
create mode 100644 src/test/regress/expected/gtt_clean.out
create mode 100644 src/test/regress/expected/gtt_error.out
create mode 100644 src/test/regress/expected/gtt_parallel_1.out
create mode 100644 src/test/regress/expected/gtt_parallel_2.out
create mode 100644 src/test/regress/expected/gtt_prepare.out
create mode 100644 src/test/regress/sql/gtt_clean.sql
create mode 100644 src/test/regress/sql/gtt_error.sql
create mode 100644 src/test/regress/sql/gtt_parallel_1.sql
create mode 100644 src/test/regress/sql/gtt_parallel_2.sql
create mode 100644 src/test/regress/sql/gtt_prepare.sql
diff --git a/contrib/Makefile b/contrib/Makefile
index 92184ed..4b1a596 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -48,7 +48,8 @@ SUBDIRS = \
tsm_system_rows \
tsm_system_time \
unaccent \
- vacuumlo
+ vacuumlo \
+ pg_gtt
ifeq ($(with_openssl),yes)
SUBDIRS += sslinfo
diff --git a/contrib/pg_gtt/Makefile b/contrib/pg_gtt/Makefile
new file mode 100644
index 0000000..1d2ef64
--- /dev/null
+++ b/contrib/pg_gtt/Makefile
@@ -0,0 +1,22 @@
+# contrib/pg_gtt/Makefile
+
+MODULE_big = pg_gtt
+OBJS = pg_gtt.o
+
+EXTENSION = pg_gtt
+DATA = pg_gtt--1.0.sql
+
+LDFLAGS_SL += $(filter -lm, $(LIBS))
+
+NO_INSTALLCHECK = 1
+
+ifdef USE_PGXS
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
+else
+subdir = contrib/pg_pfs
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/contrib/pg_gtt/pg_gtt--1.0.sql b/contrib/pg_gtt/pg_gtt--1.0.sql
new file mode 100644
index 0000000..3f794d7
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt--1.0.sql
@@ -0,0 +1,28 @@
+/* contrib/pg_gtt/pg_gtt--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION pg_gtt" to load this file. \quit
+
+
+CREATE FUNCTION pg_gtt_att_statistic(text, text, int)
+RETURNS setof pg_statistic
+AS 'MODULE_PATHNAME','pg_gtt_att_statistic'
+LANGUAGE C STRICT;
+
+CREATE TYPE relstats_type AS (relpages int4, reltuples float4, relallvisible int4, relfrozenxid xid, relminmxid xid);
+CREATE TYPE rel_vac_type AS (pid int4, relfrozenxid xid, relminmxid xid);
+
+CREATE FUNCTION pg_gtt_relstats(text, text)
+RETURNS relstats_type
+AS 'MODULE_PATHNAME','pg_gtt_relstats'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_gtt_attached_pid(text, text)
+RETURNS setof int4
+AS 'MODULE_PATHNAME','pg_gtt_attached_pid'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_list_gtt_relfrozenxids()
+RETURNS setof rel_vac_type
+AS 'MODULE_PATHNAME','pg_list_gtt_relfrozenxids'
+LANGUAGE C STRICT;
diff --git a/contrib/pg_gtt/pg_gtt.c b/contrib/pg_gtt/pg_gtt.c
new file mode 100644
index 0000000..19e1ec0
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.c
@@ -0,0 +1,474 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_gtt.c
+ * code to management function for global temparary table
+ *
+ * IDENTIFICATION
+ * contrib/pg_gtt/pg_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres.h"
+
+#include <unistd.h>
+#include <sys/time.h>
+#include "port.h"
+#include "access/htup_details.h"
+#include "access/table.h"
+#include "access/xlog.h"
+#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/namespace.h"
+#include "catalog/pg_class.h"
+#include "funcapi.h"
+#include "storage/ipc.h"
+#include "storage/shmem.h"
+#include "storage/lwlock.h"
+#include "storage/procarray.h"
+#include "storage/proc.h"
+#include "tcop/utility.h"
+#include "utils/builtins.h"
+#include "utils/memutils.h"
+#include "utils/timeout.h"
+#include "utils/guc.h"
+#include "utils/lsyscache.h"
+#include "utils/rel.h"
+#include <nodes/makefuncs.h>
+#include "storage/sinvaladt.h"
+#include "miscadmin.h"
+
+PG_MODULE_MAGIC;
+
+static Oid pg_get_relid(const char *relname, char *schema);
+
+Datum pg_gtt_att_statistic(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_att_statistic);
+
+Datum pg_gtt_relstats(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_relstats);
+
+Datum pg_gtt_attached_pid(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_attached_pid);
+
+Datum pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_list_gtt_relfrozenxids);
+
+void _PG_init(void);
+void _PG_fini(void);
+
+void
+_PG_init(void)
+{
+ return;
+}
+
+void
+_PG_fini(void)
+{
+ return;
+}
+
+static Oid
+pg_get_relid(const char *relname, char *schema)
+{
+ Oid relid;
+ RangeVar *rv = makeRangeVar(schema, (char *)relname, -1);
+
+ relid = RangeVarGetRelid(rv, NoLock, true);
+
+ pfree(rv);
+ return relid;
+}
+
+Datum
+pg_gtt_att_statistic(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Relation rel = NULL;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ int attnum = PG_GETARG_INT32(2);
+ Oid reloid;
+ char rel_persistence;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(31);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starelid",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "staattnum",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "stainherit",
+ BOOLOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "stanullfrac",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "stawidth",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 6, "stadistinct",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 7, "stakind1",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 8, "stakind2",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 9, "stakind3",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 10, "stakind4",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 11, "stakind5",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 12, "staop1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 13, "staop2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 14, "staop3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 15, "staop4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 16, "staop5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 17, "stacoll1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 18, "stacoll2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 19, "stacoll3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 20, "stacoll4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 21, "stacoll5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 22, "stanumbers1",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 23, "stanumbers2",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 24, "stanumbers3",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 25, "stanumbers4",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 26, "stanumbers5",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 27, "stavalues1",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 28, "stavalues2",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 29, "stavalues3",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 30, "stavalues4",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 31, "stavalues5",
+ ANYARRAYOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ tuple = get_gtt_att_statistic(reloid, attnum, false);
+ if (tuple)
+ {
+ HeapTuple tp = heap_copytuple(tuple);
+ tuplestore_puttuple(tupstore, tp);
+ }
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_relstats(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[5];
+ bool isnull[5];
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
+ uint32 relfrozenxid = 0;
+ uint32 relminmxid = 0;
+ Relation rel = NULL;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(5);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpages",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "reltuples",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relallvisible",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ table_close(rel, NoLock);
+ return (Datum) 0;
+ }
+
+ get_gtt_relstats(reloid,
+ &relpages, &reltuples, &relallvisible,
+ &relfrozenxid, &relminmxid);
+
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(relpages);
+ values[1] = Float4GetDatum((float4)reltuples);
+ values[2] = Int32GetDatum(relallvisible);
+ values[3] = UInt32GetDatum(relfrozenxid);
+ values[4] = UInt32GetDatum(relminmxid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_attached_pid(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[1];
+ bool isnull[1];
+ Relation rel = NULL;
+ PGPROC *proc = NULL;
+ Bitmapset *map = NULL;
+ pid_t pid = 0;
+ int backendid = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(1);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ map = copy_active_gtt_bitmap(rel->rd_node);
+ if (map)
+ {
+ backendid = bms_first_member(map);
+
+ do
+ {
+ proc = BackendIdGetProc(backendid);
+ pid = proc->pid;
+ if (pid > 0)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ backendid = bms_next_member(map, backendid);
+ } while (backendid > 0);
+
+ pfree(map);
+ }
+
+ tuplestore_donestoring(tupstore);
+ table_close(rel, NoLock);
+
+ return (Datum) 0;
+}
+
+Datum
+pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Datum values[3];
+ bool isnull[3];
+ int num_xid = MaxBackends + 1;
+ int *pids = NULL;
+ uint32 *xids = NULL;
+ int i = 0;
+ int j = 0;
+ uint32 oldest = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(3);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (max_active_gtt <= 0)
+ return (Datum) 0;
+
+ if (RecoveryInProgress())
+ return (Datum) 0;
+
+ pids = palloc0(sizeof(int) * num_xid);
+ xids = palloc0(sizeof(int) * num_xid);
+ oldest = list_all_session_gtt_frozenxids(num_xid, pids, xids, &i);
+ if (i > 0)
+ {
+ if (i > 0)
+ {
+ pids[i] = 0;
+ xids[i] = oldest;
+ i++;
+ }
+
+ for(j = 0; j < i; j++)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pids[j]);
+ values[1] = UInt32GetDatum(xids[j]);
+ values[2] = UInt32GetDatum(0);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ }
+ tuplestore_donestoring(tupstore);
+ pfree(pids);
+ pfree(xids);
+
+ return (Datum) 0;
+}
+
diff --git a/contrib/pg_gtt/pg_gtt.control b/contrib/pg_gtt/pg_gtt.control
new file mode 100644
index 0000000..342af1d
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.control
@@ -0,0 +1,4 @@
+comment = 'pg_gtt'
+default_version = '1.0'
+module_pathname = '$libdir/pg_gtt'
+relocatable = true
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 2e1dcb9..3eb57df 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -158,6 +158,19 @@ static relopt_bool boolRelOpts[] =
},
true
},
+ /*
+ * For global temp table only
+ * use AccessExclusiveLock for ensure safety
+ */
+ {
+ {
+ "on_commit_delete_rows",
+ "global temp table on commit options",
+ RELOPT_KIND_HEAP,
+ ShareUpdateExclusiveLock
+ },
+ true
+ },
/* list terminator */
{{NULL}}
};
@@ -1378,7 +1391,11 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
relopt_value *options;
StdRdOptions *rdopts;
int numoptions;
+
+ /* add on_commit_delete_rows for global temp table */
static const relopt_parse_elt tab[] = {
+ {"on_commit_delete_rows", RELOPT_TYPE_BOOL,
+ offsetof(StdRdOptions, on_commit_delete_rows)},
{"fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor)},
{"autovacuum_enabled", RELOPT_TYPE_BOOL,
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index f428729..6c9b052 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1028,7 +1028,9 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ /* global temp is same as local temp table */
+ if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 5cc30da..49b7d2e 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -148,7 +148,9 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* metapage, nor the first bitmap page.
*/
sort_threshold = (maintenance_work_mem * 1024L) / BLCKSZ;
- if (index->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ if (!(index->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ index->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
sort_threshold = Min(sort_threshold, NBuffers);
else
sort_threshold = Min(sort_threshold, NLocBuffer);
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index fc19f40..681521a 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -602,7 +602,7 @@ heapam_relation_set_new_filenode(Relation rel,
*/
*minmulti = GetOldestMultiXactId();
- srel = RelationCreateStorage(*newrnode, persistence);
+ srel = RelationCreateStorage(*newrnode, persistence, rel);
/*
* If required, set up an init fork for an unlogged table so that it can
@@ -655,7 +655,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index a3c4a1d..03fac55 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -60,6 +60,7 @@
#include "utils/pg_rusage.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/*
* Space/time tradeoff parameters: do these need to be user-tunable?
@@ -214,8 +215,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
Assert(params->truncate != VACOPT_TERNARY_DEFAULT);
/* not every AM requires these to be valid, but heap does */
- Assert(TransactionIdIsNormal(onerel->rd_rel->relfrozenxid));
- Assert(MultiXactIdIsValid(onerel->rd_rel->relminmxid));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relfrozenxid == InvalidTransactionId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && TransactionIdIsNormal(onerel->rd_rel->relfrozenxid)));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relminmxid == InvalidMultiXactId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && MultiXactIdIsValid(onerel->rd_rel->relminmxid)));
/* measure elapsed time iff autovacuum logging requires it */
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
@@ -274,8 +277,19 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
vacrelstats = (LVRelStats *) palloc0(sizeof(LVRelStats));
- vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
- vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ /* get relstat from gtt localhash */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ &vacrelstats->old_rel_pages,
+ &vacrelstats->old_live_tuples,
+ NULL, NULL, NULL);
+ }
+ else
+ {
+ vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
+ vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ }
vacrelstats->num_index_scans = 0;
vacrelstats->pages_removed = 0;
vacrelstats->lock_waiter_detected = false;
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 6b2655c..dcb5acb 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -765,7 +765,14 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+
+ /* global temp table may be not yet initialized for this backend. */
+ if (RELATION_IS_GLOBAL_TEMP(rel) &&
+ blkno == BTREE_METAPAGE &&
+ PageIsNew(BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 77ad765..9ff98ff 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6319,6 +6319,10 @@ StartupXLOG(void)
else
recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
+ /* clean temp relation files */
+ if (max_active_gtt > 0)
+ RemovePgTempFiles();
+
/*
* Check for signal files, and if so set up state for offline recovery
*/
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 8bece07..470683b 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -21,6 +21,8 @@ OBJS = catalog.o dependency.o heap.o index.o indexing.o namespace.o aclchk.o \
pg_db_role_setting.o pg_shdepend.o pg_subscription.o pg_type.o \
storage.o toasting.o
+OBJS += storage_gtt.o
+
BKIFILES = postgres.bki postgres.description postgres.shdescription
include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index a065419..db86aa6 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -406,7 +406,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
switch (relpersistence)
{
+ /* global temp table is same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
break;
case RELPERSISTENCE_UNLOGGED:
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index b8b4768..832a3f1 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -61,6 +61,7 @@
#include "catalog/pg_type.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "commands/tablecmds.h"
#include "commands/typecmds.h"
#include "executor/executor.h"
@@ -100,6 +101,7 @@ static void AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -406,6 +408,10 @@ heap_create(const char *relname,
relpersistence,
relkind);
+ /* global temp table not create storage file when catalog create */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ create_storage = false;
+
/*
* Have the storage manager create the relation's disk file, if needed.
*
@@ -429,7 +435,7 @@ heap_create(const char *relname,
case RELKIND_INDEX:
case RELKIND_SEQUENCE:
- RelationCreateStorage(rel->rd_node, relpersistence);
+ RelationCreateStorage(rel->rd_node, relpersistence, rel);
break;
case RELKIND_RELATION:
@@ -926,6 +932,7 @@ AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -964,8 +971,18 @@ AddNewRelationTuple(Relation pg_class_desc,
break;
}
- new_rel_reltup->relfrozenxid = relfrozenxid;
- new_rel_reltup->relminmxid = relminmxid;
+ /* global temp table not remember transaction info in catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ new_rel_reltup->relfrozenxid = InvalidTransactionId;
+ new_rel_reltup->relminmxid = InvalidMultiXactId;
+ }
+ else
+ {
+ new_rel_reltup->relfrozenxid = relfrozenxid;
+ new_rel_reltup->relminmxid = relminmxid;
+ }
+
new_rel_reltup->relowner = relowner;
new_rel_reltup->reltype = new_type_oid;
new_rel_reltup->reloftype = reloftype;
@@ -1327,6 +1344,7 @@ heap_create_with_catalog(const char *relname,
reloftypeid,
ownerid,
relkind,
+ relpersistence,
relfrozenxid,
relminmxid,
PointerGetDatum(relacl),
@@ -1411,11 +1429,15 @@ heap_create_with_catalog(const char *relname,
*/
StoreConstraints(new_rel_desc, cooked_constraints, is_internal);
- /*
- * If there's a special on-commit action, remember it
- */
- if (oncommit != ONCOMMIT_NOOP)
- register_on_commit_action(relid, oncommit);
+ /* global temp table register action when storage init */
+ if (relpersistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /*
+ * If there's a special on-commit action, remember it
+ */
+ if (oncommit != ONCOMMIT_NOOP)
+ register_on_commit_action(relid, oncommit);
+ }
/*
* ok, the relation has been cataloged, so close our relations and return
@@ -1907,6 +1929,13 @@ heap_drop_with_catalog(Oid relid)
if (relid == defaultPartOid)
update_default_partition_oid(parentOid, InvalidOid);
+ /* We allow to drop global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ if (is_other_backend_use_gtt(rel->rd_node))
+ elog(ERROR, "can not drop relation when other backend attached this global temp table");
+ }
+
/*
* Schedule unlinking of the relation's physical files at commit.
*/
@@ -3133,9 +3162,10 @@ RemoveStatistics(Oid relid, AttrNumber attnum)
*
* The routine will truncate and then reconstruct the indexes on
* the specified relation. Caller must hold exclusive lock on rel.
+ *
*/
static void
-RelationTruncateIndexes(Relation heapRelation)
+RelationTruncateIndexes(Relation heapRelation, LOCKMODE lockmode)
{
ListCell *indlist;
@@ -3147,7 +3177,7 @@ RelationTruncateIndexes(Relation heapRelation)
IndexInfo *indexInfo;
/* Open the index relation; use exclusive lock, just to be sure */
- currentIndex = index_open(indexId, AccessExclusiveLock);
+ currentIndex = index_open(indexId, lockmode);
/* Fetch info needed for index_build */
indexInfo = BuildIndexInfo(currentIndex);
@@ -3186,8 +3216,13 @@ heap_truncate(List *relids)
{
Oid rid = lfirst_oid(cell);
Relation rel;
+ LOCKMODE lockmode = AccessExclusiveLock;
- rel = table_open(rid, AccessExclusiveLock);
+ /* truncate global temp table only need RowExclusiveLock */
+ if (get_rel_persistence(rid) == RELPERSISTENCE_GLOBAL_TEMP)
+ lockmode = RowExclusiveLock;
+
+ rel = table_open(rid, lockmode);
relations = lappend(relations, rel);
}
@@ -3220,6 +3255,8 @@ void
heap_truncate_one_rel(Relation rel)
{
Oid toastrelid;
+ LOCKMODE lockmode = AccessExclusiveLock;
+ bool truncate_toastrel = false;
/*
* Truncate the relation. Partitioned tables have no storage, so there is
@@ -3228,23 +3265,40 @@ heap_truncate_one_rel(Relation rel)
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
return;
+ toastrelid = rel->rd_rel->reltoastrelid;
+
+ /*
+ * Truncate global temp table only need RowExclusiveLock
+ */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ lockmode = RowExclusiveLock;
+ if (OidIsValid(toastrelid) &&
+ gtt_storage_attached(toastrelid))
+ truncate_toastrel = true;
+ }
+ else if (OidIsValid(toastrelid))
+ truncate_toastrel = true;
+
/* Truncate the underlying relation */
table_relation_nontransactional_truncate(rel);
/* If the relation has indexes, truncate the indexes too */
- RelationTruncateIndexes(rel);
+ RelationTruncateIndexes(rel, lockmode);
/* If there is a toast table, truncate that too */
- toastrelid = rel->rd_rel->reltoastrelid;
- if (OidIsValid(toastrelid))
+ if (truncate_toastrel)
{
- Relation toastrel = table_open(toastrelid, AccessExclusiveLock);
+ Relation toastrel = table_open(toastrelid, lockmode);
table_relation_nontransactional_truncate(toastrel);
- RelationTruncateIndexes(toastrel);
+ RelationTruncateIndexes(toastrel, lockmode);
/* keep the lock... */
table_close(toastrel, NoLock);
}
+
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ up_gtt_relstats(rel, 0, 0, 0, RecentXmin, InvalidMultiXactId);
}
/*
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 4f54631..163128d 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -52,6 +52,7 @@
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
#include "catalog/storage.h"
+#include "catalog/storage_gtt.h"
#include "commands/event_trigger.h"
#include "commands/progress.h"
#include "commands/tablecmds.h"
@@ -879,6 +880,26 @@ index_create(Relation heapRelation,
indexRelationName, RelationGetRelationName(heapRelation))));
}
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ if (accessMethodObjectId != BTREE_AM_OID)
+ elog(ERROR, "only support btree index on global temp table");
+
+ /* We allow to create index on global temp table only this session use it */
+ if (is_other_backend_use_gtt(heapRelation->rd_node))
+ elog(ERROR, "can not create index when have other backend attached this global temp table");
+
+ /* No support create index on global temp table use concurrent mode yet */
+ if (concurrent)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot create indexes on global temporary tables using concurrent mode")));
+
+ /* if global temp table not init storage, then skip build index */
+ if (!gtt_storage_attached(heapRelation->rd_node.relNode))
+ flags |= INDEX_CREATE_SKIP_BUILD;
+ }
+
/*
* construct tuple descriptor for index tuples
*/
@@ -2040,6 +2061,13 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
*/
CheckTableNotInUse(userIndexRelation, "DROP INDEX");
+ /* We allow to drop index on global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(userHeapRelation))
+ {
+ if (is_other_backend_use_gtt(userHeapRelation->rd_node))
+ elog(ERROR, "can not drop index when other backend attached this global temp table");
+ }
+
/*
* Drop Index Concurrently is more or less the reverse process of Create
* Index Concurrently.
@@ -2699,20 +2727,29 @@ index_update_stats(Relation rel,
else /* don't bother for indexes */
relallvisible = 0;
- if (rd_rel->relpages != (int32) relpages)
+ /* update index stats into localhash for global temp table */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
{
- rd_rel->relpages = (int32) relpages;
- dirty = true;
+ up_gtt_relstats(rel, relpages, reltuples, relallvisible,
+ InvalidTransactionId, InvalidMultiXactId);
}
- if (rd_rel->reltuples != (float4) reltuples)
- {
- rd_rel->reltuples = (float4) reltuples;
- dirty = true;
- }
- if (rd_rel->relallvisible != (int32) relallvisible)
+ else
{
- rd_rel->relallvisible = (int32) relallvisible;
- dirty = true;
+ if (rd_rel->relpages != (int32) relpages)
+ {
+ rd_rel->relpages = (int32) relpages;
+ dirty = true;
+ }
+ if (rd_rel->reltuples != (float4) reltuples)
+ {
+ rd_rel->reltuples = (float4) reltuples;
+ dirty = true;
+ }
+ if (rd_rel->relallvisible != (int32) relallvisible)
+ {
+ rd_rel->relallvisible = (int32) relallvisible;
+ dirty = true;
+ }
}
}
@@ -2827,6 +2864,13 @@ index_build(Relation heapRelation,
pgstat_progress_update_multi_param(6, index, val);
}
+ /* POALR */
+ if (RELATION_IS_GLOBAL_TEMP(indexRelation))
+ {
+ if (!gtt_storage_attached(indexRelation->rd_node.relNode))
+ RelationCreateStorage(indexRelation->rd_node, RELPERSISTENCE_GLOBAL_TEMP, indexRelation);
+ }
+
/*
* Call the access method's build procedure
*/
@@ -3159,12 +3203,22 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
/*
* Scan the index and gather up all the TIDs into a tuplesort object.
*/
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = indexRelation;
ivinfo.analyze_only = false;
ivinfo.report_progress = true;
ivinfo.estimated_count = true;
ivinfo.message_level = DEBUG2;
- ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
+
+ /* get relstats abort global temp table from hashtable, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ get_gtt_relstats(RelationGetRelid(heapRelation),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
ivinfo.strategy = NULL;
/*
@@ -3422,6 +3476,15 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
errmsg("cannot reindex temporary tables of other sessions")));
/*
+ * Because global temp table cannot change relfilenode
+ * no support reindex on global temp table yet.
+ */
+ if (RELATION_IS_GLOBAL_TEMP(iRel))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot reindex global temporary tables")));
+
+ /*
* Also check for active uses of the index in the current transaction; we
* don't want to reindex underneath an open indexscan.
*/
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 8d0896c..4c04833 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -647,6 +647,13 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
errmsg("cannot create temporary relation in non-temporary schema")));
}
break;
+ /* global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ if (isAnyTempNamespace(nspid))
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot create global temp relations in temporary schemas")));
+ break;
case RELPERSISTENCE_PERMANENT:
if (isTempOrTempToastNamespace(nspid))
newRelation->relpersistence = RELPERSISTENCE_TEMP;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 3cc886f..6295f81 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -28,6 +28,7 @@
#include "access/xlogutils.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "storage/freespace.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
@@ -74,9 +75,10 @@ static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
*
* This function is transactional. The creation is WAL-logged, and if the
* transaction aborts later on, the storage will be destroyed.
+ *
*/
SMgrRelation
-RelationCreateStorage(RelFileNode rnode, char relpersistence)
+RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel)
{
PendingRelDelete *pending;
SMgrRelation srel;
@@ -86,6 +88,8 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
switch (relpersistence)
{
case RELPERSISTENCE_TEMP:
+ /* global temp table use same storage strategy as local temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
needs_wal = false;
break;
@@ -118,6 +122,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
pending->next = pendingDeletes;
pendingDeletes = pending;
+ /* remember global temp table storage info to localhash */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP && rel)
+ remember_gtt_storage_info(rnode, rel);
+
return srel;
}
@@ -455,8 +463,15 @@ smgrDoPendingDeletes(bool isCommit)
smgrdounlinkall(srels, nrels, false);
for (i = 0; i < nrels; i++)
+ {
smgrclose(srels[i]);
+ /* clean global temp table flags when transaction commit or rollback */
+ if (SmgrIsTemp(srels[i]) &&
+ gtt_storage_attached(srels[i]->smgr_rnode.node.relNode))
+ forget_gtt_storage_info(srels[i]->smgr_rnode.node.relNode);
+ }
+
pfree(srels);
}
}
diff --git a/src/backend/catalog/storage_gtt.c b/src/backend/catalog/storage_gtt.c
new file mode 100644
index 0000000..37a8a97
--- /dev/null
+++ b/src/backend/catalog/storage_gtt.c
@@ -0,0 +1,814 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.c
+ * code to create and destroy physical storage for global temparary table
+ *
+ * IDENTIFICATION
+ * src/backend/catalog/storage_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+
+#include "access/visibilitymap.h"
+#include "access/xact.h"
+#include "access/xlog.h"
+#include "access/xloginsert.h"
+#include "access/xlogutils.h"
+#include "access/htup_details.h"
+#include "access/multixact.h"
+#include "catalog/storage.h"
+#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/heap.h"
+#include "commands/tablecmds.h"
+#include "nodes/primnodes.h"
+#include "nodes/pg_list.h"
+#include "miscadmin.h"
+#include "storage/freespace.h"
+#include "storage/smgr.h"
+#include "storage/ipc.h"
+#include "storage/proc.h"
+#include "storage/lwlock.h"
+#include "storage/shmem.h"
+#include "utils/memutils.h"
+#include "utils/rel.h"
+#include "utils/hsearch.h"
+#include "utils/catcache.h"
+#include <utils/relcache.h>
+#include "utils/inval.h"
+#include "utils/guc.h"
+#include "utils/guc.h"
+
+
+/* Copy from bitmapset.c, because gtt used the function in bitmapset.c */
+#define WORDNUM(x) ((x) / BITS_PER_BITMAPWORD)
+#define BITNUM(x) ((x) % BITS_PER_BITMAPWORD)
+
+#define BITMAPSET_SIZE(nwords) \
+ (offsetof(Bitmapset, words) + (nwords) * sizeof(bitmapword))
+
+static bool gtt_cleaner_exit_registered = false;
+static HTAB *gtt_storage_local_hash = NULL;
+static HTAB *active_gtt_shared_hash = NULL;
+static MemoryContext gtt_relstats_context = NULL;
+
+/* relfrozenxid of all gtts in the current session */
+static List *gtt_session_relfrozenxid_list = NIL;
+static TransactionId gtt_session_frozenxid = InvalidTransactionId;
+
+typedef struct gtt_ctl_data
+{
+ LWLock lock;
+ int max_entry;
+ int entry_size;
+}gtt_ctl_data;
+
+static gtt_ctl_data *gtt_shared_ctl = NULL;
+
+typedef struct
+{
+ RelFileNode rnode;
+ Bitmapset *map;
+ /* bitmap data */
+} gtt_shared_hash_entry;
+
+typedef struct
+{
+ Oid relid;
+
+ Oid spcnode;
+ /* pg_class stat */
+ int32 relpages;
+ float4 reltuples;
+ int32 relallvisible;
+ TransactionId relfrozenxid;
+ TransactionId relminmxid;
+ char relkind;
+ bool on_commit_delete;
+
+ /* pg_statistic */
+ int natts;
+ int *attnum;
+ HeapTuple *att_stat_tups;
+} gtt_local_hash_entry;
+
+static Size action_gtt_shared_hash_entry_size(void);
+static void gtt_storage_checkin(RelFileNode rnode);
+static void gtt_storage_checkout(RelFileNode rnode, bool skiplock);
+static void gtt_storage_removeall(int code, Datum arg);
+static void insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid);
+static void remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid);
+static void set_gtt_session_relfrozenxid(void);
+
+static Size
+action_gtt_shared_hash_entry_size(void)
+{
+ int wordnum;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ wordnum = WORDNUM(MaxBackends + 1);
+ hash_entry_size += MAXALIGN(sizeof(gtt_shared_hash_entry));
+ hash_entry_size += MAXALIGN(BITMAPSET_SIZE(wordnum + 1));
+
+ return hash_entry_size;
+}
+
+Size
+active_gtt_shared_hash_size(void)
+{
+ Size size = 0;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ size = MAXALIGN(sizeof(gtt_ctl_data));
+ hash_entry_size = action_gtt_shared_hash_entry_size();
+ size += hash_estimate_size(max_active_gtt, hash_entry_size);
+
+ return size;
+}
+
+void
+active_gtt_shared_hash_init(void)
+{
+ HASHCTL info;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ gtt_shared_ctl =
+ ShmemInitStruct("gtt_shared_ctl",
+ sizeof(gtt_ctl_data),
+ &found);
+
+ if (!found)
+ {
+ LWLockRegisterTranche(LWTRANCHE_GTT_CTL, "gtt_shared_ctl");
+ LWLockInitialize(>t_shared_ctl->lock, LWTRANCHE_GTT_CTL);
+ gtt_shared_ctl->max_entry = max_active_gtt;
+ gtt_shared_ctl->entry_size = action_gtt_shared_hash_entry_size();
+ }
+
+ info.keysize = sizeof(RelFileNode);
+ info.entrysize = gtt_shared_ctl->entry_size;
+ active_gtt_shared_hash =
+ ShmemInitHash("active gtt shared hash",
+ gtt_shared_ctl->max_entry,
+ gtt_shared_ctl->max_entry,
+ &info, HASH_ELEM | HASH_BLOBS | HASH_FIXED_SIZE);
+}
+
+static void
+gtt_storage_checkin(RelFileNode rnode)
+{
+ gtt_shared_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ entry = (gtt_shared_hash_entry *) hash_search(active_gtt_shared_hash,
+ &rnode, HASH_ENTER_NULL, &found);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of shared memory"),
+ errhint("You might need to increase max_active_gtt.")));
+ }
+
+ if (found == false)
+ {
+ int wordnum;
+
+ entry->map = (Bitmapset *)((char *)entry + MAXALIGN(sizeof(gtt_shared_hash_entry)));
+ wordnum = WORDNUM(MaxBackends + 1);
+ memset(entry->map, 0, BITMAPSET_SIZE(wordnum + 1));
+ entry->map->nwords = wordnum + 1;
+ }
+
+ bms_add_member(entry->map, MyBackendId);
+ LWLockRelease(>t_shared_ctl->lock);
+}
+
+static void
+gtt_storage_checkout(RelFileNode rnode, bool skiplock)
+{
+ gtt_shared_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (!skiplock)
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(rnode), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ elog(WARNING, "relfilenode %u/%u/%u not exist in gtt shared hash when forget",
+ rnode.dbNode, rnode.spcNode, rnode.relNode);
+ return;
+ }
+
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+ bms_del_member(entry->map, MyBackendId);
+
+ if (bms_is_empty(entry->map))
+ {
+ if (!hash_search(active_gtt_shared_hash, &rnode, HASH_REMOVE, NULL))
+ elog(PANIC, "gtt shared hash table corrupted");
+ }
+
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return;
+}
+
+Bitmapset *
+copy_active_gtt_bitmap(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ Bitmapset *map_copy = NULL;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return NULL;
+ }
+
+ Assert(entry->map);
+ if (!bms_is_empty(entry->map))
+ map_copy = bms_copy(entry->map);
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return map_copy;
+}
+
+bool
+is_other_backend_use_gtt(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ bool in_use = false;
+ int num_use = 0;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return false;
+ }
+
+ Assert(entry->map);
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+
+ num_use = bms_num_members(entry->map);
+ if (num_use == 0)
+ in_use = false;
+ else if (num_use == 1)
+ {
+ if(bms_is_member(MyBackendId, entry->map))
+ in_use = false;
+ else
+ in_use = true;
+ }
+ else
+ in_use = true;
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return in_use;
+}
+
+void
+remember_gtt_storage_info(RelFileNode rnode, Relation rel)
+{
+ gtt_local_hash_entry *entry;
+ MemoryContext oldcontext;
+ Oid relid = rnode.relNode;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temporary table feature is disable"),
+ errhint("You might need to increase max_active_gtt to enable this feature.")));
+
+ if (RecoveryInProgress())
+ elog(ERROR, "readonly mode not support access global temp table yet");
+
+ if (gtt_storage_local_hash == NULL)
+ {
+#define GTT_LOCAL_HASH_SIZE 1024
+ /* First time through: initialize the hash table */
+ HASHCTL ctl;
+
+ MemSet(&ctl, 0, sizeof(ctl));
+ ctl.keysize = sizeof(Oid);
+ ctl.entrysize = sizeof(gtt_local_hash_entry);
+ gtt_storage_local_hash =
+ hash_create("global temp relation table",
+ GTT_LOCAL_HASH_SIZE,
+ &ctl, HASH_ELEM | HASH_BLOBS);
+
+ if (!CacheMemoryContext)
+ CreateCacheMemoryContext();
+
+ gtt_relstats_context =
+ AllocSetContextCreate(CacheMemoryContext,
+ "gtt relstats context",
+ ALLOCSET_DEFAULT_SIZES);
+ }
+
+ /* Look up or create an entry */
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_ENTER, &found);
+
+ if (found)
+ {
+ elog(ERROR, "backend %d relid %u already exists in global temp table local hash",
+ MyBackendId, relid);
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+
+ entry->spcnode = rnode.spcNode;
+ entry->relpages = 0;
+ entry->reltuples = 0;
+ entry->relallvisible = 0;
+ entry->relkind = rel->rd_rel->relkind;
+ /* only heap contain transaction information */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ int natts = RelationGetNumberOfAttributes(rel);
+ entry->natts = natts;
+ entry->attnum = palloc0(sizeof(int) * natts);
+ entry->att_stat_tups = palloc0(sizeof(HeapTuple) * natts);
+
+ if (RELATION_GTT_ON_COMMIT_DELETE(rel))
+ {
+ entry->on_commit_delete = true;
+ register_on_commit_action(rel->rd_node.relNode, ONCOMMIT_DELETE_ROWS);
+ }
+
+ entry->relfrozenxid = RecentXmin;
+ entry->relminmxid = GetOldestMultiXactId();
+ insert_gtt_relfrozenxid_to_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ gtt_storage_checkin(rnode);
+ }
+ else
+ {
+ entry->natts = 0;
+ entry->attnum = 0;
+ entry->att_stat_tups = NULL;
+ entry->on_commit_delete = false;
+ entry->relfrozenxid = 0;
+ entry->relminmxid = 0;
+ }
+
+ MemoryContextSwitchTo(oldcontext);
+
+ if (!gtt_cleaner_exit_registered)
+ {
+ before_shmem_exit(gtt_storage_removeall, 0);
+ gtt_cleaner_exit_registered = true;
+ }
+
+ return;
+}
+
+void
+forget_gtt_storage_info(Oid relid)
+{
+ gtt_local_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, NULL);
+
+ if (entry && entry->relkind == RELKIND_RELATION)
+ {
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ gtt_storage_checkout(rnode, false);
+
+ Assert(TransactionIdIsNormal(entry->relfrozenxid));
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_REMOVE, NULL);
+
+ return;
+}
+
+/* is the storage file was created in this backend */
+bool
+gtt_storage_attached(Oid relid)
+{
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ if (gtt_storage_local_hash == NULL)
+ return false;
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, &found);
+
+ return found;
+}
+
+static void
+gtt_storage_removeall(int code, Datum arg)
+{
+ HASH_SEQ_STATUS status;
+ gtt_local_hash_entry *entry;
+ int nrels = 0,
+ maxrels = 0;
+ SMgrRelation *srels = NULL;
+ RelFileNode *rnodes = NULL;
+ char *relkinds = NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ hash_seq_init(&status, gtt_storage_local_hash);
+ while ((entry = (gtt_local_hash_entry *) hash_seq_search(&status)) != NULL)
+ {
+ SMgrRelation srel;
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ srel = smgropen(rnode, MyBackendId);
+
+ /* allocate the initial array, or extend it, if needed */
+ if (maxrels == 0)
+ {
+ maxrels = 32;
+ srels = palloc(sizeof(SMgrRelation) * maxrels);
+ rnodes = palloc(sizeof(RelFileNode) * maxrels);
+ relkinds = palloc(sizeof(char) * maxrels);
+ }
+ else if (maxrels <= nrels)
+ {
+ maxrels *= 2;
+ srels = repalloc(srels, sizeof(SMgrRelation) * maxrels);
+ rnodes = repalloc(rnodes, sizeof(RelFileNode) * maxrels);
+ relkinds = repalloc(relkinds, sizeof(char) * maxrels);
+ }
+
+ srels[nrels] = srel;
+ rnodes[nrels] = rnode;
+ relkinds[nrels] = entry->relkind;
+ nrels++;
+ }
+
+ if (nrels > 0)
+ {
+ int i;
+
+ smgrdounlinkall(srels, nrels, false);
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ for (i = 0; i < nrels; i++)
+ {
+ smgrclose(srels[i]);
+ if (relkinds[i] == RELKIND_RELATION)
+ gtt_storage_checkout(rnodes[i], true);
+ }
+ LWLockRelease(>t_shared_ctl->lock);
+
+ pfree(srels);
+ pfree(rnodes);
+ pfree(relkinds);
+ }
+
+ MyProc->session_gtt_frozenxid = InvalidTransactionId;
+
+ return;
+}
+
+/*
+ * Update global temp table relstats(relpage/reltuple/relallvisible)
+ * to local hashtable
+ */
+void
+up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid)
+{
+ Oid relid = RelationGetRelid(relation);
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->spcnode);
+
+ if (num_pages >= 0 &&
+ entry->relpages != (int32)num_pages)
+ entry->relpages = (int32)num_pages;
+
+ if (num_tuples >= 0 &&
+ num_tuples != (float4)entry->reltuples)
+ entry->reltuples = (float4)num_tuples;
+
+ /* only heap contain transaction information and relallvisible */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ if (entry->relallvisible >= 0 &&
+ entry->relallvisible != (int32)num_all_visible_pages)
+ {
+ entry->relallvisible = (int32)num_all_visible_pages;
+ }
+
+ if (TransactionIdIsNormal(relfrozenxid) &&
+ entry->relfrozenxid != relfrozenxid &&
+ (TransactionIdPrecedes(entry->relfrozenxid, relfrozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(), entry->relfrozenxid)))
+ {
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ entry->relfrozenxid = relfrozenxid;
+ insert_gtt_relfrozenxid_to_ordered_list(relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ if (MultiXactIdIsValid(relminmxid) &&
+ entry->relminmxid != relminmxid &&
+ (MultiXactIdPrecedes(entry->relminmxid, relminmxid) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), entry->relminmxid)))
+ {
+ entry->relminmxid = relminmxid;
+ }
+ }
+
+ return;
+}
+
+/*
+ * Search global temp table relstats(relpage/reltuple/relallvisible)
+ * from local hashtable.
+ */
+void
+get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->relid == relid);
+
+ if (relpages)
+ *relpages = entry->relpages;
+
+ if (reltuples)
+ *reltuples = entry->reltuples;
+
+ if (relallvisible)
+ *relallvisible = entry->relallvisible;
+
+ if (relfrozenxid)
+ *relfrozenxid = entry->relfrozenxid;
+
+ if (relminmxid)
+ *relminmxid = entry->relminmxid;
+
+ return;
+}
+
+/*
+ * Update global temp table statistic info(definition is same as pg_statistic)
+ * to local hashtable where ananyze global temp table
+ */
+void
+up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ MemoryContext oldcontext;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ if (entry->relkind != RELKIND_RELATION)
+ {
+ elog(WARNING, "oid %u not a relation", reloid);
+ return;
+ }
+
+ /* todo */
+ if (entry->natts < natts)
+ {
+ elog(WARNING, "reloid %u not support update attstat after add colunm", reloid);
+ return;
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ Assert(entry->relid == reloid);
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == 0)
+ {
+ entry->attnum[i] = attnum;
+ break;
+ }
+ else if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ heap_freetuple(entry->att_stat_tups[i]);
+ entry->att_stat_tups[i] = NULL;
+ break;
+ }
+ }
+
+ Assert(i < entry->natts);
+ Assert(entry->att_stat_tups[i] == NULL);
+ entry->att_stat_tups[i] = heap_form_tuple(tupleDescriptor, values, isnull);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+/*
+ * Search global temp table statistic info(definition is same as pg_statistic)
+ * from local hashtable.
+ */
+HeapTuple
+get_gtt_att_statistic(Oid reloid, int attnum, bool inh)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return NULL;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return NULL;
+
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ return entry->att_stat_tups[i];
+ }
+ }
+
+ return NULL;
+}
+
+void
+release_gtt_statistic_cache(HeapTuple tup)
+{
+ /* do nothing */
+ return;
+}
+
+static void
+insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid)
+{
+ MemoryContext oldcontext;
+ ListCell *prev;
+
+ Assert(TransactionIdIsNormal(relfrozenxid));
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ /* Does the datum belong at the front? */
+ if (gtt_session_relfrozenxid_list == NIL ||
+ TransactionIdFollowsOrEquals(relfrozenxid,
+ linitial_oid(gtt_session_relfrozenxid_list)))
+ {
+ gtt_session_relfrozenxid_list =
+ lcons_oid(relfrozenxid, gtt_session_relfrozenxid_list);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+ }
+ /* No, so find the entry it belongs after */
+ prev = list_head(gtt_session_relfrozenxid_list);
+ for (;;)
+ {
+ ListCell *curr = lnext(prev);
+
+ if (curr == NULL ||
+ TransactionIdFollowsOrEquals(relfrozenxid, lfirst_oid(curr)))
+ break; /* it belongs after 'prev', before 'curr' */
+
+ prev = curr;
+ }
+ /* Insert datum into list after 'prev' */
+ lappend_cell_oid(gtt_session_relfrozenxid_list, prev, relfrozenxid);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+static void
+remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid)
+{
+ gtt_session_relfrozenxid_list =
+ list_delete_oid(gtt_session_relfrozenxid_list, relfrozenxid);
+}
+
+static void
+set_gtt_session_relfrozenxid(void)
+{
+ TransactionId gtt_frozenxid = InvalidTransactionId;
+
+ if (gtt_session_relfrozenxid_list)
+ gtt_frozenxid = llast_oid(gtt_session_relfrozenxid_list);
+
+ gtt_session_frozenxid = gtt_frozenxid;
+ if (MyProc->session_gtt_frozenxid != gtt_frozenxid)
+ MyProc->session_gtt_frozenxid = gtt_frozenxid;
+}
+
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index faabbeb..d79535d 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -65,6 +65,7 @@
#include "utils/syscache.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/* Per-index data for ANALYZE */
typedef struct AnlIndexData
@@ -102,7 +103,7 @@ static int acquire_inherited_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
static void update_attstats(Oid relid, bool inh,
- int natts, VacAttrStats **vacattrstats);
+ int natts, VacAttrStats **vacattrstats, char relpersistence);
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
@@ -563,14 +564,15 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* pg_statistic for columns we didn't process, we leave them alone.)
*/
update_attstats(RelationGetRelid(onerel), inh,
- attr_cnt, vacattrstats);
+ attr_cnt, vacattrstats, RelationGetRelPersistence(onerel));
for (ind = 0; ind < nindexes; ind++)
{
AnlIndexData *thisdata = &indexdata[ind];
update_attstats(RelationGetRelid(Irel[ind]), false,
- thisdata->attr_cnt, thisdata->vacattrstats);
+ thisdata->attr_cnt, thisdata->vacattrstats,
+ RelationGetRelPersistence(Irel[ind]));
}
/*
@@ -647,11 +649,20 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
IndexBulkDeleteResult *stats;
IndexVacuumInfo ivinfo;
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = Irel[ind];
ivinfo.analyze_only = true;
ivinfo.estimated_count = true;
ivinfo.message_level = elevel;
- ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
+ /* get global temp relstats from localhash, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
ivinfo.strategy = vac_strategy;
stats = index_vacuum_cleanup(&ivinfo, NULL);
@@ -1414,7 +1425,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
* by taking a self-exclusive lock on the relation in analyze_rel().
*/
static void
-update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
+update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats, char relpersistence)
{
Relation sd;
int attno;
@@ -1516,31 +1527,45 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
}
}
- /* Is there already a pg_statistic tuple for this attribute? */
- oldtup = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(relid),
- Int16GetDatum(stats->attr->attnum),
- BoolGetDatum(inh));
-
- if (HeapTupleIsValid(oldtup))
+ /* Update column statistic to localhash, not catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
- /* Yes, replace it */
- stup = heap_modify_tuple(oldtup,
- RelationGetDescr(sd),
- values,
- nulls,
- replaces);
- ReleaseSysCache(oldtup);
- CatalogTupleUpdate(sd, &stup->t_self, stup);
+ up_gtt_att_statistic(relid,
+ stats->attr->attnum,
+ inh,
+ natts,
+ RelationGetDescr(sd),
+ values,
+ nulls);
}
else
{
- /* No, insert new tuple */
- stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
- CatalogTupleInsert(sd, stup);
- }
+ /* Is there already a pg_statistic tuple for this attribute? */
+ oldtup = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh));
+
+ if (HeapTupleIsValid(oldtup))
+ {
+ /* Yes, replace it */
+ stup = heap_modify_tuple(oldtup,
+ RelationGetDescr(sd),
+ values,
+ nulls,
+ replaces);
+ ReleaseSysCache(oldtup);
+ CatalogTupleUpdate(sd, &stup->t_self, stup);
+ }
+ else
+ {
+ /* No, insert new tuple */
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ CatalogTupleInsert(sd, stup);
+ }
- heap_freetuple(stup);
+ heap_freetuple(stup);
+ }
}
table_close(sd, RowExclusiveLock);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index ebaec4f..356df7c 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -392,6 +392,12 @@ cluster_rel(Oid tableOid, Oid indexOid, int options)
errmsg("cannot vacuum temporary tables of other sessions")));
}
+ /* not support cluster global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(OldHeap))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support cluster global temporary tables yet")));
+
/*
* Also check for active uses of the relation in the current transaction,
* including open scans and pending AFTER trigger events.
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index a528241..66f4b10 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2584,6 +2584,16 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind,
!isTempNamespace(classtuple->relnamespace))
continue;
+ /* not support reindex on global temp table, so skip it */
+ if (classtuple->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(WARNING,
+ (errmsg("global temp table \"%s.%s\" skip reindexed",
+ get_namespace_name(get_rel_namespace(relid)),
+ get_rel_name(relid))));
+ continue;
+ }
+
/* Check user/system classification, and optionally skip */
if (objectKind == REINDEX_OBJECT_SYSTEM &&
!IsSystemClass(relid, classtuple))
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index 417d595..b9c3a40 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -107,7 +107,8 @@ RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid,
* transaction.
*/
relpersistence = get_rel_persistence(relid);
- if (relpersistence == RELPERSISTENCE_TEMP)
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE;
/* Check permissions. */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 792ba56..7a42efd 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -48,6 +48,7 @@
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
#include "catalog/toasting.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/comment.h"
#include "commands/defrem.h"
@@ -530,6 +531,7 @@ static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,
Relation partitionTbl);
static List *GetParentedForeignKeyRefs(Relation partition);
static void ATDetachCheckNoForeignKeyRefs(Relation partition);
+static bool has_oncommit_option(List *options);
/* ----------------------------------------------------------------
@@ -575,6 +577,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
LOCKMODE parentLockmode;
const char *accessMethod = NULL;
Oid accessMethodId = InvalidOid;
+ bool has_oncommit_clause = false;
/*
* Truncate relname to appropriate length (probably a waste of time, as
@@ -585,8 +588,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Check consistency of arguments
*/
+ /* global temp table same as local temp table */
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !(stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -616,12 +621,28 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* code. This is needed because calling code might not expect untrusted
* tables to appear in pg_temp at the front of its search path.
*/
- if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
+ /* global temp table same as local temp table */
+ if ((stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
&& InSecurityRestrictedOperation())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("cannot create temporary table within security-restricted operation")));
+ /* Not support partitioned or inherited global temp table yet */
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (relkind == RELKIND_PARTITIONED_TABLE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary partition table yet")));
+
+ if (stmt->inhRelations)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary inheritance table yet")));
+ }
+
/*
* Determine the lockmode to use when scanning parents. A self-exclusive
* lock is needed here.
@@ -717,6 +738,40 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Parse and validate reloptions, if any.
*/
+ /* global temp table */
+ has_oncommit_clause = has_oncommit_option(stmt->options);
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (has_oncommit_clause)
+ {
+ if (stmt->oncommit != ONCOMMIT_NOOP)
+ elog(ERROR, "can not defeine global temp table with on commit and with clause at same time");
+ }
+ else
+ {
+ DefElem *opt = makeNode(DefElem);
+
+ opt->type = T_DefElem;
+ opt->defnamespace = NULL;
+ opt->defname = "on_commit_delete_rows";
+ opt->defaction = DEFELEM_UNSPEC;
+
+ /* use reloptions to remember on commit clause */
+ if (stmt->oncommit == ONCOMMIT_DELETE_ROWS)
+ opt->arg = (Node *)makeString("true");
+ else if (stmt->oncommit == ONCOMMIT_PRESERVE_ROWS)
+ opt->arg = (Node *)makeString("false");
+ else if (stmt->oncommit == ONCOMMIT_NOOP)
+ opt->arg = (Node *)makeString("true");
+ else
+ elog(ERROR, "global temp table not support on commit drop clause");
+
+ stmt->options = lappend(stmt->options, opt);
+ }
+ }
+ else if (has_oncommit_clause)
+ elog(ERROR, "regular table cannot specifie on_commit_delete_rows");
+
reloptions = transformRelOptions((Datum) 0, stmt->options, NULL, validnsps,
true, false);
@@ -1772,7 +1827,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ RELATION_IS_GLOBAL_TEMP(rel))
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -3332,6 +3388,13 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bo
* specially.
*/
targetrelation = relation_open(myrelid, is_index ? ShareUpdateExclusiveLock : AccessExclusiveLock);
+
+ /* not support rename global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(targetrelation))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support rename global temporary tables yet")));
+
namespaceId = RelationGetNamespace(targetrelation);
/*
@@ -3501,6 +3564,14 @@ AlterTable(Oid relid, LOCKMODE lockmode, AlterTableStmt *stmt)
/* Caller is required to provide an adequate lock. */
rel = relation_open(relid, NoLock);
+ /* not support alter global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support alter global temporary tables yet")));
+ }
+
CheckTableNotInUse(rel, "ALTER TABLE");
ATController(stmt, rel, stmt->cmds, stmt->relation->inh, lockmode);
@@ -7651,6 +7722,13 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("referenced relation \"%s\" is not a table",
RelationGetRelationName(pkrel))));
+ /* global temp table not support foreign key constraint yet */
+ if (RELATION_IS_GLOBAL_TEMP(pkrel))
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("referenced relation \"%s\" is not a global temp table",
+ RelationGetRelationName(pkrel))));
+
if (!allowSystemTableMods && IsSystemRelation(pkrel))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -7690,6 +7768,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on temporary tables must involve temporary tables of this session")));
break;
+ /* global temp table not support foreign key constraint yet */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("not support foreign key constraints on global temp table yet")));
+ break;
}
/*
@@ -12702,7 +12786,7 @@ index_copy_data(Relation rel, RelFileNode newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
@@ -14109,7 +14193,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
*/
switch (rel->rd_rel->relpersistence)
{
+ /* global temp table same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("cannot change logged status of table \"%s\" because it is temporary",
@@ -16716,3 +16802,20 @@ ATDetachCheckNoForeignKeyRefs(Relation partition)
table_close(rel, NoLock);
}
}
+
+static bool
+has_oncommit_option(List *options)
+{
+ ListCell *listptr;
+
+ foreach(listptr, options)
+ {
+ DefElem *def = (DefElem *) lfirst(listptr);
+
+ if (pg_strcasecmp(def->defname, "on_commit_delete_rows") == 0)
+ return true;
+ }
+
+ return false;
+}
+
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index ef275c0..c44fad8 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -35,6 +35,7 @@
#include "catalog/pg_database.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_namespace.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/defrem.h"
#include "commands/vacuum.h"
@@ -1068,12 +1069,25 @@ vac_estimate_reltuples(Relation relation,
BlockNumber scanned_pages,
double scanned_tuples)
{
- BlockNumber old_rel_pages = relation->rd_rel->relpages;
- double old_rel_tuples = relation->rd_rel->reltuples;
+ BlockNumber old_rel_pages = 0;
+ double old_rel_tuples = 0;
double old_density;
double unscanned_pages;
double total_tuples;
+ /* get relstat from gtt local hash */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ {
+ get_gtt_relstats(RelationGetRelid(relation),
+ &old_rel_pages, &old_rel_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ {
+ old_rel_pages = relation->rd_rel->relpages;
+ old_rel_tuples = relation->rd_rel->reltuples;
+ }
+
/* If we did scan the whole table, just use the count as-is */
if (scanned_pages >= total_pages)
return scanned_tuples;
@@ -1173,24 +1187,8 @@ vac_update_relstats(Relation relation,
/* Apply statistical updates, if any, to copied tuple */
dirty = false;
- if (pgcform->relpages != (int32) num_pages)
- {
- pgcform->relpages = (int32) num_pages;
- dirty = true;
- }
- if (pgcform->reltuples != (float4) num_tuples)
- {
- pgcform->reltuples = (float4) num_tuples;
- dirty = true;
- }
- if (pgcform->relallvisible != (int32) num_all_visible_pages)
- {
- pgcform->relallvisible = (int32) num_all_visible_pages;
- dirty = true;
- }
/* Apply DDL updates, but not inside an outer transaction (see above) */
-
if (!in_outer_xact)
{
/*
@@ -1215,37 +1213,64 @@ vac_update_relstats(Relation relation,
}
}
- /*
- * Update relfrozenxid, unless caller passed InvalidTransactionId
- * indicating it has no new data.
- *
- * Ordinarily, we don't let relfrozenxid go backwards: if things are
- * working correctly, the only way the new frozenxid could be older would
- * be if a previous VACUUM was done with a tighter freeze_min_age, in
- * which case we don't want to forget the work it already did. However,
- * if the stored relfrozenxid is "in the future", then it must be corrupt
- * and it seems best to overwrite it with the cutoff we used this time.
- * This should match vac_update_datfrozenxid() concerning what we consider
- * to be "in the future".
- */
- if (TransactionIdIsNormal(frozenxid) &&
- pgcform->relfrozenxid != frozenxid &&
- (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
- TransactionIdPrecedes(ReadNewTransactionId(),
- pgcform->relfrozenxid)))
+ /* global temp table remember relstats to localhash not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
{
- pgcform->relfrozenxid = frozenxid;
- dirty = true;
+ up_gtt_relstats(relation,
+ num_pages, num_tuples,
+ num_all_visible_pages,
+ frozenxid, minmulti);
}
-
- /* Similarly for relminmxid */
- if (MultiXactIdIsValid(minmulti) &&
- pgcform->relminmxid != minmulti &&
- (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
- MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ else
{
- pgcform->relminmxid = minmulti;
- dirty = true;
+ if (pgcform->relpages != (int32) num_pages)
+ {
+ pgcform->relpages = (int32) num_pages;
+ dirty = true;
+ }
+ if (pgcform->reltuples != (float4) num_tuples)
+ {
+ pgcform->reltuples = (float4) num_tuples;
+ dirty = true;
+ }
+ if (pgcform->relallvisible != (int32) num_all_visible_pages)
+ {
+ pgcform->relallvisible = (int32) num_all_visible_pages;
+ dirty = true;
+ }
+
+ /*
+ * Update relfrozenxid, unless caller passed InvalidTransactionId
+ * indicating it has no new data.
+ *
+ * Ordinarily, we don't let relfrozenxid go backwards: if things are
+ * working correctly, the only way the new frozenxid could be older would
+ * be if a previous VACUUM was done with a tighter freeze_min_age, in
+ * which case we don't want to forget the work it already did. However,
+ * if the stored relfrozenxid is "in the future", then it must be corrupt
+ * and it seems best to overwrite it with the cutoff we used this time.
+ * This should match vac_update_datfrozenxid() concerning what we consider
+ * to be "in the future".
+ */
+ if (TransactionIdIsNormal(frozenxid) &&
+ pgcform->relfrozenxid != frozenxid &&
+ (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(),
+ pgcform->relfrozenxid)))
+ {
+ pgcform->relfrozenxid = frozenxid;
+ dirty = true;
+ }
+
+ /* Similarly for relminmxid */
+ if (MultiXactIdIsValid(minmulti) &&
+ pgcform->relminmxid != minmulti &&
+ (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ {
+ pgcform->relminmxid = minmulti;
+ dirty = true;
+ }
}
/* If anything changed, write out the tuple. */
@@ -1337,6 +1362,10 @@ vac_update_datfrozenxid(void)
continue;
}
+ /* global temp table relstats not in pg_class */
+ if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ continue;
+
/*
* Some table AMs might not need per-relation xid / multixid horizons.
* It therefore seems reasonable to allow relfrozenxid and relminmxid
@@ -1394,6 +1423,25 @@ vac_update_datfrozenxid(void)
Assert(TransactionIdIsNormal(newFrozenXid));
Assert(MultiXactIdIsValid(newMinMulti));
+ /*
+ * Global temp table get frozenxid from MyProc
+ * to avoid the vacuum truncate clog that gtt need.
+ */
+ if (max_active_gtt > 0)
+ {
+ TransactionId oldest_gtt_frozenxid =
+ list_all_session_gtt_frozenxids(0, NULL, NULL, NULL);
+
+ if (TransactionIdIsNormal(oldest_gtt_frozenxid) &&
+ TransactionIdPrecedes(oldest_gtt_frozenxid, newFrozenXid))
+ {
+ ereport(WARNING,
+ (errmsg("global temp table oldest FrozenXid is far in the past"),
+ errhint("please truncate them or kill those sessions that use them.")));
+ newFrozenXid = oldest_gtt_frozenxid;
+ }
+ }
+
/* Now fetch the pg_database tuple we need to update. */
relation = table_open(DatabaseRelationId, RowExclusiveLock);
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index b772348..cf1c7e0 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -591,6 +591,8 @@ static void
set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte)
{
+ char relpersistence;
+
/*
* The flag has previously been initialized to false, so we can just
* return if it becomes clear that we can't safely set it.
@@ -618,7 +620,11 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
* the rest of the necessary infrastructure right now anyway. So
* for now, bail out if we see a temporary table.
*/
- if (get_rel_persistence(rte->relid) == RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ relpersistence = get_rel_persistence(rte->relid);
+
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
return;
/*
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 401299e..7d63265 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6306,7 +6306,9 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
* Furthermore, any index predicate or index expressions must be parallel
* safe.
*/
+ /* global temp table is same as local temp table */
if (heap->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ heap->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ||
!is_parallel_safe(root, (Node *) RelationGetIndexExpressions(index)) ||
!is_parallel_safe(root, (Node *) RelationGetIndexPredicate(index)))
{
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 40f4976..535cf80 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -53,6 +53,7 @@
#include "utils/syscache.h"
#include "utils/snapmgr.h"
+#include "catalog/storage_gtt.h"
/* GUC parameter */
int constraint_exclusion = CONSTRAINT_EXCLUSION_PARTITION;
@@ -937,10 +938,10 @@ void
estimate_rel_size(Relation rel, int32 *attr_widths,
BlockNumber *pages, double *tuples, double *allvisfrac)
{
- BlockNumber curpages;
- BlockNumber relpages;
- double reltuples;
- BlockNumber relallvisible;
+ BlockNumber curpages = 0;
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
double density;
switch (rel->rd_rel->relkind)
@@ -954,6 +955,21 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
case RELKIND_INDEX:
+ /* global temp table get relstats from localhash */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ get_gtt_relstats(RelationGetRelid(rel),
+ &relpages, &reltuples, &relallvisible,
+ NULL, NULL);
+ }
+ else
+ {
+ /* coerce values in pg_class to more desirable types */
+ relpages = (BlockNumber) rel->rd_rel->relpages;
+ reltuples = (double) rel->rd_rel->reltuples;
+ relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
+ }
+
/*
* XXX: It'd probably be good to move this into a callback,
* individual index types e.g. know if they have a metapage.
@@ -962,11 +978,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
/* it has storage, ok to call the smgr */
curpages = RelationGetNumberOfBlocks(rel);
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
-
/* report estimated # pages */
*pages = curpages;
/* quick exit if rel is clearly empty */
@@ -976,10 +987,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
*allvisfrac = 0;
break;
}
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
/*
* Discount the metapage while estimating the number of tuples.
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 345a8e6..076a210 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -2579,6 +2579,11 @@ transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("materialized views must not use temporary tables or views")));
+ if (is_query_using_gtt(query))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialized views must not use global temporary tables or views")));
+
/*
* A materialized view would either need to save parameters for use in
* maintaining/loading the data or prohibit them entirely. The latter
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 208b4a1..8cc52d9 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3267,17 +3267,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMPORARY
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
@@ -11476,19 +11470,13 @@ OptTempTableName:
}
| GLOBAL TEMPORARY opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED opt_table qualified_name
{
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 77a48b0..7f14d41 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -59,6 +59,7 @@ static void expandTupleDesc(TupleDesc tupdesc, Alias *eref,
List **colnames, List **colvars);
static int specialAttNum(const char *attname);
static bool isQueryUsingTempRelation_walker(Node *node, void *context);
+static bool is_query_using_gtt_walker(Node *node, void *context);
/*
@@ -3425,3 +3426,49 @@ isQueryUsingTempRelation_walker(Node *node, void *context)
isQueryUsingTempRelation_walker,
context);
}
+
+/* check if the query uses global temp table */
+static bool
+is_query_using_gtt_walker(Node *node, void *context)
+{
+ if (node == NULL)
+ return false;
+
+ if (IsA(node, Query))
+ {
+ Query *query = (Query *) node;
+ ListCell *rtable;
+
+ foreach(rtable, query->rtable)
+ {
+ RangeTblEntry *rte = lfirst(rtable);
+
+ if (rte->rtekind == RTE_RELATION)
+ {
+ Relation rel = heap_open(rte->relid, AccessShareLock);
+ char relpersistence = rel->rd_rel->relpersistence;
+
+ heap_close(rel, AccessShareLock);
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ return true;
+ }
+ }
+
+ return query_tree_walker(query,
+ is_query_using_gtt_walker,
+ context,
+ QTW_IGNORE_JOINALIASES);
+ }
+
+ return expression_tree_walker(node,
+ is_query_using_gtt_walker,
+ context);
+}
+
+/* check if the query uses global temp table */
+bool
+is_query_using_gtt(Query *query)
+{
+ return is_query_using_gtt_walker((Node *) query, NULL);
+}
+
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 2406ca7..ab6fc9a 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -359,6 +359,13 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
AlterSeqStmt *altseqstmt;
List *attnamelist;
+ if (cxt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temp table does not yet support serial column")));
+ }
+
/*
* Determine namespace and name to use for the sequence.
*
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index fd85b9c..eb46e94 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2088,6 +2088,11 @@ do_autovacuum(void)
}
continue;
}
+ else if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /* autovacuum skip vacuum global temp table */
+ continue;
+ }
/* Fetch reloptions and the pgstat entry for this table */
relopts = extract_autovac_opts(tuple, pg_class_desc);
@@ -2154,7 +2159,9 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ /* autovacuum skip vacuum global temp table */
+ if (classForm->relpersistence == RELPERSISTENCE_TEMP ||
+ classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7332e6b..f023aa3 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -53,6 +53,8 @@
#include "utils/resowner_private.h"
#include "utils/timestamp.h"
+#include "utils/guc.h"
+#include "catalog/storage_gtt.h"
/* Note: these two macros only work on shared buffers, not local ones! */
#define BufHdrGetBlock(bufHdr) ((Block) (BufferBlocks + ((Size) (bufHdr)->buf_id) * BLCKSZ))
@@ -432,7 +434,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence,
ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy,
- bool *hit);
+ bool *hit, Relation rel);
static bool PinBuffer(BufferDesc *buf, BufferAccessStrategy strategy);
static void PinBuffer_Locked(BufferDesc *buf);
static void UnpinBuffer(BufferDesc *buf, bool fixOwner);
@@ -663,7 +665,8 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
*/
pgstat_count_buffer_read(reln);
buf = ReadBuffer_common(reln->rd_smgr, reln->rd_rel->relpersistence,
- forkNum, blockNum, mode, strategy, &hit);
+ forkNum, blockNum, mode, strategy, &hit,
+ reln);
if (hit)
pgstat_count_buffer_hit(reln);
return buf;
@@ -691,7 +694,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
Assert(InRecovery);
return ReadBuffer_common(smgr, RELPERSISTENCE_PERMANENT, forkNum, blockNum,
- mode, strategy, &hit);
+ mode, strategy, &hit, NULL);
}
@@ -703,7 +706,8 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
static Buffer
ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
- BufferAccessStrategy strategy, bool *hit)
+ BufferAccessStrategy strategy, bool *hit,
+ Relation rel)
{
BufferDesc *bufHdr;
Block bufBlock;
@@ -718,6 +722,15 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
isExtend = (blockNum == P_NEW);
+ /* create storage when first read data page for gtt */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP &&
+ (isExtend || blockNum == 0) &&
+ forkNum == MAIN_FORKNUM &&
+ !gtt_storage_attached(smgr->smgr_rnode.node.relNode))
+ {
+ RelationCreateStorage(smgr->smgr_rnode.node, relpersistence, rel);
+ }
+
TRACE_POSTGRESQL_BUFFER_READ_START(forkNum, blockNum,
smgr->smgr_rnode.node.spcNode,
smgr->smgr_rnode.node.dbNode,
@@ -2798,6 +2811,16 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln)
BlockNumber
RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
{
+ /*
+ * When this backend not init gtt storage
+ * return 0
+ */
+ if (RELATION_IS_GLOBAL_TEMP(relation) &&
+ !gtt_storage_attached(relation->rd_node.relNode))
+ {
+ return 0;
+ }
+
switch (relation->rd_rel->relkind)
{
case RELKIND_SEQUENCE:
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index d7d7335..3b2cc8b 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -21,6 +21,7 @@
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/twophase.h"
+#include "catalog/storage_gtt.h"
#include "commands/async.h"
#include "miscadmin.h"
#include "pgstat.h"
@@ -147,6 +148,7 @@ CreateSharedMemoryAndSemaphores(int port)
size = add_size(size, BTreeShmemSize());
size = add_size(size, SyncScanShmemSize());
size = add_size(size, AsyncShmemSize());
+ size = add_size(size, active_gtt_shared_hash_size());
#ifdef EXEC_BACKEND
size = add_size(size, ShmemBackendArraySize());
#endif
@@ -217,6 +219,8 @@ CreateSharedMemoryAndSemaphores(int port)
SUBTRANSShmemInit();
MultiXactShmemInit();
InitBufferPool();
+ /* global temporary table */
+ active_gtt_shared_hash_init();
/*
* Set up lock manager
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 18a0f62..0d926bd 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -60,6 +60,7 @@
#include "utils/builtins.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
+#include "utils/guc.h"
#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
@@ -3975,3 +3976,77 @@ KnownAssignedXidsReset(void)
LWLockRelease(ProcArrayLock);
}
+
+/*
+ * search all active backend to get oldest frozenxid
+ * for global temp table.
+ */
+int
+list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n)
+{
+ ProcArrayStruct *arrayP = procArray;
+ TransactionId result = InvalidTransactionId;
+ int index;
+ int flags = 0;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ if (max_size > 0)
+ {
+ Assert(pids);
+ Assert(xids);
+ Assert(n);
+ *n = 0;
+ }
+
+ if (max_active_gtt <= 0)
+ return InvalidTransactionId;
+
+ if (RecoveryInProgress())
+ return InvalidTransactionId;
+
+ flags |= PROC_IS_AUTOVACUUM;
+ flags |= PROC_IN_LOGICAL_DECODING;
+
+ LWLockAcquire(ProcArrayLock, LW_SHARED);
+ if (max_size > 0 && max_size < arrayP->numProcs)
+ {
+ LWLockRelease(ProcArrayLock);
+ elog(ERROR, "list_all_gtt_frozenxids require more array");
+ }
+
+ for (index = 0; index < arrayP->numProcs; index++)
+ {
+ int pgprocno = arrayP->pgprocnos[index];
+ volatile PGPROC *proc = &allProcs[pgprocno];
+ volatile PGXACT *pgxact = &allPgXact[pgprocno];
+
+ if (pgxact->vacuumFlags & flags)
+ continue;
+
+ if (proc->databaseId == MyDatabaseId &&
+ TransactionIdIsNormal(proc->session_gtt_frozenxid))
+ {
+ if (result == InvalidTransactionId)
+ result = proc->session_gtt_frozenxid;
+ else if (TransactionIdPrecedes(proc->session_gtt_frozenxid, result))
+ result = proc->session_gtt_frozenxid;
+
+ if (max_size > 0)
+ {
+ pids[i] = proc->pid;
+ xids[i] = proc->session_gtt_frozenxid;
+ i++;
+ }
+ }
+ }
+ LWLockRelease(ProcArrayLock);
+
+ if (max_size > 0)
+ *n = i;
+
+ return result;
+}
+
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 498373f..542cc6b 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -396,6 +396,7 @@ InitProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
@@ -578,6 +579,7 @@ InitAuxiliaryProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 64acc3f..fdbc95b 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -629,6 +629,12 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
*/
if (zero_damaged_pages || InRecovery)
MemSet(buffer, 0, BLCKSZ);
+ else if(SmgrIsTemp(reln) && blocknum == 0 && forknum == MAIN_FORKNUM)
+ {
+ /* global temp table init btree meta page */
+ MemSet(buffer, 0, BLCKSZ);
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..adce760 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -1008,6 +1008,10 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
Assert(backend != InvalidBackendId);
}
break;
+ /* For global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ backend = BackendIdForTempRelations();
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relform->relpersistence);
backend = InvalidBackendId; /* placate compiler */
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index a314ecc..c957d12 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -141,6 +141,7 @@
#include "utils/timestamp.h"
#include "utils/typcache.h"
+#include "catalog/storage_gtt.h"
/* Hooks for plugins to get control when we ask for stats */
get_relation_stats_hook_type get_relation_stats_hook = NULL;
@@ -4586,12 +4587,25 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
}
else if (index->indpred == NIL)
{
- vardata->statsTuple =
- SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(index->indexoid),
- Int16GetDatum(pos + 1),
- BoolGetDatum(false));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ Int16GetDatum(pos + 1),
+ false);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ vardata->statsTuple =
+ SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(index->indexoid),
+ Int16GetDatum(pos + 1),
+ BoolGetDatum(false));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -4670,15 +4684,27 @@ examine_simple_variable(PlannerInfo *root, Var *var,
}
else if (rte->rtekind == RTE_RELATION)
{
- /*
- * Plain table or parent of an inheritance appendrel, so look up the
- * column in pg_statistic
- */
- vardata->statsTuple = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(rte->relid),
- Int16GetDatum(var->varattno),
- BoolGetDatum(rte->inh));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(rte->relid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple = get_gtt_att_statistic(rte->relid,
+ var->varattno,
+ rte->inh);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ /*
+ * Plain table or parent of an inheritance appendrel, so look up the
+ * column in pg_statistic
+ */
+ vardata->statsTuple = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(rte->relid),
+ Int16GetDatum(var->varattno),
+ BoolGetDatum(rte->inh));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -5991,6 +6017,7 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
{
/* Simple variable --- look to stats for the underlying table */
RangeTblEntry *rte = planner_rt_fetch(index->rel->relid, root);
+ char rel_persistence = get_rel_persistence(rte->relid);
Assert(rte->rtekind == RTE_RELATION);
relid = rte->relid;
@@ -6008,6 +6035,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ rte->inh);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6019,6 +6053,8 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/* Expression --- maybe there are stats for the index itself */
relid = index->indexoid;
colnum = 1;
@@ -6034,6 +6070,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6900,6 +6943,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
/* attempt to lookup stats in relation for this index column */
if (attnum != 0)
{
+ char rel_persistence = get_rel_persistence(rte->relid);
+
/* Simple variable -- look to stats for the underlying table */
if (get_relation_stats_hook &&
(*get_relation_stats_hook) (root, rte, attnum, &vardata))
@@ -6912,6 +6957,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
elog(ERROR,
"no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(rte->relid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple =
@@ -6924,6 +6977,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/*
* Looks like we've found an expression column in the index. Let's
* see if there's any stats for it.
@@ -6943,6 +6998,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 27602fa..25a411a 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -34,6 +34,7 @@
#include "catalog/pg_statistic.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "utils/array.h"
@@ -46,6 +47,7 @@
#include "utils/syscache.h"
#include "utils/typcache.h"
+
/* Hook for plugins to get control in get_attavgwidth() */
get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
@@ -2878,6 +2880,18 @@ get_attavgwidth(Oid relid, AttrNumber attnum)
if (stawidth > 0)
return stawidth;
}
+ if (get_rel_persistence(relid) == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ tp = get_gtt_att_statistic(relid, attnum, false);
+ if (!HeapTupleIsValid(tp))
+ return 0;
+
+ stawidth = ((Form_pg_statistic) GETSTRUCT(tp))->stawidth;
+ if (stawidth > 0)
+ return stawidth;
+ else
+ return 0;
+ }
tp = SearchSysCache3(STATRELATTINH,
ObjectIdGetDatum(relid),
Int16GetDatum(attnum),
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index e8d11a1..0c7b455 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1131,6 +1131,16 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_islocaltemp = false;
}
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ {
+ relation->rd_backend = BackendIdForTempRelations();
+ /*
+ * For global temp table, all backend can use
+ * this relation, so rd_islocaltemp always true.
+ */
+ relation->rd_islocaltemp = true;
+ }
+ break;
default:
elog(ERROR, "invalid relpersistence: %c",
relation->rd_rel->relpersistence);
@@ -3312,6 +3322,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_backend = BackendIdForTempRelations();
rel->rd_islocaltemp = true;
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ rel->rd_backend = BackendIdForTempRelations();
+ rel->rd_islocaltemp = true;
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relpersistence);
break;
@@ -3426,6 +3440,9 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
TransactionId freezeXid = InvalidTransactionId;
RelFileNode newrnode;
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ elog(ERROR, "global temp table does not allow setting new relfilenode");
+
/* Allocate a new relfilenode */
newrelfilenode = GetNewRelFileNode(relation->rd_rel->reltablespace, NULL,
persistence);
@@ -3466,7 +3483,7 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
/* handle these directly, at least for now */
SMgrRelation srel;
- srel = RelationCreateStorage(newrnode, persistence);
+ srel = RelationCreateStorage(newrnode, persistence, relation);
smgrclose(srel);
}
break;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f0ed326..d4590a2 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -138,6 +138,18 @@ char *GUC_check_errmsg_string;
char *GUC_check_errdetail_string;
char *GUC_check_errhint_string;
+/*
+ * num = 0 means disable global temp table feature.
+ * global temp table define can still storage in catalog
+ * just can not use.
+ * num > 0 means database can management num active global temp table.
+ */
+#define MIN_NUM_ACTIVE_GTT 0
+#define DEFAULT_NUM_ACTIVE_GTT 1000
+#define MAX_NUM_ACTIVE_GTT 1000000
+
+int max_active_gtt = MIN_NUM_ACTIVE_GTT;
+
static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4);
static void set_config_sourcefile(const char *name, char *sourcefile,
@@ -1962,6 +1974,15 @@ static struct config_bool ConfigureNamesBool[] =
static struct config_int ConfigureNamesInt[] =
{
{
+ {"max_active_global_temporary_table", PGC_POSTMASTER, UNGROUPED,
+ gettext_noop("max active global temporary table."),
+ NULL
+ },
+ &max_active_gtt,
+ DEFAULT_NUM_ACTIVE_GTT, MIN_NUM_ACTIVE_GTT, MAX_NUM_ACTIVE_GTT,
+ NULL, NULL, NULL
+ },
+ {
{"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Forces a switch to the next WAL file if a "
"new file has not been started within N seconds."),
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index a9c868b..3831341 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15535,6 +15535,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
{
char *ftoptions = NULL;
char *srvname = NULL;
+ char *table_type = NULL;
switch (tbinfo->relkind)
{
@@ -15586,9 +15587,15 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
binary_upgrade_set_pg_class_oids(fout, q,
tbinfo->dobj.catId.oid, false);
+ if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED)
+ table_type = "UNLOGGED ";
+ else if (tbinfo->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ table_type = "GLOBAL TEMPORARY ";
+ else
+ table_type = "";
+
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ table_type,
reltypename,
qualrelname);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..34b4683 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_GLOBAL_TEMP 'g' /* global temporary table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h
index 3579d3f..2bde386 100644
--- a/src/include/catalog/storage.h
+++ b/src/include/catalog/storage.h
@@ -19,7 +19,7 @@
#include "storage/smgr.h"
#include "utils/relcache.h"
-extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
+extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel);
extern void RelationDropStorage(Relation rel);
extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
extern void RelationTruncate(Relation rel, BlockNumber nblocks);
diff --git a/src/include/catalog/storage_gtt.h b/src/include/catalog/storage_gtt.h
new file mode 100644
index 0000000..ea41e66
--- /dev/null
+++ b/src/include/catalog/storage_gtt.h
@@ -0,0 +1,39 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.h
+ * prototypes for functions in backend/catalog/storage_gtt.c
+ *
+ * src/include/catalog/storage_gtt.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef STORAGE_GTT_H
+#define STORAGE_GTT_H
+
+#include "access/htup.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
+
+extern Size active_gtt_shared_hash_size(void);
+extern void active_gtt_shared_hash_init(void);
+extern void remember_gtt_storage_info(RelFileNode rnode, Relation rel);
+extern void forget_gtt_storage_info(Oid relid);
+extern bool is_other_backend_use_gtt(RelFileNode node);
+extern bool gtt_storage_attached(Oid relid);
+extern Bitmapset *copy_active_gtt_bitmap(RelFileNode node);
+extern void up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull);
+extern HeapTuple get_gtt_att_statistic(Oid reloid, int attnum, bool inh);
+extern void release_gtt_statistic_cache(HeapTuple tup);
+extern void up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid);
+extern void get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid);
+
+#endif /* STORAGE_H */
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index f7e0781..4f5a353 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -130,4 +130,7 @@ extern Oid attnumTypeId(Relation rd, int attid);
extern Oid attnumCollationId(Relation rd, int attid);
extern bool isQueryUsingTempRelation(Query *query);
+/* global temp table check */
+extern bool is_query_using_gtt(Query *query);
+
#endif /* PARSE_RELATION_H */
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 08e0dc8..297e20c 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -220,6 +220,7 @@ typedef enum BuiltinTrancheIds
LWTRANCHE_TBM,
LWTRANCHE_PARALLEL_APPEND,
LWTRANCHE_SXACT,
+ LWTRANCHE_GTT_CTL,
LWTRANCHE_FIRST_USER_DEFINED
} BuiltinTrancheIds;
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index ac7ee72..74a074a 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -117,6 +117,8 @@ struct PGPROC
Oid tempNamespaceId; /* OID of temp schema this backend is
* using */
+ TransactionId session_gtt_frozenxid; /* session level global temp table relfrozenxid */
+
bool isBackgroundWorker; /* true if background worker. */
/*
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h
index da8b672..8e7d4c7 100644
--- a/src/include/storage/procarray.h
+++ b/src/include/storage/procarray.h
@@ -124,4 +124,6 @@ extern void ProcArraySetReplicationSlotXmin(TransactionId xmin,
extern void ProcArrayGetReplicationSlotXmin(TransactionId *xmin,
TransactionId *catalog_xmin);
+extern int list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n);
+
#endif /* PROCARRAY_H */
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index a93ed77..a782eee 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -276,6 +276,10 @@ extern int tcp_user_timeout;
extern bool trace_sort;
#endif
+/* global temporary table */
+extern int max_active_gtt;
+/* end */
+
/*
* Functions exported by guc.c
*/
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 1385ff3..a5a991d 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -273,6 +273,7 @@ typedef struct StdRdOptions
int parallel_workers; /* max number of parallel workers */
bool vacuum_index_cleanup; /* enables index vacuuming and cleanup */
bool vacuum_truncate; /* enables vacuum to truncate a relation */
+ bool on_commit_delete_rows; /* global temp table */
} StdRdOptions;
#define HEAP_MIN_FILLFACTOR 10
@@ -524,7 +525,8 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP || \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
/*
* RELATION_IS_LOCAL
@@ -603,6 +605,17 @@ typedef struct ViewOptions
*/
#define RelationGetPartitionDesc(relation) ((relation)->rd_partdesc)
+/* global temp table implementations */
+#define RELATION_IS_GLOBAL_TEMP(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+
+#define RELATION_GTT_ON_COMMIT_DELETE(relation) \
+ ((relation)->rd_options && \
+ (relation)->rd_rel->relkind == RELKIND_RELATION && \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ? \
+ ((StdRdOptions *) (relation)->rd_options)->on_commit_delete_rows : false)
+
+#define RelationGetRelPersistence(relation) ((relation)->rd_rel->relpersistence)
+
/* routines in utils/cache/relcache.c */
extern void RelationIncrementReferenceCount(Relation rel);
extern void RelationDecrementReferenceCount(Relation rel);
diff --git a/src/test/regress/expected/gtt_clean.out b/src/test/regress/expected/gtt_clean.out
new file mode 100644
index 0000000..50ca9ac
--- /dev/null
+++ b/src/test/regress/expected/gtt_clean.out
@@ -0,0 +1,7 @@
+reset search_path;
+drop schema gtt cascade;
+NOTICE: drop cascades to 4 other objects
+DETAIL: drop cascades to table gtt.gtt1
+drop cascades to table gtt.gtt2
+drop cascades to table gtt.gtt3
+drop cascades to table gtt.gtt_t_kenyon
diff --git a/src/test/regress/expected/gtt_error.out b/src/test/regress/expected/gtt_error.out
new file mode 100644
index 0000000..80c16dc
--- /dev/null
+++ b/src/test/regress/expected/gtt_error.out
@@ -0,0 +1,106 @@
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+set search_path=gtt_error,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+ERROR: cannot create indexes on global temporary tables using concurrent mode
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+ERROR: not support cluster global temporary tables yet
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+ERROR: ON COMMIT can only be used on temporary tables
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+ERROR: regular table cannot specifie on_commit_delete_rows
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+ERROR: not support create global temporary partition table yet
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+ERROR: not support create global temporary inheritance table yet
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+ERROR: global temp table not support on commit drop clause
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+ERROR: can not defeine global temp table with on commit and with clause at same time
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+--ERROR
+alter table gtt1 rename to gttx;
+ERROR: not support rename global temporary tables yet
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: referenced relation "products" is not a global temp table
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+ERROR: Global temp table does not yet support serial column
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+ERROR: Global temp table does not yet support serial column
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+ERROR: materialized views must not use global temporary tables or views
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+ERROR: only support btree index on global temp table
+create index idx_err on gtt1 using gist (a);
+ERROR: data type integer has no default operator class for access method "gist"
+HINT: You must specify an operator class for the index or define a default operator class for the data type.
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+ERROR: only support btree index on global temp table
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+ERROR: only support btree index on global temp table
+reset search_path;
+drop schema gtt_error cascade;
+NOTICE: drop cascades to 8 other objects
+DETAIL: drop cascades to table gtt_error.gtt1
+drop cascades to table gtt_error.gtt2
+drop cascades to table gtt_error.gtt3
+drop cascades to table gtt_error.tmp_t0
+drop cascades to table gtt_error.tbl_inherits_parent
+drop cascades to table gtt_error.tbl_inherits_parent_global_temp
+drop cascades to table gtt_error.products
+drop cascades to table gtt_error.gtt5
diff --git a/src/test/regress/expected/gtt_parallel_1.out b/src/test/regress/expected/gtt_parallel_1.out
new file mode 100644
index 0000000..30d8a7b
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_1.out
@@ -0,0 +1,84 @@
+set search_path=gtt,sys;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_parallel_2.out b/src/test/regress/expected/gtt_parallel_2.out
new file mode 100644
index 0000000..70bf4a6
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_2.out
@@ -0,0 +1,142 @@
+set search_path=gtt,sys;
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+ 3 | test1
+(3 rows)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test2
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 3 | test3
+(1 row)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 5 | test5
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 6 | test6
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+ count
+--------
+ 100000
+(1 row)
+
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+ QUERY PLAN
+------------------------------------
+ Index Scan using gtt3_pkey on gtt3
+ Index Cond: (a = 300)
+(2 rows)
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+ relname | pg_relation_size | pg_relation_size
+--------------+------------------+------------------
+ gtt_t_kenyon | 450560 | 16384
+(1 row)
+
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+ relname
+--------------
+ gtt_t_kenyon
+(1 row)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_prepare.out b/src/test/regress/expected/gtt_prepare.out
new file mode 100644
index 0000000..9e8f5f0
--- /dev/null
+++ b/src/test/regress/expected/gtt_prepare.out
@@ -0,0 +1,7 @@
+CREATE SCHEMA IF NOT EXISTS gtt;
+set search_path=gtt,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+reset search_path;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 8fb55f0..588f4e5 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -120,3 +120,9 @@ test: fast_default
# run stats by itself because its delay may be insufficient under heavy load
test: stats
+
+# global temp table test
+test: gtt_error
+test: gtt_prepare
+test: gtt_parallel_1 gtt_parallel_2
+test: gtt_clean
diff --git a/src/test/regress/sql/gtt_clean.sql b/src/test/regress/sql/gtt_clean.sql
new file mode 100644
index 0000000..f3cf710
--- /dev/null
+++ b/src/test/regress/sql/gtt_clean.sql
@@ -0,0 +1,6 @@
+
+
+reset search_path;
+
+drop schema gtt cascade;
+
diff --git a/src/test/regress/sql/gtt_error.sql b/src/test/regress/sql/gtt_error.sql
new file mode 100644
index 0000000..e895574
--- /dev/null
+++ b/src/test/regress/sql/gtt_error.sql
@@ -0,0 +1,106 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+
+set search_path=gtt_error,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+
+--ERROR
+alter table gtt1 rename to gttx;
+
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+create index idx_err on gtt1 using gist (a);
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+
+reset search_path;
+
+drop schema gtt_error cascade;
+
diff --git a/src/test/regress/sql/gtt_parallel_1.sql b/src/test/regress/sql/gtt_parallel_1.sql
new file mode 100644
index 0000000..d7d81de
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_1.sql
@@ -0,0 +1,42 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+commit;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+rollback;
+select * from gtt1 order by a;
+
+truncate gtt1;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+select * from gtt1 order by a;
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+
+begin;
+select * from gtt1 order by a;
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_parallel_2.sql b/src/test/regress/sql/gtt_parallel_2.sql
new file mode 100644
index 0000000..cb2f7a6
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_2.sql
@@ -0,0 +1,62 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+commit;
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+truncate gtt3;
+select * from gtt3 order by a;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+truncate gtt3;
+select * from gtt3 order by a;
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+begin;
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_prepare.sql b/src/test/regress/sql/gtt_prepare.sql
new file mode 100644
index 0000000..042d9e6
--- /dev/null
+++ b/src/test/regress/sql/gtt_prepare.sql
@@ -0,0 +1,15 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt;
+
+set search_path=gtt,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+
+reset search_path;
+
--
libgit2 0.23.3
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-07 16:32 ` Konstantin Knizhnik <[email protected]>
2019-11-08 07:50 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-07 16:32 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; +Cc: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 07.11.2019 12:30, 曾文旌(义从) wrote:
>
>> May be the assumption is that all indexes has to be created before GTT start to be used.
> Yes, Currently, GTT's index is only supported and created in an empty table state, and other sessions are not using it.
> There has two improvements pointer:
> 1 Index can create on GTT(A) when the GTT(A) in the current session is not empty, requiring the GTT table to be empty in the other session.
> Index_build needs to be done in the current session just like a normal table. This improvement is relatively easy.
>
> 2 Index can create on GTT(A) when more than one session are using this GTT(A).
> Because when I'm done creating an index of the GTT in this session and setting it to be an valid index, it's not true for the GTT in other sessions.
> Indexes on gtt in other sessions require "rebuild_index" before using it.
> I don't have a better solution right now, maybe you have some suggestions.
It is possible to create index on demand:
Buffer
_bt_getbuf(Relation rel, BlockNumber blkno, int access)
{
Buffer buf;
if (blkno != P_NEW)
{
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
/* Session temporary relation may be not yet initialized for
this backend. */
if (blkno == BTREE_METAPAGE &&
GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
{
Relation heap = RelationIdGetRelation(rel->rd_index->indrelid);
ReleaseBuffer(buf);
DropRelFileNodeLocalBuffers(rel->rd_node, MAIN_FORKNUM, blkno);
btbuild(heap, rel, BuildIndexInfo(rel));
RelationClose(heap);
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
}
else
{
LockBuffer(buf, access);
_bt_checkpage(rel, buf);
}
}
...
This code initializes B-Tree and load data in it when GTT index is
access and is not initialized yet.
It looks a little bit hacker but it works.
I also wonder why you are keeping information about GTT in shared
memory. Looks like the only information we really need to share is
table's metadata.
But it is already shared though catalog. All other GTT related
information is private to backend so I do not see reasons to place it in
shared memory.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 16:32 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-08 07:50 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-08 12:57 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-08 07:50 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年11月8日 上午12:32,Konstantin Knizhnik <[email protected]> 写道:
>
>
>
> On 07.11.2019 12:30, 曾文旌(义从) wrote:
>>
>>> May be the assumption is that all indexes has to be created before GTT start to be used.
>> Yes, Currently, GTT's index is only supported and created in an empty table state, and other sessions are not using it.
>> There has two improvements pointer:
>> 1 Index can create on GTT(A) when the GTT(A) in the current session is not empty, requiring the GTT table to be empty in the other session.
>> Index_build needs to be done in the current session just like a normal table. This improvement is relatively easy.
>>
>> 2 Index can create on GTT(A) when more than one session are using this GTT(A).
>> Because when I'm done creating an index of the GTT in this session and setting it to be an valid index, it's not true for the GTT in other sessions.
>> Indexes on gtt in other sessions require "rebuild_index" before using it.
>> I don't have a better solution right now, maybe you have some suggestions.
> It is possible to create index on demand:
>
> Buffer
> _bt_getbuf(Relation rel, BlockNumber blkno, int access)
> {
> Buffer buf;
>
> if (blkno != P_NEW)
> {
> /* Read an existing block of the relation */
> buf = ReadBuffer(rel, blkno);
> /* Session temporary relation may be not yet initialized for this backend. */
> if (blkno == BTREE_METAPAGE && GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
> {
> Relation heap = RelationIdGetRelation(rel->rd_index->indrelid);
> ReleaseBuffer(buf);
> DropRelFileNodeLocalBuffers(rel->rd_node, MAIN_FORKNUM, blkno);
> btbuild(heap, rel, BuildIndexInfo(rel));
> RelationClose(heap);
> buf = ReadBuffer(rel, blkno);
> LockBuffer(buf, access);
> }
> else
> {
> LockBuffer(buf, access);
> _bt_checkpage(rel, buf);
> }
> }
> ...
In my opinion, it is not a good idea to trigger a btbuild with a select or DML, the cost of which depends on the amount of data in the GTT.
>
>
> This code initializes B-Tree and load data in it when GTT index is access and is not initialized yet.
> It looks a little bit hacker but it works.
>
> I also wonder why you are keeping information about GTT in shared memory. Looks like the only information we really need to share is table's metadata.
> But it is already shared though catalog. All other GTT related information is private to backend so I do not see reasons to place it in shared memory.
The shared hash structure tracks which backend has initialized the GTT storage in order to implement the DDL of the GTT.
As for GTT, there is only one definition(include index on GTT), but each backend may have one data.
For the implementation of drop GTT, I assume that all data and definitions need to be deleted.
>
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
>
Attachments:
[application/octet-stream] global_temporary_table_v2-pg13.patch (136.1K, ../../[email protected]/2-global_temporary_table_v2-pg13.patch)
download | inline diff:
From 979b6f9dda32d0f4735a6a2eb43076c3d822b1d4 Mon Sep 17 00:00:00 2001
From: 义从 <[email protected]>
Date: Fri, 8 Nov 2019 11:35:02 +0800
Subject: [PATCH] global_temporary_table_v2-pg13
---
contrib/Makefile | 3 ++-
contrib/pg_gtt/Makefile | 22 ++++++++++++++++++++++
contrib/pg_gtt/pg_gtt--1.0.sql | 28 ++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.c | 474 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contrib/pg_gtt/pg_gtt.control | 4 ++++
src/backend/access/common/reloptions.c | 15 +++++++++++++++
src/backend/access/gist/gistutil.c | 4 +++-
src/backend/access/hash/hash.c | 4 +++-
src/backend/access/heap/heapam_handler.c | 4 ++--
src/backend/access/heap/vacuumlazy.c | 22 ++++++++++++++++++----
src/backend/access/nbtree/nbtpage.c | 9 ++++++++-
src/backend/access/transam/xlog.c | 4 ++++
src/backend/catalog/Makefile | 2 ++
src/backend/catalog/catalog.c | 2 ++
src/backend/catalog/heap.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
src/backend/catalog/index.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
src/backend/catalog/namespace.c | 7 +++++++
src/backend/catalog/storage.c | 17 ++++++++++++++++-
src/backend/catalog/storage_gtt.c | 813 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/commands/analyze.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
src/backend/commands/cluster.c | 6 ++++++
src/backend/commands/indexcmds.c | 10 ++++++++++
src/backend/commands/lockcmds.c | 3 ++-
src/backend/commands/tablecmds.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
src/backend/commands/vacuum.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
src/backend/optimizer/path/allpaths.c | 8 +++++++-
src/backend/optimizer/plan/planner.c | 2 ++
src/backend/optimizer/util/plancat.c | 33 ++++++++++++++++++++-------------
src/backend/parser/analyze.c | 5 +++++
src/backend/parser/gram.y | 20 ++++----------------
src/backend/parser/parse_relation.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/backend/parser/parse_utilcmd.c | 7 +++++++
src/backend/postmaster/autovacuum.c | 9 ++++++++-
src/backend/storage/buffer/bufmgr.c | 31 +++++++++++++++++++++++++++----
src/backend/storage/ipc/ipci.c | 4 ++++
src/backend/storage/ipc/procarray.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/backend/storage/lmgr/proc.c | 2 ++
src/backend/storage/smgr/md.c | 6 ++++++
src/backend/utils/adt/dbsize.c | 4 ++++
src/backend/utils/adt/selfuncs.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
src/backend/utils/cache/lsyscache.c | 14 ++++++++++++++
src/backend/utils/cache/relcache.c | 19 ++++++++++++++++++-
src/backend/utils/misc/guc.c | 21 +++++++++++++++++++++
src/bin/pg_dump/pg_dump.c | 11 +++++++++--
src/include/catalog/pg_class.h | 1 +
src/include/catalog/storage.h | 2 +-
src/include/catalog/storage_gtt.h | 39 +++++++++++++++++++++++++++++++++++++++
src/include/parser/parse_relation.h | 3 +++
src/include/storage/lwlock.h | 1 +
src/include/storage/proc.h | 2 ++
src/include/storage/procarray.h | 2 ++
src/include/utils/guc.h | 4 ++++
src/include/utils/rel.h | 15 ++++++++++++++-
src/test/regress/expected/gtt_clean.out | 7 +++++++
src/test/regress/expected/gtt_error.out | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_1.out | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_parallel_2.out | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/expected/gtt_prepare.out | 7 +++++++
src/test/regress/parallel_schedule | 6 ++++++
src/test/regress/sql/gtt_clean.sql | 6 ++++++
src/test/regress/sql/gtt_error.sql | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_1.sql | 42 ++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_parallel_2.sql | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/gtt_prepare.sql | 15 +++++++++++++++
64 files changed, 2845 insertions(+), 170 deletions(-)
create mode 100644 contrib/pg_gtt/Makefile
create mode 100644 contrib/pg_gtt/pg_gtt--1.0.sql
create mode 100644 contrib/pg_gtt/pg_gtt.c
create mode 100644 contrib/pg_gtt/pg_gtt.control
create mode 100644 src/backend/catalog/storage_gtt.c
create mode 100644 src/include/catalog/storage_gtt.h
create mode 100644 src/test/regress/expected/gtt_clean.out
create mode 100644 src/test/regress/expected/gtt_error.out
create mode 100644 src/test/regress/expected/gtt_parallel_1.out
create mode 100644 src/test/regress/expected/gtt_parallel_2.out
create mode 100644 src/test/regress/expected/gtt_prepare.out
create mode 100644 src/test/regress/sql/gtt_clean.sql
create mode 100644 src/test/regress/sql/gtt_error.sql
create mode 100644 src/test/regress/sql/gtt_parallel_1.sql
create mode 100644 src/test/regress/sql/gtt_parallel_2.sql
create mode 100644 src/test/regress/sql/gtt_prepare.sql
diff --git a/contrib/Makefile b/contrib/Makefile
index 92184ed..4b1a596 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -48,7 +48,8 @@ SUBDIRS = \
tsm_system_rows \
tsm_system_time \
unaccent \
- vacuumlo
+ vacuumlo \
+ pg_gtt
ifeq ($(with_openssl),yes)
SUBDIRS += sslinfo
diff --git a/contrib/pg_gtt/Makefile b/contrib/pg_gtt/Makefile
new file mode 100644
index 0000000..1d2ef64
--- /dev/null
+++ b/contrib/pg_gtt/Makefile
@@ -0,0 +1,22 @@
+# contrib/pg_gtt/Makefile
+
+MODULE_big = pg_gtt
+OBJS = pg_gtt.o
+
+EXTENSION = pg_gtt
+DATA = pg_gtt--1.0.sql
+
+LDFLAGS_SL += $(filter -lm, $(LIBS))
+
+NO_INSTALLCHECK = 1
+
+ifdef USE_PGXS
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
+else
+subdir = contrib/pg_pfs
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
diff --git a/contrib/pg_gtt/pg_gtt--1.0.sql b/contrib/pg_gtt/pg_gtt--1.0.sql
new file mode 100644
index 0000000..3f794d7
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt--1.0.sql
@@ -0,0 +1,28 @@
+/* contrib/pg_gtt/pg_gtt--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION pg_gtt" to load this file. \quit
+
+
+CREATE FUNCTION pg_gtt_att_statistic(text, text, int)
+RETURNS setof pg_statistic
+AS 'MODULE_PATHNAME','pg_gtt_att_statistic'
+LANGUAGE C STRICT;
+
+CREATE TYPE relstats_type AS (relpages int4, reltuples float4, relallvisible int4, relfrozenxid xid, relminmxid xid);
+CREATE TYPE rel_vac_type AS (pid int4, relfrozenxid xid, relminmxid xid);
+
+CREATE FUNCTION pg_gtt_relstats(text, text)
+RETURNS relstats_type
+AS 'MODULE_PATHNAME','pg_gtt_relstats'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_gtt_attached_pid(text, text)
+RETURNS setof int4
+AS 'MODULE_PATHNAME','pg_gtt_attached_pid'
+LANGUAGE C STRICT;
+
+CREATE FUNCTION pg_list_gtt_relfrozenxids()
+RETURNS setof rel_vac_type
+AS 'MODULE_PATHNAME','pg_list_gtt_relfrozenxids'
+LANGUAGE C STRICT;
diff --git a/contrib/pg_gtt/pg_gtt.c b/contrib/pg_gtt/pg_gtt.c
new file mode 100644
index 0000000..19e1ec0
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.c
@@ -0,0 +1,474 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_gtt.c
+ * code to management function for global temparary table
+ *
+ * IDENTIFICATION
+ * contrib/pg_gtt/pg_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "postgres.h"
+
+#include <unistd.h>
+#include <sys/time.h>
+#include "port.h"
+#include "access/htup_details.h"
+#include "access/table.h"
+#include "access/xlog.h"
+#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/namespace.h"
+#include "catalog/pg_class.h"
+#include "funcapi.h"
+#include "storage/ipc.h"
+#include "storage/shmem.h"
+#include "storage/lwlock.h"
+#include "storage/procarray.h"
+#include "storage/proc.h"
+#include "tcop/utility.h"
+#include "utils/builtins.h"
+#include "utils/memutils.h"
+#include "utils/timeout.h"
+#include "utils/guc.h"
+#include "utils/lsyscache.h"
+#include "utils/rel.h"
+#include <nodes/makefuncs.h>
+#include "storage/sinvaladt.h"
+#include "miscadmin.h"
+
+PG_MODULE_MAGIC;
+
+static Oid pg_get_relid(const char *relname, char *schema);
+
+Datum pg_gtt_att_statistic(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_att_statistic);
+
+Datum pg_gtt_relstats(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_relstats);
+
+Datum pg_gtt_attached_pid(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_gtt_attached_pid);
+
+Datum pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(pg_list_gtt_relfrozenxids);
+
+void _PG_init(void);
+void _PG_fini(void);
+
+void
+_PG_init(void)
+{
+ return;
+}
+
+void
+_PG_fini(void)
+{
+ return;
+}
+
+static Oid
+pg_get_relid(const char *relname, char *schema)
+{
+ Oid relid;
+ RangeVar *rv = makeRangeVar(schema, (char *)relname, -1);
+
+ relid = RangeVarGetRelid(rv, NoLock, true);
+
+ pfree(rv);
+ return relid;
+}
+
+Datum
+pg_gtt_att_statistic(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Relation rel = NULL;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ int attnum = PG_GETARG_INT32(2);
+ Oid reloid;
+ char rel_persistence;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(31);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starelid",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "staattnum",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "stainherit",
+ BOOLOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "stanullfrac",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "stawidth",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 6, "stadistinct",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 7, "stakind1",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 8, "stakind2",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 9, "stakind3",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 10, "stakind4",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 11, "stakind5",
+ INT2OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 12, "staop1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 13, "staop2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 14, "staop3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 15, "staop4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 16, "staop5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 17, "stacoll1",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 18, "stacoll2",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 19, "stacoll3",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 20, "stacoll4",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 21, "stacoll5",
+ OIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 22, "stanumbers1",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 23, "stanumbers2",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 24, "stanumbers3",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 25, "stanumbers4",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 26, "stanumbers5",
+ FLOAT4ARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 27, "stavalues1",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 28, "stavalues2",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 29, "stavalues3",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 30, "stavalues4",
+ ANYARRAYOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 31, "stavalues5",
+ ANYARRAYOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ tuple = get_gtt_att_statistic(reloid, attnum, false);
+ if (tuple)
+ {
+ HeapTuple tp = heap_copytuple(tuple);
+ tuplestore_puttuple(tupstore, tp);
+ }
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_relstats(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[5];
+ bool isnull[5];
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
+ uint32 relfrozenxid = 0;
+ uint32 relminmxid = 0;
+ Relation rel = NULL;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(5);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpages",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "reltuples",
+ FLOAT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relallvisible",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 4, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 5, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ table_close(rel, NoLock);
+ return (Datum) 0;
+ }
+
+ get_gtt_relstats(reloid,
+ &relpages, &reltuples, &relallvisible,
+ &relfrozenxid, &relminmxid);
+
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(relpages);
+ values[1] = Float4GetDatum((float4)reltuples);
+ values[2] = Int32GetDatum(relallvisible);
+ values[3] = UInt32GetDatum(relfrozenxid);
+ values[4] = UInt32GetDatum(relminmxid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ tuplestore_donestoring(tupstore);
+
+ table_close(rel, NoLock);
+ return (Datum) 0;
+}
+
+Datum
+pg_gtt_attached_pid(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ char *relname = text_to_cstring(PG_GETARG_TEXT_PP(0));
+ char *schema = text_to_cstring(PG_GETARG_TEXT_PP(1));
+ Oid reloid;
+ char rel_persistence;
+ Datum values[1];
+ bool isnull[1];
+ Relation rel = NULL;
+ PGPROC *proc = NULL;
+ Bitmapset *map = NULL;
+ pid_t pid = 0;
+ int backendid = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(1);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (schema == NULL)
+ schema = "public";
+
+ reloid = pg_get_relid(relname, schema);
+ if (reloid == InvalidOid)
+ {
+ elog(WARNING, "relation %s.%s does not exist", schema, relname);
+ return (Datum) 0;
+ }
+
+ rel = table_open(reloid, AccessShareLock);
+ rel_persistence = get_rel_persistence(reloid);
+ if (rel_persistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ elog(WARNING, "relation %s.%s not global temp table", schema, relname);
+ return (Datum) 0;
+ }
+
+ map = copy_active_gtt_bitmap(rel->rd_node);
+ if (map)
+ {
+ backendid = bms_first_member(map);
+
+ do
+ {
+ proc = BackendIdGetProc(backendid);
+ pid = proc->pid;
+ if (pid > 0)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pid);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ backendid = bms_next_member(map, backendid);
+ } while (backendid > 0);
+
+ pfree(map);
+ }
+
+ tuplestore_donestoring(tupstore);
+ table_close(rel, NoLock);
+
+ return (Datum) 0;
+}
+
+Datum
+pg_list_gtt_relfrozenxids(PG_FUNCTION_ARGS)
+{
+ ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+ TupleDesc tupdesc;
+ Tuplestorestate *tupstore;
+ MemoryContext oldcontext;
+ HeapTuple tuple;
+ Datum values[3];
+ bool isnull[3];
+ int num_xid = MaxBackends + 1;
+ int *pids = NULL;
+ uint32 *xids = NULL;
+ int i = 0;
+ int j = 0;
+ uint32 oldest = 0;
+
+ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("set-valued function called in context that cannot accept a set")));
+ if (!(rsinfo->allowedModes & SFRM_Materialize))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialize mode required, but it is not allowed in this context")));
+
+ rsinfo->returnMode = SFRM_Materialize;
+ rsinfo->setResult = NULL;
+ rsinfo->setDesc = NULL;
+
+ tupdesc = CreateTemplateTupleDesc(3);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 1, "pid",
+ INT4OID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 2, "relfrozenxid",
+ XIDOID, -1, 0);
+ TupleDescInitEntry(tupdesc, (AttrNumber) 3, "relminmxid",
+ XIDOID, -1, 0);
+
+ oldcontext = MemoryContextSwitchTo(
+ rsinfo->econtext->ecxt_per_query_memory);
+ tupstore = tuplestore_begin_heap(true, false, work_mem);
+ rsinfo->setResult = tupstore;
+ rsinfo->setDesc = tupdesc;
+ MemoryContextSwitchTo(oldcontext);
+
+ if (max_active_gtt <= 0)
+ return (Datum) 0;
+
+ if (RecoveryInProgress())
+ return (Datum) 0;
+
+ pids = palloc0(sizeof(int) * num_xid);
+ xids = palloc0(sizeof(int) * num_xid);
+ oldest = list_all_session_gtt_frozenxids(num_xid, pids, xids, &i);
+ if (i > 0)
+ {
+ if (i > 0)
+ {
+ pids[i] = 0;
+ xids[i] = oldest;
+ i++;
+ }
+
+ for(j = 0; j < i; j++)
+ {
+ memset(isnull, false, sizeof(isnull));
+ memset(values, 0, sizeof(values));
+ values[0] = Int32GetDatum(pids[j]);
+ values[1] = UInt32GetDatum(xids[j]);
+ values[2] = UInt32GetDatum(0);
+ tuple = heap_form_tuple(tupdesc, values, isnull);
+ tuplestore_puttuple(tupstore, tuple);
+ }
+ }
+ tuplestore_donestoring(tupstore);
+ pfree(pids);
+ pfree(xids);
+
+ return (Datum) 0;
+}
+
diff --git a/contrib/pg_gtt/pg_gtt.control b/contrib/pg_gtt/pg_gtt.control
new file mode 100644
index 0000000..342af1d
--- /dev/null
+++ b/contrib/pg_gtt/pg_gtt.control
@@ -0,0 +1,4 @@
+comment = 'pg_gtt'
+default_version = '1.0'
+module_pathname = '$libdir/pg_gtt'
+relocatable = true
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index d8790ad..7e30039 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -158,6 +158,19 @@ static relopt_bool boolRelOpts[] =
},
true
},
+ /*
+ * For global temp table only
+ * use AccessExclusiveLock for ensure safety
+ */
+ {
+ {
+ "on_commit_delete_rows",
+ "global temp table on commit options",
+ RELOPT_KIND_HEAP,
+ ShareUpdateExclusiveLock
+ },
+ true
+ },
/* list terminator */
{{NULL}}
};
@@ -1475,6 +1488,8 @@ bytea *
default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
{
static const relopt_parse_elt tab[] = {
+ {"on_commit_delete_rows", RELOPT_TYPE_BOOL,
+ offsetof(StdRdOptions, on_commit_delete_rows)},
{"fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor)},
{"autovacuum_enabled", RELOPT_TYPE_BOOL,
offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index a23dec7..79bdb26 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1014,7 +1014,9 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ /* global temp is same as local temp table */
+ if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 5cc30da..49b7d2e 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -148,7 +148,9 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
* metapage, nor the first bitmap page.
*/
sort_threshold = (maintenance_work_mem * 1024L) / BLCKSZ;
- if (index->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ if (!(index->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ index->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
sort_threshold = Min(sort_threshold, NBuffers);
else
sort_threshold = Min(sort_threshold, NLocBuffer);
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..24c56b9 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -601,7 +601,7 @@ heapam_relation_set_new_filenode(Relation rel,
*/
*minmulti = GetOldestMultiXactId();
- srel = RelationCreateStorage(*newrnode, persistence);
+ srel = RelationCreateStorage(*newrnode, persistence, rel);
/*
* If required, set up an init fork for an unlogged table so that it can
@@ -654,7 +654,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(*newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index a3c4a1d..03fac55 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -60,6 +60,7 @@
#include "utils/pg_rusage.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/*
* Space/time tradeoff parameters: do these need to be user-tunable?
@@ -214,8 +215,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
Assert(params->truncate != VACOPT_TERNARY_DEFAULT);
/* not every AM requires these to be valid, but heap does */
- Assert(TransactionIdIsNormal(onerel->rd_rel->relfrozenxid));
- Assert(MultiXactIdIsValid(onerel->rd_rel->relminmxid));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relfrozenxid == InvalidTransactionId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && TransactionIdIsNormal(onerel->rd_rel->relfrozenxid)));
+ Assert((RELATION_IS_GLOBAL_TEMP(onerel) && onerel->rd_rel->relminmxid == InvalidMultiXactId) ||
+ (!RELATION_IS_GLOBAL_TEMP(onerel) && MultiXactIdIsValid(onerel->rd_rel->relminmxid)));
/* measure elapsed time iff autovacuum logging requires it */
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
@@ -274,8 +277,19 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
vacrelstats = (LVRelStats *) palloc0(sizeof(LVRelStats));
- vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
- vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ /* get relstat from gtt localhash */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ &vacrelstats->old_rel_pages,
+ &vacrelstats->old_live_tuples,
+ NULL, NULL, NULL);
+ }
+ else
+ {
+ vacrelstats->old_rel_pages = onerel->rd_rel->relpages;
+ vacrelstats->old_live_tuples = onerel->rd_rel->reltuples;
+ }
vacrelstats->num_index_scans = 0;
vacrelstats->pages_removed = 0;
vacrelstats->lock_waiter_detected = false;
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 268f869..8b2e610 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -763,7 +763,14 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+
+ /* global temp table may be not yet initialized for this backend. */
+ if (RELATION_IS_GLOBAL_TEMP(rel) &&
+ blkno == BTREE_METAPAGE &&
+ PageIsNew(BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2e3cc51..b8a57b6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6314,6 +6314,10 @@ StartupXLOG(void)
else
recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
+ /* clean temp relation files */
+ if (max_active_gtt > 0)
+ RemovePgTempFiles();
+
/*
* Check for signal files, and if so set up state for offline recovery
*/
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index a511532..665b7fb 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -44,6 +44,8 @@ OBJS = \
storage.o \
toasting.o
+OBJS += storage_gtt.o
+
BKIFILES = postgres.bki postgres.description postgres.shdescription
include $(top_srcdir)/src/backend/common.mk
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 1af31c2..ecb516e 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -399,7 +399,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
switch (relpersistence)
{
+ /* global temp table is same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
break;
case RELPERSISTENCE_UNLOGGED:
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index b7bcdd9..6e089dd 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -61,6 +61,7 @@
#include "catalog/pg_type.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "commands/tablecmds.h"
#include "commands/typecmds.h"
#include "executor/executor.h"
@@ -100,6 +101,7 @@ static void AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -405,6 +407,10 @@ heap_create(const char *relname,
relpersistence,
relkind);
+ /* global temp table not create storage file when catalog create */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ create_storage = false;
+
/*
* Have the storage manager create the relation's disk file, if needed.
*
@@ -428,7 +434,7 @@ heap_create(const char *relname,
case RELKIND_INDEX:
case RELKIND_SEQUENCE:
- RelationCreateStorage(rel->rd_node, relpersistence);
+ RelationCreateStorage(rel->rd_node, relpersistence, rel);
break;
case RELKIND_RELATION:
@@ -925,6 +931,7 @@ AddNewRelationTuple(Relation pg_class_desc,
Oid reloftype,
Oid relowner,
char relkind,
+ char relpersistence,
TransactionId relfrozenxid,
TransactionId relminmxid,
Datum relacl,
@@ -963,8 +970,18 @@ AddNewRelationTuple(Relation pg_class_desc,
break;
}
- new_rel_reltup->relfrozenxid = relfrozenxid;
- new_rel_reltup->relminmxid = relminmxid;
+ /* global temp table not remember transaction info in catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ new_rel_reltup->relfrozenxid = InvalidTransactionId;
+ new_rel_reltup->relminmxid = InvalidMultiXactId;
+ }
+ else
+ {
+ new_rel_reltup->relfrozenxid = relfrozenxid;
+ new_rel_reltup->relminmxid = relminmxid;
+ }
+
new_rel_reltup->relowner = relowner;
new_rel_reltup->reltype = new_type_oid;
new_rel_reltup->reloftype = reloftype;
@@ -1326,6 +1343,7 @@ heap_create_with_catalog(const char *relname,
reloftypeid,
ownerid,
relkind,
+ relpersistence,
relfrozenxid,
relminmxid,
PointerGetDatum(relacl),
@@ -1410,11 +1428,15 @@ heap_create_with_catalog(const char *relname,
*/
StoreConstraints(new_rel_desc, cooked_constraints, is_internal);
- /*
- * If there's a special on-commit action, remember it
- */
- if (oncommit != ONCOMMIT_NOOP)
- register_on_commit_action(relid, oncommit);
+ /* global temp table register action when storage init */
+ if (relpersistence != RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /*
+ * If there's a special on-commit action, remember it
+ */
+ if (oncommit != ONCOMMIT_NOOP)
+ register_on_commit_action(relid, oncommit);
+ }
/*
* ok, the relation has been cataloged, so close our relations and return
@@ -1906,6 +1928,13 @@ heap_drop_with_catalog(Oid relid)
if (relid == defaultPartOid)
update_default_partition_oid(parentOid, InvalidOid);
+ /* We allow to drop global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ if (is_other_backend_use_gtt(rel->rd_node))
+ elog(ERROR, "can not drop relation when other backend attached this global temp table");
+ }
+
/*
* Schedule unlinking of the relation's physical files at commit.
*/
@@ -3132,9 +3161,10 @@ RemoveStatistics(Oid relid, AttrNumber attnum)
*
* The routine will truncate and then reconstruct the indexes on
* the specified relation. Caller must hold exclusive lock on rel.
+ *
*/
static void
-RelationTruncateIndexes(Relation heapRelation)
+RelationTruncateIndexes(Relation heapRelation, LOCKMODE lockmode)
{
ListCell *indlist;
@@ -3146,7 +3176,7 @@ RelationTruncateIndexes(Relation heapRelation)
IndexInfo *indexInfo;
/* Open the index relation; use exclusive lock, just to be sure */
- currentIndex = index_open(indexId, AccessExclusiveLock);
+ currentIndex = index_open(indexId, lockmode);
/* Fetch info needed for index_build */
indexInfo = BuildIndexInfo(currentIndex);
@@ -3185,8 +3215,13 @@ heap_truncate(List *relids)
{
Oid rid = lfirst_oid(cell);
Relation rel;
+ LOCKMODE lockmode = AccessExclusiveLock;
- rel = table_open(rid, AccessExclusiveLock);
+ /* truncate global temp table only need RowExclusiveLock */
+ if (get_rel_persistence(rid) == RELPERSISTENCE_GLOBAL_TEMP)
+ lockmode = RowExclusiveLock;
+
+ rel = table_open(rid, lockmode);
relations = lappend(relations, rel);
}
@@ -3219,6 +3254,8 @@ void
heap_truncate_one_rel(Relation rel)
{
Oid toastrelid;
+ LOCKMODE lockmode = AccessExclusiveLock;
+ bool truncate_toastrel = false;
/*
* Truncate the relation. Partitioned tables have no storage, so there is
@@ -3227,23 +3264,40 @@ heap_truncate_one_rel(Relation rel)
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
return;
+ toastrelid = rel->rd_rel->reltoastrelid;
+
+ /*
+ * Truncate global temp table only need RowExclusiveLock
+ */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ lockmode = RowExclusiveLock;
+ if (OidIsValid(toastrelid) &&
+ gtt_storage_attached(toastrelid))
+ truncate_toastrel = true;
+ }
+ else if (OidIsValid(toastrelid))
+ truncate_toastrel = true;
+
/* Truncate the underlying relation */
table_relation_nontransactional_truncate(rel);
/* If the relation has indexes, truncate the indexes too */
- RelationTruncateIndexes(rel);
+ RelationTruncateIndexes(rel, lockmode);
/* If there is a toast table, truncate that too */
- toastrelid = rel->rd_rel->reltoastrelid;
- if (OidIsValid(toastrelid))
+ if (truncate_toastrel)
{
- Relation toastrel = table_open(toastrelid, AccessExclusiveLock);
+ Relation toastrel = table_open(toastrelid, lockmode);
table_relation_nontransactional_truncate(toastrel);
- RelationTruncateIndexes(toastrel);
+ RelationTruncateIndexes(toastrel, lockmode);
/* keep the lock... */
table_close(toastrel, NoLock);
}
+
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ up_gtt_relstats(rel, 0, 0, 0, RecentXmin, InvalidMultiXactId);
}
/*
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 7c34509..a9ed190 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -52,6 +52,7 @@
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
#include "catalog/storage.h"
+#include "catalog/storage_gtt.h"
#include "commands/event_trigger.h"
#include "commands/progress.h"
#include "commands/tablecmds.h"
@@ -879,6 +880,26 @@ index_create(Relation heapRelation,
indexRelationName, RelationGetRelationName(heapRelation))));
}
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ if (accessMethodObjectId != BTREE_AM_OID)
+ elog(ERROR, "only support btree index on global temp table");
+
+ /* We allow to create index on global temp table only this session use it */
+ if (is_other_backend_use_gtt(heapRelation->rd_node))
+ elog(ERROR, "can not create index when have other backend attached this global temp table");
+
+ /* No support create index on global temp table use concurrent mode yet */
+ if (concurrent)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot create indexes on global temporary tables using concurrent mode")));
+
+ /* if global temp table not init storage, then skip build index */
+ if (!gtt_storage_attached(heapRelation->rd_node.relNode))
+ flags |= INDEX_CREATE_SKIP_BUILD;
+ }
+
/*
* construct tuple descriptor for index tuples
*/
@@ -2047,6 +2068,13 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
*/
CheckTableNotInUse(userIndexRelation, "DROP INDEX");
+ /* We allow to drop index on global temp table only this session use it */
+ if (RELATION_IS_GLOBAL_TEMP(userHeapRelation))
+ {
+ if (is_other_backend_use_gtt(userHeapRelation->rd_node))
+ elog(ERROR, "can not drop index when other backend attached this global temp table");
+ }
+
/*
* Drop Index Concurrently is more or less the reverse process of Create
* Index Concurrently.
@@ -2688,20 +2716,29 @@ index_update_stats(Relation rel,
else /* don't bother for indexes */
relallvisible = 0;
- if (rd_rel->relpages != (int32) relpages)
+ /* update index stats into localhash for global temp table */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
{
- rd_rel->relpages = (int32) relpages;
- dirty = true;
+ up_gtt_relstats(rel, relpages, reltuples, relallvisible,
+ InvalidTransactionId, InvalidMultiXactId);
}
- if (rd_rel->reltuples != (float4) reltuples)
- {
- rd_rel->reltuples = (float4) reltuples;
- dirty = true;
- }
- if (rd_rel->relallvisible != (int32) relallvisible)
+ else
{
- rd_rel->relallvisible = (int32) relallvisible;
- dirty = true;
+ if (rd_rel->relpages != (int32) relpages)
+ {
+ rd_rel->relpages = (int32) relpages;
+ dirty = true;
+ }
+ if (rd_rel->reltuples != (float4) reltuples)
+ {
+ rd_rel->reltuples = (float4) reltuples;
+ dirty = true;
+ }
+ if (rd_rel->relallvisible != (int32) relallvisible)
+ {
+ rd_rel->relallvisible = (int32) relallvisible;
+ dirty = true;
+ }
}
}
@@ -2816,6 +2853,13 @@ index_build(Relation heapRelation,
pgstat_progress_update_multi_param(6, index, val);
}
+ /* POALR */
+ if (RELATION_IS_GLOBAL_TEMP(indexRelation))
+ {
+ if (!gtt_storage_attached(indexRelation->rd_node.relNode))
+ RelationCreateStorage(indexRelation->rd_node, RELPERSISTENCE_GLOBAL_TEMP, indexRelation);
+ }
+
/*
* Call the access method's build procedure
*/
@@ -3148,12 +3192,22 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
/*
* Scan the index and gather up all the TIDs into a tuplesort object.
*/
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = indexRelation;
ivinfo.analyze_only = false;
ivinfo.report_progress = true;
ivinfo.estimated_count = true;
ivinfo.message_level = DEBUG2;
- ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
+
+ /* get relstats abort global temp table from hashtable, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(heapRelation))
+ {
+ get_gtt_relstats(RelationGetRelid(heapRelation),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = heapRelation->rd_rel->reltuples;
ivinfo.strategy = NULL;
/*
@@ -3411,6 +3465,15 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
errmsg("cannot reindex temporary tables of other sessions")));
/*
+ * Because global temp table cannot change relfilenode
+ * no support reindex on global temp table yet.
+ */
+ if (RELATION_IS_GLOBAL_TEMP(iRel))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot reindex global temporary tables")));
+
+ /*
* Also check for active uses of the index in the current transaction; we
* don't want to reindex underneath an open indexscan.
*/
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index e251f5a..97bf247 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -647,6 +647,13 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
errmsg("cannot create temporary relation in non-temporary schema")));
}
break;
+ /* global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ if (isAnyTempNamespace(nspid))
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot create global temp relations in temporary schemas")));
+ break;
case RELPERSISTENCE_PERMANENT:
if (isTempOrTempToastNamespace(nspid))
newRelation->relpersistence = RELPERSISTENCE_TEMP;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 625af8d..baf7d61 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -28,6 +28,7 @@
#include "access/xlogutils.h"
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
#include "storage/freespace.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
@@ -74,9 +75,10 @@ static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */
*
* This function is transactional. The creation is WAL-logged, and if the
* transaction aborts later on, the storage will be destroyed.
+ *
*/
SMgrRelation
-RelationCreateStorage(RelFileNode rnode, char relpersistence)
+RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel)
{
PendingRelDelete *pending;
SMgrRelation srel;
@@ -86,6 +88,8 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
switch (relpersistence)
{
case RELPERSISTENCE_TEMP:
+ /* global temp table use same storage strategy as local temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
backend = BackendIdForTempRelations();
needs_wal = false;
break;
@@ -118,6 +122,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
pending->next = pendingDeletes;
pendingDeletes = pending;
+ /* remember global temp table storage info to localhash */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP && rel)
+ remember_gtt_storage_info(rnode, rel);
+
return srel;
}
@@ -487,8 +495,15 @@ smgrDoPendingDeletes(bool isCommit)
smgrdounlinkall(srels, nrels, false);
for (i = 0; i < nrels; i++)
+ {
smgrclose(srels[i]);
+ /* clean global temp table flags when transaction commit or rollback */
+ if (SmgrIsTemp(srels[i]) &&
+ gtt_storage_attached(srels[i]->smgr_rnode.node.relNode))
+ forget_gtt_storage_info(srels[i]->smgr_rnode.node.relNode);
+ }
+
pfree(srels);
}
}
diff --git a/src/backend/catalog/storage_gtt.c b/src/backend/catalog/storage_gtt.c
new file mode 100644
index 0000000..0749afc
--- /dev/null
+++ b/src/backend/catalog/storage_gtt.c
@@ -0,0 +1,813 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.c
+ * code to create and destroy physical storage for global temparary table
+ *
+ * IDENTIFICATION
+ * src/backend/catalog/storage_gtt.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+
+#include "access/visibilitymap.h"
+#include "access/xact.h"
+#include "access/xlog.h"
+#include "access/xloginsert.h"
+#include "access/xlogutils.h"
+#include "access/htup_details.h"
+#include "access/multixact.h"
+#include "catalog/storage.h"
+#include "catalog/storage_xlog.h"
+#include "catalog/storage_gtt.h"
+#include "catalog/heap.h"
+#include "commands/tablecmds.h"
+#include "nodes/primnodes.h"
+#include "nodes/pg_list.h"
+#include "miscadmin.h"
+#include "storage/freespace.h"
+#include "storage/smgr.h"
+#include "storage/ipc.h"
+#include "storage/proc.h"
+#include "storage/lwlock.h"
+#include "storage/shmem.h"
+#include "utils/memutils.h"
+#include "utils/rel.h"
+#include "utils/hsearch.h"
+#include "utils/catcache.h"
+#include <utils/relcache.h>
+#include "utils/inval.h"
+#include "utils/guc.h"
+#include "utils/guc.h"
+
+
+/* Copy from bitmapset.c, because gtt used the function in bitmapset.c */
+#define WORDNUM(x) ((x) / BITS_PER_BITMAPWORD)
+#define BITNUM(x) ((x) % BITS_PER_BITMAPWORD)
+
+#define BITMAPSET_SIZE(nwords) \
+ (offsetof(Bitmapset, words) + (nwords) * sizeof(bitmapword))
+
+static bool gtt_cleaner_exit_registered = false;
+static HTAB *gtt_storage_local_hash = NULL;
+static HTAB *active_gtt_shared_hash = NULL;
+static MemoryContext gtt_relstats_context = NULL;
+
+/* relfrozenxid of all gtts in the current session */
+static List *gtt_session_relfrozenxid_list = NIL;
+static TransactionId gtt_session_frozenxid = InvalidTransactionId;
+
+typedef struct gtt_ctl_data
+{
+ LWLock lock;
+ int max_entry;
+ int entry_size;
+}gtt_ctl_data;
+
+static gtt_ctl_data *gtt_shared_ctl = NULL;
+
+typedef struct
+{
+ RelFileNode rnode;
+ Bitmapset *map;
+ /* bitmap data */
+} gtt_shared_hash_entry;
+
+typedef struct
+{
+ Oid relid;
+
+ Oid spcnode;
+ /* pg_class stat */
+ int32 relpages;
+ float4 reltuples;
+ int32 relallvisible;
+ TransactionId relfrozenxid;
+ TransactionId relminmxid;
+ char relkind;
+ bool on_commit_delete;
+
+ /* pg_statistic */
+ int natts;
+ int *attnum;
+ HeapTuple *att_stat_tups;
+} gtt_local_hash_entry;
+
+static Size action_gtt_shared_hash_entry_size(void);
+static void gtt_storage_checkin(RelFileNode rnode);
+static void gtt_storage_checkout(RelFileNode rnode, bool skiplock);
+static void gtt_storage_removeall(int code, Datum arg);
+static void insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid);
+static void remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid);
+static void set_gtt_session_relfrozenxid(void);
+
+static Size
+action_gtt_shared_hash_entry_size(void)
+{
+ int wordnum;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ wordnum = WORDNUM(MaxBackends + 1);
+ hash_entry_size += MAXALIGN(sizeof(gtt_shared_hash_entry));
+ hash_entry_size += MAXALIGN(BITMAPSET_SIZE(wordnum + 1));
+
+ return hash_entry_size;
+}
+
+Size
+active_gtt_shared_hash_size(void)
+{
+ Size size = 0;
+ Size hash_entry_size = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ size = MAXALIGN(sizeof(gtt_ctl_data));
+ hash_entry_size = action_gtt_shared_hash_entry_size();
+ size += hash_estimate_size(max_active_gtt, hash_entry_size);
+
+ return size;
+}
+
+void
+active_gtt_shared_hash_init(void)
+{
+ HASHCTL info;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ gtt_shared_ctl =
+ ShmemInitStruct("gtt_shared_ctl",
+ sizeof(gtt_ctl_data),
+ &found);
+
+ if (!found)
+ {
+ LWLockRegisterTranche(LWTRANCHE_GTT_CTL, "gtt_shared_ctl");
+ LWLockInitialize(>t_shared_ctl->lock, LWTRANCHE_GTT_CTL);
+ gtt_shared_ctl->max_entry = max_active_gtt;
+ gtt_shared_ctl->entry_size = action_gtt_shared_hash_entry_size();
+ }
+
+ info.keysize = sizeof(RelFileNode);
+ info.entrysize = gtt_shared_ctl->entry_size;
+ active_gtt_shared_hash =
+ ShmemInitHash("active gtt shared hash",
+ gtt_shared_ctl->max_entry,
+ gtt_shared_ctl->max_entry,
+ &info, HASH_ELEM | HASH_BLOBS | HASH_FIXED_SIZE);
+}
+
+static void
+gtt_storage_checkin(RelFileNode rnode)
+{
+ gtt_shared_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ entry = (gtt_shared_hash_entry *) hash_search(active_gtt_shared_hash,
+ &rnode, HASH_ENTER_NULL, &found);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ ereport(ERROR,
+ (errcode(ERRCODE_OUT_OF_MEMORY),
+ errmsg("out of shared memory"),
+ errhint("You might need to increase max_active_gtt.")));
+ }
+
+ if (found == false)
+ {
+ int wordnum;
+
+ entry->map = (Bitmapset *)((char *)entry + MAXALIGN(sizeof(gtt_shared_hash_entry)));
+ wordnum = WORDNUM(MaxBackends + 1);
+ memset(entry->map, 0, BITMAPSET_SIZE(wordnum + 1));
+ entry->map->nwords = wordnum + 1;
+ }
+
+ bms_add_member(entry->map, MyBackendId);
+ LWLockRelease(>t_shared_ctl->lock);
+}
+
+static void
+gtt_storage_checkout(RelFileNode rnode, bool skiplock)
+{
+ gtt_shared_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (!skiplock)
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(rnode), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ elog(WARNING, "relfilenode %u/%u/%u not exist in gtt shared hash when forget",
+ rnode.dbNode, rnode.spcNode, rnode.relNode);
+ return;
+ }
+
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+ bms_del_member(entry->map, MyBackendId);
+
+ if (bms_is_empty(entry->map))
+ {
+ if (!hash_search(active_gtt_shared_hash, &rnode, HASH_REMOVE, NULL))
+ elog(PANIC, "gtt shared hash table corrupted");
+ }
+
+ if (!skiplock)
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return;
+}
+
+Bitmapset *
+copy_active_gtt_bitmap(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ Bitmapset *map_copy = NULL;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return NULL;
+ }
+
+ Assert(entry->map);
+ if (!bms_is_empty(entry->map))
+ map_copy = bms_copy(entry->map);
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return map_copy;
+}
+
+bool
+is_other_backend_use_gtt(RelFileNode node)
+{
+ gtt_shared_hash_entry *entry;
+ bool in_use = false;
+ int num_use = 0;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_SHARED);
+ entry = hash_search(active_gtt_shared_hash,
+ (void *) &(node), HASH_FIND, NULL);
+
+ if (entry == NULL)
+ {
+ LWLockRelease(>t_shared_ctl->lock);
+ return false;
+ }
+
+ Assert(entry->map);
+ Assert(MyBackendId >= 1 && MyBackendId <= MaxBackends);
+
+ num_use = bms_num_members(entry->map);
+ if (num_use == 0)
+ in_use = false;
+ else if (num_use == 1)
+ {
+ if(bms_is_member(MyBackendId, entry->map))
+ in_use = false;
+ else
+ in_use = true;
+ }
+ else
+ in_use = true;
+
+ LWLockRelease(>t_shared_ctl->lock);
+
+ return in_use;
+}
+
+void
+remember_gtt_storage_info(RelFileNode rnode, Relation rel)
+{
+ gtt_local_hash_entry *entry;
+ MemoryContext oldcontext;
+ Oid relid = rnode.relNode;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temporary table feature is disable"),
+ errhint("You might need to increase max_active_gtt to enable this feature.")));
+
+ if (RecoveryInProgress())
+ elog(ERROR, "readonly mode not support access global temp table yet");
+
+ if (gtt_storage_local_hash == NULL)
+ {
+#define GTT_LOCAL_HASH_SIZE 1024
+ /* First time through: initialize the hash table */
+ HASHCTL ctl;
+
+ MemSet(&ctl, 0, sizeof(ctl));
+ ctl.keysize = sizeof(Oid);
+ ctl.entrysize = sizeof(gtt_local_hash_entry);
+ gtt_storage_local_hash =
+ hash_create("global temp relation table",
+ GTT_LOCAL_HASH_SIZE,
+ &ctl, HASH_ELEM | HASH_BLOBS);
+
+ if (!CacheMemoryContext)
+ CreateCacheMemoryContext();
+
+ gtt_relstats_context =
+ AllocSetContextCreate(CacheMemoryContext,
+ "gtt relstats context",
+ ALLOCSET_DEFAULT_SIZES);
+ }
+
+ /* Look up or create an entry */
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_ENTER, &found);
+
+ if (found)
+ {
+ elog(ERROR, "backend %d relid %u already exists in global temp table local hash",
+ MyBackendId, relid);
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+
+ entry->spcnode = rnode.spcNode;
+ entry->relpages = 0;
+ entry->reltuples = 0;
+ entry->relallvisible = 0;
+ entry->relkind = rel->rd_rel->relkind;
+ /* only heap contain transaction information */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ int natts = RelationGetNumberOfAttributes(rel);
+ entry->natts = natts;
+ entry->attnum = palloc0(sizeof(int) * natts);
+ entry->att_stat_tups = palloc0(sizeof(HeapTuple) * natts);
+
+ if (RELATION_GTT_ON_COMMIT_DELETE(rel))
+ {
+ entry->on_commit_delete = true;
+ register_on_commit_action(rel->rd_node.relNode, ONCOMMIT_DELETE_ROWS);
+ }
+
+ entry->relfrozenxid = RecentXmin;
+ entry->relminmxid = GetOldestMultiXactId();
+ insert_gtt_relfrozenxid_to_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ gtt_storage_checkin(rnode);
+ }
+ else
+ {
+ entry->natts = 0;
+ entry->attnum = 0;
+ entry->att_stat_tups = NULL;
+ entry->on_commit_delete = false;
+ entry->relfrozenxid = 0;
+ entry->relminmxid = 0;
+ }
+
+ MemoryContextSwitchTo(oldcontext);
+
+ if (!gtt_cleaner_exit_registered)
+ {
+ before_shmem_exit(gtt_storage_removeall, 0);
+ gtt_cleaner_exit_registered = true;
+ }
+
+ return;
+}
+
+void
+forget_gtt_storage_info(Oid relid)
+{
+ gtt_local_hash_entry *entry;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, NULL);
+
+ if (entry && entry->relkind == RELKIND_RELATION)
+ {
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ gtt_storage_checkout(rnode, false);
+
+ Assert(TransactionIdIsNormal(entry->relfrozenxid));
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_REMOVE, NULL);
+
+ return;
+}
+
+/* is the storage file was created in this backend */
+bool
+gtt_storage_attached(Oid relid)
+{
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return false;
+
+ if (gtt_storage_local_hash == NULL)
+ return false;
+
+ hash_search(gtt_storage_local_hash,
+ (void *) &(relid), HASH_FIND, &found);
+
+ return found;
+}
+
+static void
+gtt_storage_removeall(int code, Datum arg)
+{
+ HASH_SEQ_STATUS status;
+ gtt_local_hash_entry *entry;
+ int nrels = 0,
+ maxrels = 0;
+ SMgrRelation *srels = NULL;
+ RelFileNode *rnodes = NULL;
+ char *relkinds = NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ hash_seq_init(&status, gtt_storage_local_hash);
+ while ((entry = (gtt_local_hash_entry *) hash_seq_search(&status)) != NULL)
+ {
+ SMgrRelation srel;
+ RelFileNode rnode;
+
+ rnode.spcNode = entry->spcnode;
+ rnode.dbNode = MyDatabaseId;
+ rnode.relNode = entry->relid;
+
+ srel = smgropen(rnode, MyBackendId);
+
+ /* allocate the initial array, or extend it, if needed */
+ if (maxrels == 0)
+ {
+ maxrels = 32;
+ srels = palloc(sizeof(SMgrRelation) * maxrels);
+ rnodes = palloc(sizeof(RelFileNode) * maxrels);
+ relkinds = palloc(sizeof(char) * maxrels);
+ }
+ else if (maxrels <= nrels)
+ {
+ maxrels *= 2;
+ srels = repalloc(srels, sizeof(SMgrRelation) * maxrels);
+ rnodes = repalloc(rnodes, sizeof(RelFileNode) * maxrels);
+ relkinds = repalloc(relkinds, sizeof(char) * maxrels);
+ }
+
+ srels[nrels] = srel;
+ rnodes[nrels] = rnode;
+ relkinds[nrels] = entry->relkind;
+ nrels++;
+ }
+
+ if (nrels > 0)
+ {
+ int i;
+
+ smgrdounlinkall(srels, nrels, false);
+
+ LWLockAcquire(>t_shared_ctl->lock, LW_EXCLUSIVE);
+ for (i = 0; i < nrels; i++)
+ {
+ smgrclose(srels[i]);
+ if (relkinds[i] == RELKIND_RELATION)
+ gtt_storage_checkout(rnodes[i], true);
+ }
+ LWLockRelease(>t_shared_ctl->lock);
+
+ pfree(srels);
+ pfree(rnodes);
+ pfree(relkinds);
+ }
+
+ MyProc->session_gtt_frozenxid = InvalidTransactionId;
+
+ return;
+}
+
+/*
+ * Update global temp table relstats(relpage/reltuple/relallvisible)
+ * to local hashtable
+ */
+void
+up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid)
+{
+ Oid relid = RelationGetRelid(relation);
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->spcnode);
+
+ if (num_pages >= 0 &&
+ entry->relpages != (int32)num_pages)
+ entry->relpages = (int32)num_pages;
+
+ if (num_tuples >= 0 &&
+ num_tuples != (float4)entry->reltuples)
+ entry->reltuples = (float4)num_tuples;
+
+ /* only heap contain transaction information and relallvisible */
+ if (entry->relkind == RELKIND_RELATION)
+ {
+ if (entry->relallvisible >= 0 &&
+ entry->relallvisible != (int32)num_all_visible_pages)
+ {
+ entry->relallvisible = (int32)num_all_visible_pages;
+ }
+
+ if (TransactionIdIsNormal(relfrozenxid) &&
+ entry->relfrozenxid != relfrozenxid &&
+ (TransactionIdPrecedes(entry->relfrozenxid, relfrozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(), entry->relfrozenxid)))
+ {
+ remove_gtt_relfrozenxid_from_ordered_list(entry->relfrozenxid);
+ entry->relfrozenxid = relfrozenxid;
+ insert_gtt_relfrozenxid_to_ordered_list(relfrozenxid);
+ set_gtt_session_relfrozenxid();
+ }
+
+ if (MultiXactIdIsValid(relminmxid) &&
+ entry->relminmxid != relminmxid &&
+ (MultiXactIdPrecedes(entry->relminmxid, relminmxid) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), entry->relminmxid)))
+ {
+ entry->relminmxid = relminmxid;
+ }
+ }
+
+ return;
+}
+
+/*
+ * Search global temp table relstats(relpage/reltuple/relallvisible)
+ * from local hashtable.
+ */
+void
+get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &relid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ Assert(entry->relid == relid);
+
+ if (relpages)
+ *relpages = entry->relpages;
+
+ if (reltuples)
+ *reltuples = entry->reltuples;
+
+ if (relallvisible)
+ *relallvisible = entry->relallvisible;
+
+ if (relfrozenxid)
+ *relfrozenxid = entry->relfrozenxid;
+
+ if (relminmxid)
+ *relminmxid = entry->relminmxid;
+
+ return;
+}
+
+/*
+ * Update global temp table statistic info(definition is same as pg_statistic)
+ * to local hashtable where ananyze global temp table
+ */
+void
+up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ MemoryContext oldcontext;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return;
+
+ if (gtt_storage_local_hash == NULL)
+ return;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return;
+
+ if (entry->relkind != RELKIND_RELATION)
+ {
+ elog(WARNING, "oid %u not a relation", reloid);
+ return;
+ }
+
+ /* todo */
+ if (entry->natts < natts)
+ {
+ elog(WARNING, "reloid %u not support update attstat after add colunm", reloid);
+ return;
+ }
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ Assert(entry->relid == reloid);
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == 0)
+ {
+ entry->attnum[i] = attnum;
+ break;
+ }
+ else if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ heap_freetuple(entry->att_stat_tups[i]);
+ entry->att_stat_tups[i] = NULL;
+ break;
+ }
+ }
+
+ Assert(i < entry->natts);
+ Assert(entry->att_stat_tups[i] == NULL);
+ entry->att_stat_tups[i] = heap_form_tuple(tupleDescriptor, values, isnull);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+/*
+ * Search global temp table statistic info(definition is same as pg_statistic)
+ * from local hashtable.
+ */
+HeapTuple
+get_gtt_att_statistic(Oid reloid, int attnum, bool inh)
+{
+ gtt_local_hash_entry *entry;
+ bool found;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return NULL;
+
+ if (gtt_storage_local_hash == NULL)
+ return NULL;
+
+ entry = hash_search(gtt_storage_local_hash,
+ (void *) &reloid, HASH_FIND, &found);
+
+ if (!found)
+ return NULL;
+
+ for (i = 0; i < entry->natts; i++)
+ {
+ if (entry->attnum[i] == attnum)
+ {
+ Assert(entry->att_stat_tups[i]);
+ return entry->att_stat_tups[i];
+ }
+ }
+
+ return NULL;
+}
+
+void
+release_gtt_statistic_cache(HeapTuple tup)
+{
+ /* do nothing */
+ return;
+}
+
+static void
+insert_gtt_relfrozenxid_to_ordered_list(Oid relfrozenxid)
+{
+ MemoryContext oldcontext;
+ ListCell *cell;
+ int i;
+
+ Assert(TransactionIdIsNormal(relfrozenxid));
+
+ oldcontext = MemoryContextSwitchTo(gtt_relstats_context);
+ /* Does the datum belong at the front? */
+ if (gtt_session_relfrozenxid_list == NIL ||
+ TransactionIdFollowsOrEquals(relfrozenxid,
+ linitial_oid(gtt_session_relfrozenxid_list)))
+ {
+ gtt_session_relfrozenxid_list =
+ lcons_oid(relfrozenxid, gtt_session_relfrozenxid_list);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+ }
+
+ /* No, so find the entry it belongs after */
+ i = 0;
+ foreach (cell, gtt_session_relfrozenxid_list)
+ {
+ if (TransactionIdFollowsOrEquals(relfrozenxid, lfirst_oid(cell)))
+ break;
+
+ i++;
+ }
+ gtt_session_relfrozenxid_list =
+ list_insert_nth_oid(gtt_session_relfrozenxid_list, i, relfrozenxid);
+ MemoryContextSwitchTo(oldcontext);
+
+ return;
+}
+
+static void
+remove_gtt_relfrozenxid_from_ordered_list(Oid relfrozenxid)
+{
+ gtt_session_relfrozenxid_list =
+ list_delete_oid(gtt_session_relfrozenxid_list, relfrozenxid);
+}
+
+static void
+set_gtt_session_relfrozenxid(void)
+{
+ TransactionId gtt_frozenxid = InvalidTransactionId;
+
+ if (gtt_session_relfrozenxid_list)
+ gtt_frozenxid = llast_oid(gtt_session_relfrozenxid_list);
+
+ gtt_session_frozenxid = gtt_frozenxid;
+ if (MyProc->session_gtt_frozenxid != gtt_frozenxid)
+ MyProc->session_gtt_frozenxid = gtt_frozenxid;
+}
+
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 7accb95..e0dc376 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -65,6 +65,7 @@
#include "utils/syscache.h"
#include "utils/timestamp.h"
+#include "catalog/storage_gtt.h"
/* Per-index data for ANALYZE */
typedef struct AnlIndexData
@@ -102,7 +103,7 @@ static int acquire_inherited_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
static void update_attstats(Oid relid, bool inh,
- int natts, VacAttrStats **vacattrstats);
+ int natts, VacAttrStats **vacattrstats, char relpersistence);
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
@@ -575,14 +576,15 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* pg_statistic for columns we didn't process, we leave them alone.)
*/
update_attstats(RelationGetRelid(onerel), inh,
- attr_cnt, vacattrstats);
+ attr_cnt, vacattrstats, RelationGetRelPersistence(onerel));
for (ind = 0; ind < nindexes; ind++)
{
AnlIndexData *thisdata = &indexdata[ind];
update_attstats(RelationGetRelid(Irel[ind]), false,
- thisdata->attr_cnt, thisdata->vacattrstats);
+ thisdata->attr_cnt, thisdata->vacattrstats,
+ RelationGetRelPersistence(Irel[ind]));
}
/*
@@ -659,11 +661,20 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
IndexBulkDeleteResult *stats;
IndexVacuumInfo ivinfo;
+ memset(&ivinfo, 0, sizeof(IndexVacuumInfo));
ivinfo.index = Irel[ind];
ivinfo.analyze_only = true;
ivinfo.estimated_count = true;
ivinfo.message_level = elevel;
- ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
+ /* get global temp relstats from localhash, not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(onerel))
+ {
+ get_gtt_relstats(RelationGetRelid(onerel),
+ NULL, &ivinfo.num_heap_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ ivinfo.num_heap_tuples = onerel->rd_rel->reltuples;
ivinfo.strategy = vac_strategy;
stats = index_vacuum_cleanup(&ivinfo, NULL);
@@ -1425,7 +1436,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
* by taking a self-exclusive lock on the relation in analyze_rel().
*/
static void
-update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
+update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats, char relpersistence)
{
Relation sd;
int attno;
@@ -1527,31 +1538,45 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
}
}
- /* Is there already a pg_statistic tuple for this attribute? */
- oldtup = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(relid),
- Int16GetDatum(stats->attr->attnum),
- BoolGetDatum(inh));
-
- if (HeapTupleIsValid(oldtup))
+ /* Update column statistic to localhash, not catalog */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
{
- /* Yes, replace it */
- stup = heap_modify_tuple(oldtup,
- RelationGetDescr(sd),
- values,
- nulls,
- replaces);
- ReleaseSysCache(oldtup);
- CatalogTupleUpdate(sd, &stup->t_self, stup);
+ up_gtt_att_statistic(relid,
+ stats->attr->attnum,
+ inh,
+ natts,
+ RelationGetDescr(sd),
+ values,
+ nulls);
}
else
{
- /* No, insert new tuple */
- stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
- CatalogTupleInsert(sd, stup);
- }
+ /* Is there already a pg_statistic tuple for this attribute? */
+ oldtup = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh));
+
+ if (HeapTupleIsValid(oldtup))
+ {
+ /* Yes, replace it */
+ stup = heap_modify_tuple(oldtup,
+ RelationGetDescr(sd),
+ values,
+ nulls,
+ replaces);
+ ReleaseSysCache(oldtup);
+ CatalogTupleUpdate(sd, &stup->t_self, stup);
+ }
+ else
+ {
+ /* No, insert new tuple */
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ CatalogTupleInsert(sd, stup);
+ }
- heap_freetuple(stup);
+ heap_freetuple(stup);
+ }
}
table_close(sd, RowExclusiveLock);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a23128d..0d38988 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -392,6 +392,12 @@ cluster_rel(Oid tableOid, Oid indexOid, int options)
errmsg("cannot vacuum temporary tables of other sessions")));
}
+ /* not support cluster global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(OldHeap))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support cluster global temporary tables yet")));
+
/*
* Also check for active uses of the relation in the current transaction,
* including open scans and pending AFTER trigger events.
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 374e2d0..8e88a59 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2585,6 +2585,16 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind,
!isTempNamespace(classtuple->relnamespace))
continue;
+ /* not support reindex on global temp table, so skip it */
+ if (classtuple->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(WARNING,
+ (errmsg("global temp table \"%s.%s\" skip reindexed",
+ get_namespace_name(get_rel_namespace(relid)),
+ get_rel_name(relid))));
+ continue;
+ }
+
/* Check user/system classification, and optionally skip */
if (objectKind == REINDEX_OBJECT_SYSTEM &&
!IsSystemClass(relid, classtuple))
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c
index bae3b38..ff9d5cb 100644
--- a/src/backend/commands/lockcmds.c
+++ b/src/backend/commands/lockcmds.c
@@ -107,7 +107,8 @@ RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid, Oid oldrelid,
* transaction.
*/
relpersistence = get_rel_persistence(relid);
- if (relpersistence == RELPERSISTENCE_TEMP)
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPNAMESPACE;
/* Check permissions. */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 5597be6..4bf4b9a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -48,6 +48,7 @@
#include "catalog/storage.h"
#include "catalog/storage_xlog.h"
#include "catalog/toasting.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/comment.h"
#include "commands/defrem.h"
@@ -531,6 +532,7 @@ static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,
Relation partitionTbl);
static List *GetParentedForeignKeyRefs(Relation partition);
static void ATDetachCheckNoForeignKeyRefs(Relation partition);
+static bool has_oncommit_option(List *options);
/* ----------------------------------------------------------------
@@ -576,6 +578,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
LOCKMODE parentLockmode;
const char *accessMethod = NULL;
Oid accessMethodId = InvalidOid;
+ bool has_oncommit_clause = false;
/*
* Truncate relname to appropriate length (probably a waste of time, as
@@ -586,8 +589,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Check consistency of arguments
*/
+ /* global temp table same as local temp table */
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !(stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -617,12 +622,28 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* code. This is needed because calling code might not expect untrusted
* tables to appear in pg_temp at the front of its search path.
*/
- if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
+ /* global temp table same as local temp table */
+ if ((stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
+ stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
&& InSecurityRestrictedOperation())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("cannot create temporary table within security-restricted operation")));
+ /* Not support partitioned or inherited global temp table yet */
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (relkind == RELKIND_PARTITIONED_TABLE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary partition table yet")));
+
+ if (stmt->inhRelations)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support create global temporary inheritance table yet")));
+ }
+
/*
* Determine the lockmode to use when scanning parents. A self-exclusive
* lock is needed here.
@@ -718,6 +739,40 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
/*
* Parse and validate reloptions, if any.
*/
+ /* global temp table */
+ has_oncommit_clause = has_oncommit_option(stmt->options);
+ if (stmt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ if (has_oncommit_clause)
+ {
+ if (stmt->oncommit != ONCOMMIT_NOOP)
+ elog(ERROR, "can not defeine global temp table with on commit and with clause at same time");
+ }
+ else
+ {
+ DefElem *opt = makeNode(DefElem);
+
+ opt->type = T_DefElem;
+ opt->defnamespace = NULL;
+ opt->defname = "on_commit_delete_rows";
+ opt->defaction = DEFELEM_UNSPEC;
+
+ /* use reloptions to remember on commit clause */
+ if (stmt->oncommit == ONCOMMIT_DELETE_ROWS)
+ opt->arg = (Node *)makeString("true");
+ else if (stmt->oncommit == ONCOMMIT_PRESERVE_ROWS)
+ opt->arg = (Node *)makeString("false");
+ else if (stmt->oncommit == ONCOMMIT_NOOP)
+ opt->arg = (Node *)makeString("true");
+ else
+ elog(ERROR, "global temp table not support on commit drop clause");
+
+ stmt->options = lappend(stmt->options, opt);
+ }
+ }
+ else if (has_oncommit_clause)
+ elog(ERROR, "regular table cannot specifie on_commit_delete_rows");
+
reloptions = transformRelOptions((Datum) 0, stmt->options, NULL, validnsps,
true, false);
@@ -1772,7 +1827,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ RELATION_IS_GLOBAL_TEMP(rel))
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -3330,6 +3386,13 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bo
* specially.
*/
targetrelation = relation_open(myrelid, is_index ? ShareUpdateExclusiveLock : AccessExclusiveLock);
+
+ /* not support rename global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(targetrelation))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support rename global temporary tables yet")));
+
namespaceId = RelationGetNamespace(targetrelation);
/*
@@ -3499,6 +3562,14 @@ AlterTable(Oid relid, LOCKMODE lockmode, AlterTableStmt *stmt)
/* Caller is required to provide an adequate lock. */
rel = relation_open(relid, NoLock);
+ /* not support alter global temp table yet */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("not support alter global temporary tables yet")));
+ }
+
CheckTableNotInUse(rel, "ALTER TABLE");
ATController(stmt, rel, stmt->cmds, stmt->relation->inh, lockmode);
@@ -7679,6 +7750,13 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
errmsg("referenced relation \"%s\" is not a table",
RelationGetRelationName(pkrel))));
+ /* global temp table not support foreign key constraint yet */
+ if (RELATION_IS_GLOBAL_TEMP(pkrel))
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("referenced relation \"%s\" is not a global temp table",
+ RelationGetRelationName(pkrel))));
+
if (!allowSystemTableMods && IsSystemRelation(pkrel))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -7718,6 +7796,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on temporary tables must involve temporary tables of this session")));
break;
+ /* global temp table not support foreign key constraint yet */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("not support foreign key constraints on global temp table yet")));
+ break;
}
/*
@@ -12726,7 +12810,7 @@ index_copy_data(Relation rel, RelFileNode newrnode)
* NOTE: any conflict in relfilenode value will be caught in
* RelationCreateStorage().
*/
- RelationCreateStorage(newrnode, rel->rd_rel->relpersistence);
+ RelationCreateStorage(newrnode, rel->rd_rel->relpersistence, rel);
/* copy main fork */
RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM,
@@ -14133,7 +14217,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
*/
switch (rel->rd_rel->relpersistence)
{
+ /* global temp table same as local temp table */
case RELPERSISTENCE_TEMP:
+ case RELPERSISTENCE_GLOBAL_TEMP:
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("cannot change logged status of table \"%s\" because it is temporary",
@@ -16723,3 +16809,20 @@ ATDetachCheckNoForeignKeyRefs(Relation partition)
table_close(rel, NoLock);
}
}
+
+static bool
+has_oncommit_option(List *options)
+{
+ ListCell *listptr;
+
+ foreach(listptr, options)
+ {
+ DefElem *def = (DefElem *) lfirst(listptr);
+
+ if (pg_strcasecmp(def->defname, "on_commit_delete_rows") == 0)
+ return true;
+ }
+
+ return false;
+}
+
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index da1da23..70278a6 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -35,6 +35,7 @@
#include "catalog/pg_database.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_namespace.h"
+#include "catalog/storage_gtt.h"
#include "commands/cluster.h"
#include "commands/defrem.h"
#include "commands/vacuum.h"
@@ -1070,12 +1071,25 @@ vac_estimate_reltuples(Relation relation,
BlockNumber scanned_pages,
double scanned_tuples)
{
- BlockNumber old_rel_pages = relation->rd_rel->relpages;
- double old_rel_tuples = relation->rd_rel->reltuples;
+ BlockNumber old_rel_pages = 0;
+ double old_rel_tuples = 0;
double old_density;
double unscanned_pages;
double total_tuples;
+ /* get relstat from gtt local hash */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ {
+ get_gtt_relstats(RelationGetRelid(relation),
+ &old_rel_pages, &old_rel_tuples, NULL,
+ NULL, NULL);
+ }
+ else
+ {
+ old_rel_pages = relation->rd_rel->relpages;
+ old_rel_tuples = relation->rd_rel->reltuples;
+ }
+
/* If we did scan the whole table, just use the count as-is */
if (scanned_pages >= total_pages)
return scanned_tuples;
@@ -1175,24 +1189,8 @@ vac_update_relstats(Relation relation,
/* Apply statistical updates, if any, to copied tuple */
dirty = false;
- if (pgcform->relpages != (int32) num_pages)
- {
- pgcform->relpages = (int32) num_pages;
- dirty = true;
- }
- if (pgcform->reltuples != (float4) num_tuples)
- {
- pgcform->reltuples = (float4) num_tuples;
- dirty = true;
- }
- if (pgcform->relallvisible != (int32) num_all_visible_pages)
- {
- pgcform->relallvisible = (int32) num_all_visible_pages;
- dirty = true;
- }
/* Apply DDL updates, but not inside an outer transaction (see above) */
-
if (!in_outer_xact)
{
/*
@@ -1217,37 +1215,64 @@ vac_update_relstats(Relation relation,
}
}
- /*
- * Update relfrozenxid, unless caller passed InvalidTransactionId
- * indicating it has no new data.
- *
- * Ordinarily, we don't let relfrozenxid go backwards: if things are
- * working correctly, the only way the new frozenxid could be older would
- * be if a previous VACUUM was done with a tighter freeze_min_age, in
- * which case we don't want to forget the work it already did. However,
- * if the stored relfrozenxid is "in the future", then it must be corrupt
- * and it seems best to overwrite it with the cutoff we used this time.
- * This should match vac_update_datfrozenxid() concerning what we consider
- * to be "in the future".
- */
- if (TransactionIdIsNormal(frozenxid) &&
- pgcform->relfrozenxid != frozenxid &&
- (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
- TransactionIdPrecedes(ReadNewTransactionId(),
- pgcform->relfrozenxid)))
+ /* global temp table remember relstats to localhash not catalog */
+ if (RELATION_IS_GLOBAL_TEMP(relation))
{
- pgcform->relfrozenxid = frozenxid;
- dirty = true;
+ up_gtt_relstats(relation,
+ num_pages, num_tuples,
+ num_all_visible_pages,
+ frozenxid, minmulti);
}
-
- /* Similarly for relminmxid */
- if (MultiXactIdIsValid(minmulti) &&
- pgcform->relminmxid != minmulti &&
- (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
- MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ else
{
- pgcform->relminmxid = minmulti;
- dirty = true;
+ if (pgcform->relpages != (int32) num_pages)
+ {
+ pgcform->relpages = (int32) num_pages;
+ dirty = true;
+ }
+ if (pgcform->reltuples != (float4) num_tuples)
+ {
+ pgcform->reltuples = (float4) num_tuples;
+ dirty = true;
+ }
+ if (pgcform->relallvisible != (int32) num_all_visible_pages)
+ {
+ pgcform->relallvisible = (int32) num_all_visible_pages;
+ dirty = true;
+ }
+
+ /*
+ * Update relfrozenxid, unless caller passed InvalidTransactionId
+ * indicating it has no new data.
+ *
+ * Ordinarily, we don't let relfrozenxid go backwards: if things are
+ * working correctly, the only way the new frozenxid could be older would
+ * be if a previous VACUUM was done with a tighter freeze_min_age, in
+ * which case we don't want to forget the work it already did. However,
+ * if the stored relfrozenxid is "in the future", then it must be corrupt
+ * and it seems best to overwrite it with the cutoff we used this time.
+ * This should match vac_update_datfrozenxid() concerning what we consider
+ * to be "in the future".
+ */
+ if (TransactionIdIsNormal(frozenxid) &&
+ pgcform->relfrozenxid != frozenxid &&
+ (TransactionIdPrecedes(pgcform->relfrozenxid, frozenxid) ||
+ TransactionIdPrecedes(ReadNewTransactionId(),
+ pgcform->relfrozenxid)))
+ {
+ pgcform->relfrozenxid = frozenxid;
+ dirty = true;
+ }
+
+ /* Similarly for relminmxid */
+ if (MultiXactIdIsValid(minmulti) &&
+ pgcform->relminmxid != minmulti &&
+ (MultiXactIdPrecedes(pgcform->relminmxid, minmulti) ||
+ MultiXactIdPrecedes(ReadNextMultiXactId(), pgcform->relminmxid)))
+ {
+ pgcform->relminmxid = minmulti;
+ dirty = true;
+ }
}
/* If anything changed, write out the tuple. */
@@ -1339,6 +1364,10 @@ vac_update_datfrozenxid(void)
continue;
}
+ /* global temp table relstats not in pg_class */
+ if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ continue;
+
/*
* Some table AMs might not need per-relation xid / multixid horizons.
* It therefore seems reasonable to allow relfrozenxid and relminmxid
@@ -1396,6 +1425,25 @@ vac_update_datfrozenxid(void)
Assert(TransactionIdIsNormal(newFrozenXid));
Assert(MultiXactIdIsValid(newMinMulti));
+ /*
+ * Global temp table get frozenxid from MyProc
+ * to avoid the vacuum truncate clog that gtt need.
+ */
+ if (max_active_gtt > 0)
+ {
+ TransactionId oldest_gtt_frozenxid =
+ list_all_session_gtt_frozenxids(0, NULL, NULL, NULL);
+
+ if (TransactionIdIsNormal(oldest_gtt_frozenxid) &&
+ TransactionIdPrecedes(oldest_gtt_frozenxid, newFrozenXid))
+ {
+ ereport(WARNING,
+ (errmsg("global temp table oldest FrozenXid is far in the past"),
+ errhint("please truncate them or kill those sessions that use them.")));
+ newFrozenXid = oldest_gtt_frozenxid;
+ }
+ }
+
/* Now fetch the pg_database tuple we need to update. */
relation = table_open(DatabaseRelationId, RowExclusiveLock);
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index db3a68a..b41a920 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -591,6 +591,8 @@ static void
set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte)
{
+ char relpersistence;
+
/*
* The flag has previously been initialized to false, so we can just
* return if it becomes clear that we can't safely set it.
@@ -618,7 +620,11 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
* the rest of the necessary infrastructure right now anyway. So
* for now, bail out if we see a temporary table.
*/
- if (get_rel_persistence(rte->relid) == RELPERSISTENCE_TEMP)
+ /* global temp table is same as local temp table */
+ relpersistence = get_rel_persistence(rte->relid);
+
+ if (relpersistence == RELPERSISTENCE_TEMP ||
+ relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
return;
/*
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 17c5f08..fa6aee5 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6307,7 +6307,9 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
* Furthermore, any index predicate or index expressions must be parallel
* safe.
*/
+ /* global temp table is same as local temp table */
if (heap->rd_rel->relpersistence == RELPERSISTENCE_TEMP ||
+ heap->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ||
!is_parallel_safe(root, (Node *) RelationGetIndexExpressions(index)) ||
!is_parallel_safe(root, (Node *) RelationGetIndexPredicate(index)))
{
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index e5f9e04..ecc4543 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -53,6 +53,7 @@
#include "utils/syscache.h"
#include "utils/snapmgr.h"
+#include "catalog/storage_gtt.h"
/* GUC parameter */
int constraint_exclusion = CONSTRAINT_EXCLUSION_PARTITION;
@@ -947,10 +948,10 @@ void
estimate_rel_size(Relation rel, int32 *attr_widths,
BlockNumber *pages, double *tuples, double *allvisfrac)
{
- BlockNumber curpages;
- BlockNumber relpages;
- double reltuples;
- BlockNumber relallvisible;
+ BlockNumber curpages = 0;
+ BlockNumber relpages = 0;
+ double reltuples = 0;
+ BlockNumber relallvisible = 0;
double density;
switch (rel->rd_rel->relkind)
@@ -964,6 +965,21 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
case RELKIND_INDEX:
+ /* global temp table get relstats from localhash */
+ if (RELATION_IS_GLOBAL_TEMP(rel))
+ {
+ get_gtt_relstats(RelationGetRelid(rel),
+ &relpages, &reltuples, &relallvisible,
+ NULL, NULL);
+ }
+ else
+ {
+ /* coerce values in pg_class to more desirable types */
+ relpages = (BlockNumber) rel->rd_rel->relpages;
+ reltuples = (double) rel->rd_rel->reltuples;
+ relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
+ }
+
/*
* XXX: It'd probably be good to move this into a callback,
* individual index types e.g. know if they have a metapage.
@@ -972,11 +988,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
/* it has storage, ok to call the smgr */
curpages = RelationGetNumberOfBlocks(rel);
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
-
/* report estimated # pages */
*pages = curpages;
/* quick exit if rel is clearly empty */
@@ -986,10 +997,6 @@ estimate_rel_size(Relation rel, int32 *attr_widths,
*allvisfrac = 0;
break;
}
- /* coerce values in pg_class to more desirable types */
- relpages = (BlockNumber) rel->rd_rel->relpages;
- reltuples = (double) rel->rd_rel->reltuples;
- relallvisible = (BlockNumber) rel->rd_rel->relallvisible;
/*
* Discount the metapage while estimating the number of tuples.
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 85d7a96..67b200d 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -2579,6 +2579,11 @@ transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("materialized views must not use temporary tables or views")));
+ if (is_query_using_gtt(query))
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("materialized views must not use global temporary tables or views")));
+
/*
* A materialized view would either need to save parameters for use in
* maintaining/loading the data or prohibit them entirely. The latter
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 3f67aaf..333e54f 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3268,17 +3268,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
| GLOBAL TEMPORARY
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
+ $$ = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
@@ -11505,19 +11499,13 @@ OptTempTableName:
}
| GLOBAL TEMPORARY opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| GLOBAL TEMP opt_table qualified_name
{
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
$$ = $4;
- $$->relpersistence = RELPERSISTENCE_TEMP;
+ $$->relpersistence = RELPERSISTENCE_GLOBAL_TEMP;
}
| UNLOGGED opt_table qualified_name
{
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 4dd8150..637a15c 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -59,6 +59,7 @@ static void expandTupleDesc(TupleDesc tupdesc, Alias *eref,
List **colnames, List **colvars);
static int specialAttNum(const char *attname);
static bool isQueryUsingTempRelation_walker(Node *node, void *context);
+static bool is_query_using_gtt_walker(Node *node, void *context);
/*
@@ -3420,3 +3421,49 @@ isQueryUsingTempRelation_walker(Node *node, void *context)
isQueryUsingTempRelation_walker,
context);
}
+
+/* check if the query uses global temp table */
+static bool
+is_query_using_gtt_walker(Node *node, void *context)
+{
+ if (node == NULL)
+ return false;
+
+ if (IsA(node, Query))
+ {
+ Query *query = (Query *) node;
+ ListCell *rtable;
+
+ foreach(rtable, query->rtable)
+ {
+ RangeTblEntry *rte = lfirst(rtable);
+
+ if (rte->rtekind == RTE_RELATION)
+ {
+ Relation rel = relation_open(rte->relid, AccessShareLock);
+ char relpersistence = rel->rd_rel->relpersistence;
+
+ relation_close(rel, AccessShareLock);
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ return true;
+ }
+ }
+
+ return query_tree_walker(query,
+ is_query_using_gtt_walker,
+ context,
+ QTW_IGNORE_JOINALIASES);
+ }
+
+ return expression_tree_walker(node,
+ is_query_using_gtt_walker,
+ context);
+}
+
+/* check if the query uses global temp table */
+bool
+is_query_using_gtt(Query *query)
+{
+ return is_query_using_gtt_walker((Node *) query, NULL);
+}
+
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index ee47547..d13e253 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -359,6 +359,13 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
AlterSeqStmt *altseqstmt;
List *attnamelist;
+ if (cxt->relation->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Global temp table does not yet support serial column")));
+ }
+
/*
* Determine namespace and name to use for the sequence.
*
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index c1dd816..f2d3df9 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2091,6 +2091,11 @@ do_autovacuum(void)
}
continue;
}
+ else if (classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ /* autovacuum skip vacuum global temp table */
+ continue;
+ }
/* Fetch reloptions and the pgstat entry for this table */
relopts = extract_autovac_opts(tuple, pg_class_desc);
@@ -2157,7 +2162,9 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ /* autovacuum skip vacuum global temp table */
+ if (classForm->relpersistence == RELPERSISTENCE_TEMP ||
+ classForm->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7ad1073..8e81701 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -53,6 +53,8 @@
#include "utils/resowner_private.h"
#include "utils/timestamp.h"
+#include "utils/guc.h"
+#include "catalog/storage_gtt.h"
/* Note: these two macros only work on shared buffers, not local ones! */
#define BufHdrGetBlock(bufHdr) ((Block) (BufferBlocks + ((Size) (bufHdr)->buf_id) * BLCKSZ))
@@ -432,7 +434,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
static Buffer ReadBuffer_common(SMgrRelation reln, char relpersistence,
ForkNumber forkNum, BlockNumber blockNum,
ReadBufferMode mode, BufferAccessStrategy strategy,
- bool *hit);
+ bool *hit, Relation rel);
static bool PinBuffer(BufferDesc *buf, BufferAccessStrategy strategy);
static void PinBuffer_Locked(BufferDesc *buf);
static void UnpinBuffer(BufferDesc *buf, bool fixOwner);
@@ -664,7 +666,8 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
*/
pgstat_count_buffer_read(reln);
buf = ReadBuffer_common(reln->rd_smgr, reln->rd_rel->relpersistence,
- forkNum, blockNum, mode, strategy, &hit);
+ forkNum, blockNum, mode, strategy, &hit,
+ reln);
if (hit)
pgstat_count_buffer_hit(reln);
return buf;
@@ -692,7 +695,7 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
Assert(InRecovery);
return ReadBuffer_common(smgr, RELPERSISTENCE_PERMANENT, forkNum, blockNum,
- mode, strategy, &hit);
+ mode, strategy, &hit, NULL);
}
@@ -704,7 +707,8 @@ ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum,
static Buffer
ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
BlockNumber blockNum, ReadBufferMode mode,
- BufferAccessStrategy strategy, bool *hit)
+ BufferAccessStrategy strategy, bool *hit,
+ Relation rel)
{
BufferDesc *bufHdr;
Block bufBlock;
@@ -719,6 +723,15 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
isExtend = (blockNum == P_NEW);
+ /* create storage when first read data page for gtt */
+ if (relpersistence == RELPERSISTENCE_GLOBAL_TEMP &&
+ (isExtend || blockNum == 0) &&
+ forkNum == MAIN_FORKNUM &&
+ !gtt_storage_attached(smgr->smgr_rnode.node.relNode))
+ {
+ RelationCreateStorage(smgr->smgr_rnode.node, relpersistence, rel);
+ }
+
TRACE_POSTGRESQL_BUFFER_READ_START(forkNum, blockNum,
smgr->smgr_rnode.node.spcNode,
smgr->smgr_rnode.node.dbNode,
@@ -2799,6 +2812,16 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln)
BlockNumber
RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
{
+ /*
+ * When this backend not init gtt storage
+ * return 0
+ */
+ if (RELATION_IS_GLOBAL_TEMP(relation) &&
+ !gtt_storage_attached(relation->rd_node.relNode))
+ {
+ return 0;
+ }
+
switch (relation->rd_rel->relkind)
{
case RELKIND_SEQUENCE:
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index 8853706..b3544dd 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -21,6 +21,7 @@
#include "access/nbtree.h"
#include "access/subtrans.h"
#include "access/twophase.h"
+#include "catalog/storage_gtt.h"
#include "commands/async.h"
#include "miscadmin.h"
#include "pgstat.h"
@@ -147,6 +148,7 @@ CreateSharedMemoryAndSemaphores(void)
size = add_size(size, BTreeShmemSize());
size = add_size(size, SyncScanShmemSize());
size = add_size(size, AsyncShmemSize());
+ size = add_size(size, active_gtt_shared_hash_size());
#ifdef EXEC_BACKEND
size = add_size(size, ShmemBackendArraySize());
#endif
@@ -217,6 +219,8 @@ CreateSharedMemoryAndSemaphores(void)
SUBTRANSShmemInit();
MultiXactShmemInit();
InitBufferPool();
+ /* global temporary table */
+ active_gtt_shared_hash_init();
/*
* Set up lock manager
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 3da5307..21bd1f2 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -60,6 +60,7 @@
#include "utils/builtins.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
+#include "utils/guc.h"
#define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
@@ -3973,3 +3974,77 @@ KnownAssignedXidsReset(void)
LWLockRelease(ProcArrayLock);
}
+
+/*
+ * search all active backend to get oldest frozenxid
+ * for global temp table.
+ */
+int
+list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n)
+{
+ ProcArrayStruct *arrayP = procArray;
+ TransactionId result = InvalidTransactionId;
+ int index;
+ int flags = 0;
+ int i = 0;
+
+ if (max_active_gtt <= 0)
+ return 0;
+
+ if (max_size > 0)
+ {
+ Assert(pids);
+ Assert(xids);
+ Assert(n);
+ *n = 0;
+ }
+
+ if (max_active_gtt <= 0)
+ return InvalidTransactionId;
+
+ if (RecoveryInProgress())
+ return InvalidTransactionId;
+
+ flags |= PROC_IS_AUTOVACUUM;
+ flags |= PROC_IN_LOGICAL_DECODING;
+
+ LWLockAcquire(ProcArrayLock, LW_SHARED);
+ if (max_size > 0 && max_size < arrayP->numProcs)
+ {
+ LWLockRelease(ProcArrayLock);
+ elog(ERROR, "list_all_gtt_frozenxids require more array");
+ }
+
+ for (index = 0; index < arrayP->numProcs; index++)
+ {
+ int pgprocno = arrayP->pgprocnos[index];
+ volatile PGPROC *proc = &allProcs[pgprocno];
+ volatile PGXACT *pgxact = &allPgXact[pgprocno];
+
+ if (pgxact->vacuumFlags & flags)
+ continue;
+
+ if (proc->databaseId == MyDatabaseId &&
+ TransactionIdIsNormal(proc->session_gtt_frozenxid))
+ {
+ if (result == InvalidTransactionId)
+ result = proc->session_gtt_frozenxid;
+ else if (TransactionIdPrecedes(proc->session_gtt_frozenxid, result))
+ result = proc->session_gtt_frozenxid;
+
+ if (max_size > 0)
+ {
+ pids[i] = proc->pid;
+ xids[i] = proc->session_gtt_frozenxid;
+ i++;
+ }
+ }
+ }
+ LWLockRelease(ProcArrayLock);
+
+ if (max_size > 0)
+ *n = i;
+
+ return result;
+}
+
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index b3c54a6..645456c 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -396,6 +396,7 @@ InitProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
@@ -578,6 +579,7 @@ InitAuxiliaryProcess(void)
MyProc->databaseId = InvalidOid;
MyProc->roleId = InvalidOid;
MyProc->tempNamespaceId = InvalidOid;
+ MyProc->session_gtt_frozenxid = InvalidTransactionId; /* init session level gtt frozenxid */
MyProc->isBackgroundWorker = IsBackgroundWorker;
MyPgXact->delayChkpt = false;
MyPgXact->vacuumFlags = 0;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 07f3c93..cee8f9e 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -654,6 +654,12 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
*/
if (zero_damaged_pages || InRecovery)
MemSet(buffer, 0, BLCKSZ);
+ else if(SmgrIsTemp(reln) && blocknum == 0 && forknum == MAIN_FORKNUM)
+ {
+ /* global temp table init btree meta page */
+ MemSet(buffer, 0, BLCKSZ);
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..adce760 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -1008,6 +1008,10 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
Assert(backend != InvalidBackendId);
}
break;
+ /* For global temp table */
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ backend = BackendIdForTempRelations();
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relform->relpersistence);
backend = InvalidBackendId; /* placate compiler */
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 35a8995..42dc3a5 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -141,6 +141,7 @@
#include "utils/timestamp.h"
#include "utils/typcache.h"
+#include "catalog/storage_gtt.h"
/* Hooks for plugins to get control when we ask for stats */
get_relation_stats_hook_type get_relation_stats_hook = NULL;
@@ -4568,12 +4569,25 @@ examine_variable(PlannerInfo *root, Node *node, int varRelid,
}
else if (index->indpred == NIL)
{
- vardata->statsTuple =
- SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(index->indexoid),
- Int16GetDatum(pos + 1),
- BoolGetDatum(false));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ Int16GetDatum(pos + 1),
+ false);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ vardata->statsTuple =
+ SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(index->indexoid),
+ Int16GetDatum(pos + 1),
+ BoolGetDatum(false));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -4652,15 +4666,27 @@ examine_simple_variable(PlannerInfo *root, Var *var,
}
else if (rte->rtekind == RTE_RELATION)
{
- /*
- * Plain table or parent of an inheritance appendrel, so look up the
- * column in pg_statistic
- */
- vardata->statsTuple = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(rte->relid),
- Int16GetDatum(var->varattno),
- BoolGetDatum(rte->inh));
- vardata->freefunc = ReleaseSysCache;
+ char rel_persistence = get_rel_persistence(rte->relid);
+
+ if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata->statsTuple = get_gtt_att_statistic(rte->relid,
+ var->varattno,
+ rte->inh);
+ vardata->freefunc = release_gtt_statistic_cache;
+ }
+ else
+ {
+ /*
+ * Plain table or parent of an inheritance appendrel, so look up the
+ * column in pg_statistic
+ */
+ vardata->statsTuple = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(rte->relid),
+ Int16GetDatum(var->varattno),
+ BoolGetDatum(rte->inh));
+ vardata->freefunc = ReleaseSysCache;
+ }
if (HeapTupleIsValid(vardata->statsTuple))
{
@@ -5972,6 +5998,7 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
{
/* Simple variable --- look to stats for the underlying table */
RangeTblEntry *rte = planner_rt_fetch(index->rel->relid, root);
+ char rel_persistence = get_rel_persistence(rte->relid);
Assert(rte->rtekind == RTE_RELATION);
relid = rte->relid;
@@ -5989,6 +6016,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ rte->inh);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6000,6 +6034,8 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/* Expression --- maybe there are stats for the index itself */
relid = index->indexoid;
colnum = 1;
@@ -6015,6 +6051,13 @@ btcostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple = get_gtt_att_statistic(relid,
+ colnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
@@ -6881,6 +6924,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
/* attempt to lookup stats in relation for this index column */
if (attnum != 0)
{
+ char rel_persistence = get_rel_persistence(rte->relid);
+
/* Simple variable -- look to stats for the underlying table */
if (get_relation_stats_hook &&
(*get_relation_stats_hook) (root, rte, attnum, &vardata))
@@ -6893,6 +6938,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
elog(ERROR,
"no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(rte->relid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple =
@@ -6905,6 +6958,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
}
else
{
+ char rel_persistence = get_rel_persistence(index->indexoid);
+
/*
* Looks like we've found an expression column in the index. Let's
* see if there's any stats for it.
@@ -6924,6 +6979,14 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
!vardata.freefunc)
elog(ERROR, "no function provided to release variable stats with");
}
+ else if (rel_persistence == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ vardata.statsTuple =
+ get_gtt_att_statistic(index->indexoid,
+ attnum,
+ false);
+ vardata.freefunc = release_gtt_statistic_cache;
+ }
else
{
vardata.statsTuple = SearchSysCache3(STATRELATTINH,
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 27602fa..25a411a 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -34,6 +34,7 @@
#include "catalog/pg_statistic.h"
#include "catalog/pg_transform.h"
#include "catalog/pg_type.h"
+#include "catalog/storage_gtt.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "utils/array.h"
@@ -46,6 +47,7 @@
#include "utils/syscache.h"
#include "utils/typcache.h"
+
/* Hook for plugins to get control in get_attavgwidth() */
get_attavgwidth_hook_type get_attavgwidth_hook = NULL;
@@ -2878,6 +2880,18 @@ get_attavgwidth(Oid relid, AttrNumber attnum)
if (stawidth > 0)
return stawidth;
}
+ if (get_rel_persistence(relid) == RELPERSISTENCE_GLOBAL_TEMP)
+ {
+ tp = get_gtt_att_statistic(relid, attnum, false);
+ if (!HeapTupleIsValid(tp))
+ return 0;
+
+ stawidth = ((Form_pg_statistic) GETSTRUCT(tp))->stawidth;
+ if (stawidth > 0)
+ return stawidth;
+ else
+ return 0;
+ }
tp = SearchSysCache3(STATRELATTINH,
ObjectIdGetDatum(relid),
Int16GetDatum(attnum),
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 585dcee..b8f2a41 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1130,6 +1130,16 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_islocaltemp = false;
}
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ {
+ relation->rd_backend = BackendIdForTempRelations();
+ /*
+ * For global temp table, all backend can use
+ * this relation, so rd_islocaltemp always true.
+ */
+ relation->rd_islocaltemp = true;
+ }
+ break;
default:
elog(ERROR, "invalid relpersistence: %c",
relation->rd_rel->relpersistence);
@@ -3311,6 +3321,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_backend = BackendIdForTempRelations();
rel->rd_islocaltemp = true;
break;
+ case RELPERSISTENCE_GLOBAL_TEMP:
+ rel->rd_backend = BackendIdForTempRelations();
+ rel->rd_islocaltemp = true;
+ break;
default:
elog(ERROR, "invalid relpersistence: %c", relpersistence);
break;
@@ -3425,6 +3439,9 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
TransactionId freezeXid = InvalidTransactionId;
RelFileNode newrnode;
+ if (RELATION_IS_GLOBAL_TEMP(relation))
+ elog(ERROR, "global temp table does not allow setting new relfilenode");
+
/* Allocate a new relfilenode */
newrelfilenode = GetNewRelFileNode(relation->rd_rel->reltablespace, NULL,
persistence);
@@ -3465,7 +3482,7 @@ RelationSetNewRelfilenode(Relation relation, char persistence)
/* handle these directly, at least for now */
SMgrRelation srel;
- srel = RelationCreateStorage(newrnode, persistence);
+ srel = RelationCreateStorage(newrnode, persistence, relation);
smgrclose(srel);
}
break;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index e84c8cc..3b921cd 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -138,6 +138,18 @@ char *GUC_check_errmsg_string;
char *GUC_check_errdetail_string;
char *GUC_check_errhint_string;
+/*
+ * num = 0 means disable global temp table feature.
+ * global temp table define can still storage in catalog
+ * just can not use.
+ * num > 0 means database can management num active global temp table.
+ */
+#define MIN_NUM_ACTIVE_GTT 0
+#define DEFAULT_NUM_ACTIVE_GTT 1000
+#define MAX_NUM_ACTIVE_GTT 1000000
+
+int max_active_gtt = MIN_NUM_ACTIVE_GTT;
+
static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4);
static void set_config_sourcefile(const char *name, char *sourcefile,
@@ -1964,6 +1976,15 @@ static struct config_bool ConfigureNamesBool[] =
static struct config_int ConfigureNamesInt[] =
{
{
+ {"max_active_global_temporary_table", PGC_POSTMASTER, UNGROUPED,
+ gettext_noop("max active global temporary table."),
+ NULL
+ },
+ &max_active_gtt,
+ DEFAULT_NUM_ACTIVE_GTT, MIN_NUM_ACTIVE_GTT, MAX_NUM_ACTIVE_GTT,
+ NULL, NULL, NULL
+ },
+ {
{"archive_timeout", PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Forces a switch to the next WAL file if a "
"new file has not been started within N seconds."),
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index bf69adc..72e291b 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15585,6 +15585,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
{
char *ftoptions = NULL;
char *srvname = NULL;
+ char *table_type = NULL;
switch (tbinfo->relkind)
{
@@ -15636,9 +15637,15 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
binary_upgrade_set_pg_class_oids(fout, q,
tbinfo->dobj.catId.oid, false);
+ if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED)
+ table_type = "UNLOGGED ";
+ else if (tbinfo->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+ table_type = "GLOBAL TEMPORARY ";
+ else
+ table_type = "";
+
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ table_type,
reltypename,
qualrelname);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..34b4683 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_GLOBAL_TEMP 'g' /* global temporary table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h
index 3579d3f..2bde386 100644
--- a/src/include/catalog/storage.h
+++ b/src/include/catalog/storage.h
@@ -19,7 +19,7 @@
#include "storage/smgr.h"
#include "utils/relcache.h"
-extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
+extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence, Relation rel);
extern void RelationDropStorage(Relation rel);
extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
extern void RelationTruncate(Relation rel, BlockNumber nblocks);
diff --git a/src/include/catalog/storage_gtt.h b/src/include/catalog/storage_gtt.h
new file mode 100644
index 0000000..ea41e66
--- /dev/null
+++ b/src/include/catalog/storage_gtt.h
@@ -0,0 +1,39 @@
+/*-------------------------------------------------------------------------
+ *
+ * storage_gtt.h
+ * prototypes for functions in backend/catalog/storage_gtt.c
+ *
+ * src/include/catalog/storage_gtt.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef STORAGE_GTT_H
+#define STORAGE_GTT_H
+
+#include "access/htup.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
+
+extern Size active_gtt_shared_hash_size(void);
+extern void active_gtt_shared_hash_init(void);
+extern void remember_gtt_storage_info(RelFileNode rnode, Relation rel);
+extern void forget_gtt_storage_info(Oid relid);
+extern bool is_other_backend_use_gtt(RelFileNode node);
+extern bool gtt_storage_attached(Oid relid);
+extern Bitmapset *copy_active_gtt_bitmap(RelFileNode node);
+extern void up_gtt_att_statistic(Oid reloid, int attnum, bool inh, int natts,
+ TupleDesc tupleDescriptor, Datum *values, bool *isnull);
+extern HeapTuple get_gtt_att_statistic(Oid reloid, int attnum, bool inh);
+extern void release_gtt_statistic_cache(HeapTuple tup);
+extern void up_gtt_relstats(Relation relation,
+ BlockNumber num_pages,
+ double num_tuples,
+ BlockNumber num_all_visible_pages,
+ TransactionId relfrozenxid,
+ TransactionId relminmxid);
+extern void get_gtt_relstats(Oid relid, BlockNumber *relpages, double *reltuples,
+ BlockNumber *relallvisible, TransactionId *relfrozenxid,
+ TransactionId *relminmxid);
+
+#endif /* STORAGE_H */
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index f7e0781..4f5a353 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -130,4 +130,7 @@ extern Oid attnumTypeId(Relation rd, int attid);
extern Oid attnumCollationId(Relation rd, int attid);
extern bool isQueryUsingTempRelation(Query *query);
+/* global temp table check */
+extern bool is_query_using_gtt(Query *query);
+
#endif /* PARSE_RELATION_H */
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index f627dfe..cfc6c78 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -220,6 +220,7 @@ typedef enum BuiltinTrancheIds
LWTRANCHE_TBM,
LWTRANCHE_PARALLEL_APPEND,
LWTRANCHE_SXACT,
+ LWTRANCHE_GTT_CTL,
LWTRANCHE_FIRST_USER_DEFINED
} BuiltinTrancheIds;
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 281e1db..2ab8e91 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -117,6 +117,8 @@ struct PGPROC
Oid tempNamespaceId; /* OID of temp schema this backend is
* using */
+ TransactionId session_gtt_frozenxid; /* session level global temp table relfrozenxid */
+
bool isBackgroundWorker; /* true if background worker. */
/*
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h
index da8b672..8e7d4c7 100644
--- a/src/include/storage/procarray.h
+++ b/src/include/storage/procarray.h
@@ -124,4 +124,6 @@ extern void ProcArraySetReplicationSlotXmin(TransactionId xmin,
extern void ProcArrayGetReplicationSlotXmin(TransactionId *xmin,
TransactionId *catalog_xmin);
+extern int list_all_session_gtt_frozenxids(int max_size, int *pids, uint32 *xids, int *n);
+
#endif /* PROCARRAY_H */
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index 9aa3d02..1493cf4 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -278,6 +278,10 @@ extern int tcp_user_timeout;
extern bool trace_sort;
#endif
+/* global temporary table */
+extern int max_active_gtt;
+/* end */
+
/*
* Functions exported by guc.c
*/
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 8b8b237..c1962b7 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -272,6 +272,7 @@ typedef struct StdRdOptions
int parallel_workers; /* max number of parallel workers */
bool vacuum_index_cleanup; /* enables index vacuuming and cleanup */
bool vacuum_truncate; /* enables vacuum to truncate a relation */
+ bool on_commit_delete_rows; /* global temp table */
} StdRdOptions;
#define HEAP_MIN_FILLFACTOR 10
@@ -530,7 +531,8 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP || \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
/*
* RELATION_IS_LOCAL
@@ -609,6 +611,17 @@ typedef struct ViewOptions
*/
#define RelationGetPartitionDesc(relation) ((relation)->rd_partdesc)
+/* global temp table implementations */
+#define RELATION_IS_GLOBAL_TEMP(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP)
+
+#define RELATION_GTT_ON_COMMIT_DELETE(relation) \
+ ((relation)->rd_options && \
+ (relation)->rd_rel->relkind == RELKIND_RELATION && \
+ (relation)->rd_rel->relpersistence == RELPERSISTENCE_GLOBAL_TEMP ? \
+ ((StdRdOptions *) (relation)->rd_options)->on_commit_delete_rows : false)
+
+#define RelationGetRelPersistence(relation) ((relation)->rd_rel->relpersistence)
+
/* routines in utils/cache/relcache.c */
extern void RelationIncrementReferenceCount(Relation rel);
extern void RelationDecrementReferenceCount(Relation rel);
diff --git a/src/test/regress/expected/gtt_clean.out b/src/test/regress/expected/gtt_clean.out
new file mode 100644
index 0000000..50ca9ac
--- /dev/null
+++ b/src/test/regress/expected/gtt_clean.out
@@ -0,0 +1,7 @@
+reset search_path;
+drop schema gtt cascade;
+NOTICE: drop cascades to 4 other objects
+DETAIL: drop cascades to table gtt.gtt1
+drop cascades to table gtt.gtt2
+drop cascades to table gtt.gtt3
+drop cascades to table gtt.gtt_t_kenyon
diff --git a/src/test/regress/expected/gtt_error.out b/src/test/regress/expected/gtt_error.out
new file mode 100644
index 0000000..80c16dc
--- /dev/null
+++ b/src/test/regress/expected/gtt_error.out
@@ -0,0 +1,106 @@
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+set search_path=gtt_error,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+ERROR: cannot create indexes on global temporary tables using concurrent mode
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+ERROR: not support cluster global temporary tables yet
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+ERROR: ON COMMIT can only be used on temporary tables
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+ERROR: regular table cannot specifie on_commit_delete_rows
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+ERROR: not support create global temporary partition table yet
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+ERROR: not support create global temporary inheritance table yet
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+ERROR: global temp table not support on commit drop clause
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+ERROR: can not defeine global temp table with on commit and with clause at same time
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+--ERROR
+alter table gtt1 rename to gttx;
+ERROR: not support rename global temporary tables yet
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: referenced relation "products" is not a global temp table
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+ERROR: not support alter global temporary tables yet
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+ERROR: Global temp table does not yet support serial column
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+ERROR: Global temp table does not yet support serial column
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+ERROR: materialized views must not use global temporary tables or views
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+ERROR: only support btree index on global temp table
+create index idx_err on gtt1 using gist (a);
+ERROR: data type integer has no default operator class for access method "gist"
+HINT: You must specify an operator class for the index or define a default operator class for the data type.
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+ERROR: only support btree index on global temp table
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+ERROR: only support btree index on global temp table
+reset search_path;
+drop schema gtt_error cascade;
+NOTICE: drop cascades to 8 other objects
+DETAIL: drop cascades to table gtt_error.gtt1
+drop cascades to table gtt_error.gtt2
+drop cascades to table gtt_error.gtt3
+drop cascades to table gtt_error.tmp_t0
+drop cascades to table gtt_error.tbl_inherits_parent
+drop cascades to table gtt_error.tbl_inherits_parent_global_temp
+drop cascades to table gtt_error.products
+drop cascades to table gtt_error.gtt5
diff --git a/src/test/regress/expected/gtt_parallel_1.out b/src/test/regress/expected/gtt_parallel_1.out
new file mode 100644
index 0000000..30d8a7b
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_1.out
@@ -0,0 +1,84 @@
+set search_path=gtt,sys;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+ a | b
+---+---
+(0 rows)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_parallel_2.out b/src/test/regress/expected/gtt_parallel_2.out
new file mode 100644
index 0000000..70bf4a6
--- /dev/null
+++ b/src/test/regress/expected/gtt_parallel_2.out
@@ -0,0 +1,142 @@
+set search_path=gtt,sys;
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+ 3 | test1
+(3 rows)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test1
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+(1 row)
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 1 | test1
+ 2 | test2
+(2 rows)
+
+truncate gtt3;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 3 | test3
+(1 row)
+
+rollback;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+begin;
+select * from gtt3 order by a;
+ a | b
+---+---
+(0 rows)
+
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 5 | test5
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+ a | b
+---+-------
+ 6 | test6
+(1 row)
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+ count
+--------
+ 100000
+(1 row)
+
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+ QUERY PLAN
+------------------------------------
+ Index Scan using gtt3_pkey on gtt3
+ Index Cond: (a = 300)
+(2 rows)
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+ relname | pg_relation_size | pg_relation_size
+--------------+------------------+------------------
+ gtt_t_kenyon | 450560 | 16384
+(1 row)
+
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+ relname
+--------------
+ gtt_t_kenyon
+(1 row)
+
+reset search_path;
diff --git a/src/test/regress/expected/gtt_prepare.out b/src/test/regress/expected/gtt_prepare.out
new file mode 100644
index 0000000..9e8f5f0
--- /dev/null
+++ b/src/test/regress/expected/gtt_prepare.out
@@ -0,0 +1,7 @@
+CREATE SCHEMA IF NOT EXISTS gtt;
+set search_path=gtt,sys;
+create global temp table gtt1(a int primary key, b text);
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+reset search_path;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index fc0f141..6836eeb 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -121,3 +121,9 @@ test: fast_default
# run stats by itself because its delay may be insufficient under heavy load
test: stats
+
+# global temp table test
+test: gtt_error
+test: gtt_prepare
+test: gtt_parallel_1 gtt_parallel_2
+test: gtt_clean
diff --git a/src/test/regress/sql/gtt_clean.sql b/src/test/regress/sql/gtt_clean.sql
new file mode 100644
index 0000000..f3cf710
--- /dev/null
+++ b/src/test/regress/sql/gtt_clean.sql
@@ -0,0 +1,6 @@
+
+
+reset search_path;
+
+drop schema gtt cascade;
+
diff --git a/src/test/regress/sql/gtt_error.sql b/src/test/regress/sql/gtt_error.sql
new file mode 100644
index 0000000..e895574
--- /dev/null
+++ b/src/test/regress/sql/gtt_error.sql
@@ -0,0 +1,106 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt_error;
+
+set search_path=gtt_error,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table tmp_t0(c0 tsvector,c1 varchar(100));
+
+create table tbl_inherits_parent(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+create global temp table tbl_inherits_parent_global_temp(
+a int not null,
+b varchar(32) not null default 'Got u',
+c int check (c > 0),
+d date not null
+);
+
+CREATE global temp TABLE products (
+ product_no integer PRIMARY KEY,
+ name text,
+ price numeric
+);
+
+-- ERROR
+create index CONCURRENTLY idx_gtt1 on gtt1 (b);
+
+-- ERROR
+cluster gtt1 using gtt1_pkey;
+
+-- ERROR
+create table gtt1(a int primary key, b text) on commit delete rows;
+
+-- ERROR
+create table gtt1(a int primary key, b text) with(on_commit_delete_rows=true);
+
+-- ERROR
+CREATE global temp TABLE measurement (
+ logdate date not null,
+ peaktemp int,
+ unitsales int
+) PARTITION BY RANGE (logdate);
+
+-- ERROR
+create global temp table tbl_inherits_partition() inherits (tbl_inherits_parent);
+
+-- ERROR
+create global temp table gtt3(a int primary key, b text) on commit drop;
+
+-- ERROR
+create global temp table gtt4(a int primary key, b text) with(on_commit_delete_rows=true) on commit delete rows;
+
+-- ok
+create global temp table gtt5(a int primary key, b text) with(on_commit_delete_rows=true);
+
+--ERROR
+alter table gtt1 rename to gttx;
+
+-- ERROR
+ALTER TABLE gtt1 ADD COLUMN address varchar(30);
+
+-- ERROR
+CREATE TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE global temp TABLE orders (
+ order_id integer PRIMARY KEY,
+ product_no integer REFERENCES products (product_no),
+ quantity integer
+);
+
+-- ERROR
+CREATE GLOBAL TEMPORARY TABLE mytable (
+ id SERIAL PRIMARY KEY,
+ data text
+) on commit preserve rows;
+
+-- ERROR
+create global temp table gttx(id int GENERATED ALWAYS AS IDENTITY (START WITH 2));
+
+--ERROR
+CREATE MATERIALIZED VIEW mv_gtt1 as select * from gtt1;
+
+-- ALL ERROR
+create index idx_err on gtt1 using hash (a);
+create index idx_err on gtt1 using gist (a);
+create index idx_tmp_t0_1 on tmp_t0 using gin (c0);
+create index idx_tmp_t0_1 on tmp_t0 using gist (c0);
+
+reset search_path;
+
+drop schema gtt_error cascade;
+
diff --git a/src/test/regress/sql/gtt_parallel_1.sql b/src/test/regress/sql/gtt_parallel_1.sql
new file mode 100644
index 0000000..d7d81de
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_1.sql
@@ -0,0 +1,42 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+commit;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+rollback;
+select * from gtt1 order by a;
+
+truncate gtt1;
+select * from gtt1 order by a;
+
+begin;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+select * from gtt1 order by a;
+insert into gtt1 values(1, 'test1');
+rollback;
+select * from gtt1 order by a;
+
+begin;
+select * from gtt1 order by a;
+truncate gtt1;
+insert into gtt1 values(1, 'test1');
+select * from gtt1 order by a;
+truncate gtt1;
+commit;
+select * from gtt1 order by a;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_parallel_2.sql b/src/test/regress/sql/gtt_parallel_2.sql
new file mode 100644
index 0000000..cb2f7a6
--- /dev/null
+++ b/src/test/regress/sql/gtt_parallel_2.sql
@@ -0,0 +1,62 @@
+
+
+set search_path=gtt,sys;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test1');
+select * from gtt3 order by a;
+commit;
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(3, 'test1');
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+truncate gtt3;
+select * from gtt3 order by a;
+
+insert into gtt3 values(1, 'test1');
+select * from gtt3 order by a;
+
+begin;
+insert into gtt3 values(2, 'test2');
+select * from gtt3 order by a;
+truncate gtt3;
+select * from gtt3 order by a;
+insert into gtt3 values(3, 'test3');
+update gtt3 set a = 3 where b = 'test1';
+select * from gtt3 order by a;
+rollback;
+select * from gtt3 order by a;
+
+begin;
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(5, 'test5');
+select * from gtt3 order by a;
+truncate gtt3;
+insert into gtt3 values(6, 'test6');
+commit;
+select * from gtt3 order by a;
+
+truncate gtt3;
+insert into gtt3 values(generate_series(1,100000), 'testing');
+select count(*) from gtt3;
+analyze gtt3;
+explain (COSTS FALSE) select * from gtt3 where a =300;
+
+insert into gtt_t_kenyon select generate_series(1,2000),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God',500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',2000);
+insert into gtt_t_kenyon select generate_series(3,4),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',4000);
+insert into gtt_t_kenyon select generate_series(5,6),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',5500);
+insert into gtt_t_kenyon select generate_series(1,2),repeat('kenyon here'||'^_^',2),repeat('^_^ Kenyon is not God,Remark here!!',10000);
+select relname, pg_relation_size(oid),pg_relation_size(reltoastrelid) from pg_class where relname = 'gtt_t_kenyon';
+select relname from pg_class where relname = 'gtt_t_kenyon' and reltoastrelid != 0;
+
+reset search_path;
+
diff --git a/src/test/regress/sql/gtt_prepare.sql b/src/test/regress/sql/gtt_prepare.sql
new file mode 100644
index 0000000..042d9e6
--- /dev/null
+++ b/src/test/regress/sql/gtt_prepare.sql
@@ -0,0 +1,15 @@
+
+CREATE SCHEMA IF NOT EXISTS gtt;
+
+set search_path=gtt,sys;
+
+create global temp table gtt1(a int primary key, b text);
+
+create global temp table gtt2(a int primary key, b text) on commit delete rows;
+
+create global temp table gtt3(a int primary key, b text) on commit PRESERVE rows;
+
+create global temp table gtt_t_kenyon(id int,vname varchar(48),remark text) on commit PRESERVE rows;
+
+reset search_path;
+
--
libgit2 0.23.3
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 15:13 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:37 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-06 13:24 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 16:32 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-08 07:50 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-08 12:57 ` Konstantin Knizhnik <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-08 12:57 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; +Cc: Robert Haas <[email protected]>; Pavel Stehule <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 08.11.2019 10:50, 曾文旌(义从) wrote:
> In my opinion, it is not a good idea to trigger a btbuild with a select or DML, the cost of which depends on the amount of data in the GTT.
IMHO it is better than returning error.
Also index will be used only if cost of plan with index will be
considered better than cost of plan without index. If you do not have
index, then you have to scan the whole table.
Time of such scan is comparable with time of building index.
Yes, I agree that indexes for GTT are used to be created together with
table itself before it is used by any application.
But if later DBA recognized that efficient execution of queries requires
some more indexes,
it will be strange and dangerous to prevent him from adding such index
until all clients which have accessed this table will drop their
connections.
Also maintaining in shared memory information about attached backends
seems to be overkill.
>>
>> This code initializes B-Tree and load data in it when GTT index is access and is not initialized yet.
>> It looks a little bit hacker but it works.
>>
>> I also wonder why you are keeping information about GTT in shared memory. Looks like the only information we really need to share is table's metadata.
>> But it is already shared though catalog. All other GTT related information is private to backend so I do not see reasons to place it in shared memory.
> The shared hash structure tracks which backend has initialized the GTT storage in order to implement the DDL of the GTT.
Sorry, I do not understand this argument.
DDL is performed on shared metadata present in global catalog.
Standard postgres invalidation mechanism is used to notify all backends
about schema changes.
Why do we need to maintain some extra information in shared memory.
Can you give me example of DLL which does't work without such shared hash?
> As for GTT, there is only one definition(include index on GTT), but each backend may have one data.
> For the implementation of drop GTT, I assume that all data and definitions need to be deleted.
Data of dropped GTT is removed on normal backend termination or cleaned
up at server restart in case of abnormal shutdown (as it is done for
local temp tables).
I have not used any shared control structures for GTT in my
implementation and that is why I wonder why do you need it and what are
the expected problems with my
implementation?
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-10-25 16:22 ` Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-10-28 07:15 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-28 12:13 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
1 sibling, 3 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-10-25 16:22 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 25.10.2019 18:01, Robert Haas wrote:
> On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
> <[email protected]> wrote:
>> Just to clarify.
>> I have now proposed several different solutions for GTT:
>>
>> Shared vs. private buffers for GTT:
>> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
>> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
> I vote for #1. I think parallel query for temp objects may be a
> desirable feature, but I don't think it should be the job of a patch
> implementing GTTs to make it happen. In fact, I think it would be an
> actively bad idea, because I suspect that if we do eventually support
> temp relations for parallel query, we're going to want a solution that
> is shared between regular temp tables and global temp tables, not
> separate solutions for each.
Sorry, may be I do not not understand you.
It seems to me that there is only one thing preventing usage of
temporary tables in parallel plans: private buffers.
If global temporary tables are accessed as normal tables though shared
buffers then them can be used in parallel queries
and no extra support is required for it.
At least I have checked that parallel queries are correctly worked for
my implementation of GTT with shared buffers.
So I do not understand about which "separate solutions" you are talking
about.
I can agree that private buffers may be good starting point for GTT
implementation, because it is less invasive and GTT access speed is
exactly the same as of normal temp tables.
But I do not understand your argument why it is "actively bad idea".
>> Access to GTT at replica:
>> 1. Access is prohibited (as for original temp tables). No changes at all.
>> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
>> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
>> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
> I again vote for #1. A GTT is defined to allow data to be visible only
> within one session -- so what does it even mean for the data to be
> accessible on a replica?
There are sessions at replica (in case of hot standby), aren't there?
>
>> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
>> If all of the following conditions are true:
>>
>> 1) GTT are used in joins
>> 2) There are indexes defined for GTT
>> 3) Size and histogram of GTT in different backends can significantly vary.
>> 4) ANALYZE was explicitly called for GTT
>>
>> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
>> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
> I think that's *definitely* a show stopper.
Well, if both you and Pavel think that it is really "show stopper", then
this problem really has to be addressed.
I slightly confused about this opinion, because Pavel has told me
himself that 99% of users never create indexes for temp tables
or run "analyze" for them. And without it, this problem is not a problem
at all.
>> I still do not understand the opinion of community which functionality of GTT is considered to be most important.
>> But the patch with local buffers and no replica support is small enough to become good starting point.
> Well, it seems we now have two patches for this feature. I guess we
> need to figure out which one is better, and whether it's possible for
> the two efforts to be merged, rather than having two different teams
> hacking on separate code bases.
I am open for cooperations.
Source code of all my patches is available.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-25 17:00 ` Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2 siblings, 1 reply; 1002+ messages in thread
From: Pavel Stehule @ 2019-10-25 17:00 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
> >
> >> So except the limitation mentioned above (which I do not consider as
> critical) there is only one problem which was not addressed: maintaining
> statistics for GTT.
> >> If all of the following conditions are true:
> >>
> >> 1) GTT are used in joins
> >> 2) There are indexes defined for GTT
> >> 3) Size and histogram of GTT in different backends can significantly
> vary.
> >> 4) ANALYZE was explicitly called for GTT
> >>
> >> then query execution plan built in one backend will be also used for
> other backends where it can be inefficient.
> >> I also do not consider this problem as "show stopper" for adding GTT to
> Postgres.
> > I think that's *definitely* a show stopper.
> Well, if both you and Pavel think that it is really "show stopper", then
> this problem really has to be addressed.
> I slightly confused about this opinion, because Pavel has told me
> himself that 99% of users never create indexes for temp tables
> or run "analyze" for them. And without it, this problem is not a problem
> at all.
>
>
Users doesn't do ANALYZE on temp tables in 99%. It's true. But second fact
is so users has lot of problems. It's very similar to wrong statistics on
persistent tables. When data are small, then it is not problem for users,
although from my perspective it's not optimal. When data are not small,
then the problem can be brutal. Temporary tables are not a exception. And
users and developers are people - we know only about fatal problems. There
are lot of unoptimized queries, but because the problem is not fatal, then
it is not reason for report it. And lot of people has not any idea how fast
the databases can be. The knowledges of users and app developers are sad
book.
Pavel
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-01 15:15 ` Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-08 15:06 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
0 siblings, 2 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-01 15:15 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 25.10.2019 20:00, Pavel Stehule wrote:
>
> >
> >> So except the limitation mentioned above (which I do not
> consider as critical) there is only one problem which was not
> addressed: maintaining statistics for GTT.
> >> If all of the following conditions are true:
> >>
> >> 1) GTT are used in joins
> >> 2) There are indexes defined for GTT
> >> 3) Size and histogram of GTT in different backends can
> significantly vary.
> >> 4) ANALYZE was explicitly called for GTT
> >>
> >> then query execution plan built in one backend will be also
> used for other backends where it can be inefficient.
> >> I also do not consider this problem as "show stopper" for
> adding GTT to Postgres.
> > I think that's *definitely* a show stopper.
> Well, if both you and Pavel think that it is really "show
> stopper", then
> this problem really has to be addressed.
> I slightly confused about this opinion, because Pavel has told me
> himself that 99% of users never create indexes for temp tables
> or run "analyze" for them. And without it, this problem is not a
> problem
> at all.
>
>
> Users doesn't do ANALYZE on temp tables in 99%. It's true. But second
> fact is so users has lot of problems. It's very similar to wrong
> statistics on persistent tables. When data are small, then it is not
> problem for users, although from my perspective it's not optimal. When
> data are not small, then the problem can be brutal. Temporary tables
> are not a exception. And users and developers are people - we know
> only about fatal problems. There are lot of unoptimized queries, but
> because the problem is not fatal, then it is not reason for report it.
> And lot of people has not any idea how fast the databases can be. The
> knowledges of users and app developers are sad book.
>
> Pavel
It seems to me that I have found quite elegant solution for per-backend
statistic for GTT: I just inserting it in backend's catalog cache, but
not in pg_statistic table itself.
To do it I have to add InsertSysCache/InsertCatCache functions which
insert pinned entry in the correspondent cache.
I wonder if there are some pitfalls of such approach?
New patch for GTT is attached.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] global_private_temp-4.patch (67.7K, ../../[email protected]/3-global_private_temp-4.patch)
download | inline diff:
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c
index 647350c..ca5f22d 100644
--- a/src/backend/access/brin/brin_revmap.c
+++ b/src/backend/access/brin/brin_revmap.c
@@ -25,6 +25,7 @@
#include "access/brin_revmap.h"
#include "access/brin_tuple.h"
#include "access/brin_xlog.h"
+#include "access/brin.h"
#include "access/rmgr.h"
#include "access/xloginsert.h"
#include "miscadmin.h"
@@ -79,6 +80,11 @@ brinRevmapInitialize(Relation idxrel, BlockNumber *pagesPerRange,
meta = ReadBuffer(idxrel, BRIN_METAPAGE_BLKNO);
LockBuffer(meta, BUFFER_LOCK_SHARE);
page = BufferGetPage(meta);
+
+ if (GlobalTempRelationPageIsNotInitialized(idxrel, page))
+ brin_metapage_init(page, BrinGetPagesPerRange(idxrel),
+ BRIN_CURRENT_VERSION);
+
TestForOldSnapshot(snapshot, idxrel, page);
metadata = (BrinMetaPageData *) PageGetContents(page);
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 439a91b..8a6ac71 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -241,6 +241,16 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
metabuffer = ReadBuffer(index, GIN_METAPAGE_BLKNO);
metapage = BufferGetPage(metabuffer);
+ if (GlobalTempRelationPageIsNotInitialized(index, metapage))
+ {
+ Buffer rootbuffer = ReadBuffer(index, GIN_ROOT_BLKNO);
+ LockBuffer(rootbuffer, BUFFER_LOCK_EXCLUSIVE);
+ GinInitMetabuffer(metabuffer);
+ GinInitBuffer(rootbuffer, GIN_LEAF);
+ MarkBufferDirty(rootbuffer);
+ UnlockReleaseBuffer(rootbuffer);
+ }
+
/*
* An insertion to the pending list could logically belong anywhere in the
* tree, so it conflicts with all serializable scans. All scans acquire a
diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index b18ae2b..41bab5d 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -1750,7 +1750,7 @@ collectMatchesForHeapRow(IndexScanDesc scan, pendingPosition *pos)
/*
* Collect all matched rows from pending list into bitmap.
*/
-static void
+static bool
scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
{
GinScanOpaque so = (GinScanOpaque) scan->opaque;
@@ -1774,6 +1774,12 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
LockBuffer(metabuffer, GIN_SHARE);
page = BufferGetPage(metabuffer);
TestForOldSnapshot(scan->xs_snapshot, scan->indexRelation, page);
+
+ if (GlobalTempRelationPageIsNotInitialized(scan->indexRelation, page))
+ {
+ UnlockReleaseBuffer(metabuffer);
+ return false;
+ }
blkno = GinPageGetMeta(page)->head;
/*
@@ -1784,7 +1790,7 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
{
/* No pending list, so proceed with normal scan */
UnlockReleaseBuffer(metabuffer);
- return;
+ return true;
}
pos.pendingBuffer = ReadBuffer(scan->indexRelation, blkno);
@@ -1840,6 +1846,7 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
}
pfree(pos.hasMatchKey);
+ return true;
}
@@ -1875,7 +1882,8 @@ gingetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
* to scan the main index before the pending list, since concurrent
* cleanup could then make us miss entries entirely.
*/
- scanPendingInsert(scan, tbm, &ntids);
+ if (!scanPendingInsert(scan, tbm, &ntids))
+ return 0;
/*
* Now scan the main index.
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 0cc8791..3215b6f 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -677,7 +677,10 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace,
if (!xlocked)
{
LockBuffer(stack->buffer, GIST_SHARE);
- gistcheckpage(state.r, stack->buffer);
+ if (stack->blkno == GIST_ROOT_BLKNO && GlobalTempRelationPageIsNotInitialized(state.r, BufferGetPage(stack->buffer)))
+ GISTInitBuffer(stack->buffer, F_LEAF);
+ else
+ gistcheckpage(state.r, stack->buffer);
}
stack->page = (Page) BufferGetPage(stack->buffer);
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 22d790d..4c52dbe 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -344,7 +344,10 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem,
buffer = ReadBuffer(scan->indexRelation, pageItem->blkno);
LockBuffer(buffer, GIST_SHARE);
PredicateLockPage(r, BufferGetBlockNumber(buffer), scan->xs_snapshot);
- gistcheckpage(scan->indexRelation, buffer);
+ if (pageItem->blkno == GIST_ROOT_BLKNO && GlobalTempRelationPageIsNotInitialized(r, BufferGetPage(buffer)))
+ GISTInitBuffer(buffer, F_LEAF);
+ else
+ gistcheckpage(scan->indexRelation, buffer);
page = BufferGetPage(buffer);
TestForOldSnapshot(scan->xs_snapshot, r, page);
opaque = GistPageGetOpaque(page);
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 45804d7..50b306a 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1028,7 +1028,7 @@ gistGetFakeLSN(Relation rel)
{
static XLogRecPtr counter = FirstNormalUnloggedLSN;
- if (rel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ if (RelationHasSessionScope(rel))
{
/*
* Temporary relations are only accessible in our session, so a simple
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 838ee68..4f794b3 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -75,13 +75,20 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
buf = ReadBuffer(rel, blkno);
- if (access != HASH_NOLOCK)
- LockBuffer(buf, access);
-
/* ref count and lock type are correct */
- _hash_checkpage(rel, buf, flags);
-
+ if (blkno == HASH_METAPAGE && GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
+ {
+ _hash_init(rel, 0, MAIN_FORKNUM);
+ if (access != HASH_NOLOCK)
+ LockBuffer(buf, access);
+ }
+ else
+ {
+ if (access != HASH_NOLOCK)
+ LockBuffer(buf, access);
+ _hash_checkpage(rel, buf, flags);
+ }
return buf;
}
@@ -339,7 +346,7 @@ _hash_init(Relation rel, double num_tuples, ForkNumber forkNum)
bool use_wal;
/* safety check */
- if (RelationGetNumberOfBlocksInFork(rel, forkNum) != 0)
+ if (rel->rd_rel->relpersistence != RELPERSISTENCE_SESSION && RelationGetNumberOfBlocksInFork(rel, forkNum) != 0)
elog(ERROR, "cannot initialize non-empty hash index \"%s\"",
RelationGetRelationName(rel));
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 2dd8821..92df373 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -673,6 +673,7 @@ heapam_relation_copy_data(Relation rel, const RelFileNode *newrnode)
* init fork of an unlogged relation.
*/
if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION ||
(rel->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
forkNum == INIT_FORKNUM))
log_smgrcreate(newrnode, forkNum);
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 268f869..ed3ab70 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -763,7 +763,11 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
/* Read an existing block of the relation */
buf = ReadBuffer(rel, blkno);
LockBuffer(buf, access);
- _bt_checkpage(rel, buf);
+ /* Session temporary relation may be not yet initialized for this backend. */
+ if (blkno == BTREE_METAPAGE && GlobalTempRelationPageIsNotInitialized(rel, BufferGetPage(buf)))
+ _bt_initmetapage(BufferGetPage(buf), P_NONE, 0);
+ else
+ _bt_checkpage(rel, buf);
}
else
{
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 45472db..a8497a2 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -106,6 +106,7 @@ spgGetCache(Relation index)
spgConfigIn in;
FmgrInfo *procinfo;
Buffer metabuffer;
+ Page metapage;
SpGistMetaPageData *metadata;
cache = MemoryContextAllocZero(index->rd_indexcxt,
@@ -155,12 +156,32 @@ spgGetCache(Relation index)
metabuffer = ReadBuffer(index, SPGIST_METAPAGE_BLKNO);
LockBuffer(metabuffer, BUFFER_LOCK_SHARE);
- metadata = SpGistPageGetMeta(BufferGetPage(metabuffer));
+ metapage = BufferGetPage(metabuffer);
+ metadata = SpGistPageGetMeta(metapage);
if (metadata->magicNumber != SPGIST_MAGIC_NUMBER)
- elog(ERROR, "index \"%s\" is not an SP-GiST index",
- RelationGetRelationName(index));
+ {
+ if (GlobalTempRelationPageIsNotInitialized(index, metapage))
+ {
+ Buffer rootbuffer = ReadBuffer(index, SPGIST_ROOT_BLKNO);
+ Buffer nullbuffer = ReadBuffer(index, SPGIST_NULL_BLKNO);
+
+ SpGistInitMetapage(metapage);
+
+ LockBuffer(rootbuffer, BUFFER_LOCK_EXCLUSIVE);
+ SpGistInitPage(BufferGetPage(rootbuffer), SPGIST_LEAF);
+ MarkBufferDirty(rootbuffer);
+ UnlockReleaseBuffer(rootbuffer);
+ LockBuffer(nullbuffer, BUFFER_LOCK_EXCLUSIVE);
+ SpGistInitPage(BufferGetPage(nullbuffer), SPGIST_LEAF | SPGIST_NULLS);
+ MarkBufferDirty(nullbuffer);
+ UnlockReleaseBuffer(nullbuffer);
+ }
+ else
+ elog(ERROR, "index \"%s\" is not an SP-GiST index",
+ RelationGetRelationName(index));
+ }
cache->lastUsedPages = metadata->lastUsedPages;
UnlockReleaseBuffer(metabuffer);
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 1af31c2..e60bdb7 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -402,6 +402,9 @@ GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence)
case RELPERSISTENCE_TEMP:
backend = BackendIdForTempRelations();
break;
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index f6c31cc..d943b57 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3652,7 +3652,7 @@ reindex_relation(Oid relid, int flags, int options)
if (flags & REINDEX_REL_FORCE_INDEXES_UNLOGGED)
persistence = RELPERSISTENCE_UNLOGGED;
else if (flags & REINDEX_REL_FORCE_INDEXES_PERMANENT)
- persistence = RELPERSISTENCE_PERMANENT;
+ persistence = rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION ? RELPERSISTENCE_SESSION : RELPERSISTENCE_PERMANENT;
else
persistence = rel->rd_rel->relpersistence;
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 625af8d..1e192fa 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -93,6 +93,10 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
backend = InvalidBackendId;
needs_wal = false;
break;
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ needs_wal = false;
+ break;
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
needs_wal = true;
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 7accb95..9f2ea48 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -102,7 +102,7 @@ static int acquire_inherited_sample_rows(Relation onerel, int elevel,
HeapTuple *rows, int targrows,
double *totalrows, double *totaldeadrows);
static void update_attstats(Oid relid, bool inh,
- int natts, VacAttrStats **vacattrstats);
+ int natts, VacAttrStats **vacattrstats, bool is_global_temp);
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
@@ -318,6 +318,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
Oid save_userid;
int save_sec_context;
int save_nestlevel;
+ bool is_global_temp = onerel->rd_rel->relpersistence == RELPERSISTENCE_SESSION;
if (inh)
ereport(elevel,
@@ -575,14 +576,14 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* pg_statistic for columns we didn't process, we leave them alone.)
*/
update_attstats(RelationGetRelid(onerel), inh,
- attr_cnt, vacattrstats);
+ attr_cnt, vacattrstats, is_global_temp);
for (ind = 0; ind < nindexes; ind++)
{
AnlIndexData *thisdata = &indexdata[ind];
update_attstats(RelationGetRelid(Irel[ind]), false,
- thisdata->attr_cnt, thisdata->vacattrstats);
+ thisdata->attr_cnt, thisdata->vacattrstats, is_global_temp);
}
/*
@@ -1425,7 +1426,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
* by taking a self-exclusive lock on the relation in analyze_rel().
*/
static void
-update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
+update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats, bool is_global_temp)
{
Relation sd;
int attno;
@@ -1527,30 +1528,42 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats)
}
}
- /* Is there already a pg_statistic tuple for this attribute? */
- oldtup = SearchSysCache3(STATRELATTINH,
- ObjectIdGetDatum(relid),
- Int16GetDatum(stats->attr->attnum),
- BoolGetDatum(inh));
-
- if (HeapTupleIsValid(oldtup))
+ if (is_global_temp)
{
- /* Yes, replace it */
- stup = heap_modify_tuple(oldtup,
- RelationGetDescr(sd),
- values,
- nulls,
- replaces);
- ReleaseSysCache(oldtup);
- CatalogTupleUpdate(sd, &stup->t_self, stup);
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ InsertSysCache(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh),
+ 0,
+ stup);
}
else
{
- /* No, insert new tuple */
- stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
- CatalogTupleInsert(sd, stup);
- }
+ /* Is there already a pg_statistic tuple for this attribute? */
+ oldtup = SearchSysCache3(STATRELATTINH,
+ ObjectIdGetDatum(relid),
+ Int16GetDatum(stats->attr->attnum),
+ BoolGetDatum(inh));
+ if (HeapTupleIsValid(oldtup))
+ {
+ /* Yes, replace it */
+ stup = heap_modify_tuple(oldtup,
+ RelationGetDescr(sd),
+ values,
+ nulls,
+ replaces);
+ ReleaseSysCache(oldtup);
+ CatalogTupleUpdate(sd, &stup->t_self, stup);
+ }
+ else
+ {
+ /* No, insert new tuple */
+ stup = heap_form_tuple(RelationGetDescr(sd), values, nulls);
+ CatalogTupleInsert(sd, stup);
+ }
+ }
heap_freetuple(stup);
}
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a23128d..5d131a7 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -1400,7 +1400,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
*/
if (newrelpersistence == RELPERSISTENCE_UNLOGGED)
reindex_flags |= REINDEX_REL_FORCE_INDEXES_UNLOGGED;
- else if (newrelpersistence == RELPERSISTENCE_PERMANENT)
+ else if (newrelpersistence != RELPERSISTENCE_TEMP)
reindex_flags |= REINDEX_REL_FORCE_INDEXES_PERMANENT;
/* Report that we are now reindexing relations */
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index a13322b..be661a4 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -94,7 +94,7 @@ static HTAB *seqhashtab = NULL; /* hash table for SeqTable items */
*/
static SeqTableData *last_used_seq = NULL;
-static void fill_seq_with_data(Relation rel, HeapTuple tuple);
+static void fill_seq_with_data(Relation rel, HeapTuple tuple, Buffer buf);
static Relation lock_and_open_sequence(SeqTable seq);
static void create_seq_hashtable(void);
static void init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel);
@@ -222,7 +222,7 @@ DefineSequence(ParseState *pstate, CreateSeqStmt *seq)
/* now initialize the sequence's data */
tuple = heap_form_tuple(tupDesc, value, null);
- fill_seq_with_data(rel, tuple);
+ fill_seq_with_data(rel, tuple, InvalidBuffer);
/* process OWNED BY if given */
if (owned_by)
@@ -327,7 +327,7 @@ ResetSequence(Oid seq_relid)
/*
* Insert the modified tuple into the new storage file.
*/
- fill_seq_with_data(seq_rel, tuple);
+ fill_seq_with_data(seq_rel, tuple, InvalidBuffer);
/* Clear local cache so that we don't think we have cached numbers */
/* Note that we do not change the currval() state */
@@ -340,18 +340,21 @@ ResetSequence(Oid seq_relid)
* Initialize a sequence's relation with the specified tuple as content
*/
static void
-fill_seq_with_data(Relation rel, HeapTuple tuple)
+fill_seq_with_data(Relation rel, HeapTuple tuple, Buffer buf)
{
- Buffer buf;
Page page;
sequence_magic *sm;
OffsetNumber offnum;
+ bool lockBuffer = false;
/* Initialize first page of relation with special magic number */
- buf = ReadBuffer(rel, P_NEW);
- Assert(BufferGetBlockNumber(buf) == 0);
-
+ if (buf == InvalidBuffer)
+ {
+ buf = ReadBuffer(rel, P_NEW);
+ Assert(BufferGetBlockNumber(buf) == 0);
+ lockBuffer = true;
+ }
page = BufferGetPage(buf);
PageInit(page, BufferGetPageSize(buf), sizeof(sequence_magic));
@@ -360,7 +363,8 @@ fill_seq_with_data(Relation rel, HeapTuple tuple)
/* Now insert sequence tuple */
- LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
+ if (lockBuffer)
+ LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
/*
* Since VACUUM does not process sequences, we have to force the tuple to
@@ -410,7 +414,8 @@ fill_seq_with_data(Relation rel, HeapTuple tuple)
END_CRIT_SECTION();
- UnlockReleaseBuffer(buf);
+ if (lockBuffer)
+ UnlockReleaseBuffer(buf);
}
/*
@@ -502,7 +507,7 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt)
/*
* Insert the modified tuple into the new storage file.
*/
- fill_seq_with_data(seqrel, newdatatuple);
+ fill_seq_with_data(seqrel, newdatatuple, InvalidBuffer);
}
/* process OWNED BY if given */
@@ -1178,6 +1183,17 @@ read_seq_tuple(Relation rel, Buffer *buf, HeapTuple seqdatatuple)
LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
page = BufferGetPage(*buf);
+ if (GlobalTempRelationPageIsNotInitialized(rel, page))
+ {
+ /* Initialize sequence for global temporary tables */
+ Datum value[SEQ_COL_LASTCOL] = {0};
+ bool null[SEQ_COL_LASTCOL] = {false};
+ HeapTuple tuple;
+ value[SEQ_COL_LASTVAL-1] = Int64GetDatumFast(1); /* start sequence with 1 */
+ tuple = heap_form_tuple(RelationGetDescr(rel), value, null);
+ fill_seq_with_data(rel, tuple, *buf);
+ }
+
sm = (sequence_magic *) PageGetSpecialPointer(page);
if (sm->magic != SEQ_MAGIC)
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 8d25d14..50d0402 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -587,7 +587,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* Check consistency of arguments
*/
if (stmt->oncommit != ONCOMMIT_NOOP
- && stmt->relation->relpersistence != RELPERSISTENCE_TEMP)
+ && !IsLocalRelpersistence(stmt->relation->relpersistence))
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("ON COMMIT can only be used on temporary tables")));
@@ -1772,7 +1772,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
* table or the current physical file to be thrown away anyway.
*/
if (rel->rd_createSubid == mySubid ||
- rel->rd_newRelfilenodeSubid == mySubid)
+ rel->rd_newRelfilenodeSubid == mySubid ||
+ rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION)
{
/* Immediate, non-rollbackable truncation is OK */
heap_truncate_one_rel(rel);
@@ -7708,6 +7709,12 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("constraints on unlogged tables may reference only permanent or unlogged tables")));
break;
+ case RELPERSISTENCE_SESSION:
+ if (pkrel->rd_rel->relpersistence != RELPERSISTENCE_SESSION)
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("constraints on session tables may reference only session tables")));
+ break;
case RELPERSISTENCE_TEMP:
if (pkrel->rd_rel->relpersistence != RELPERSISTENCE_TEMP)
ereport(ERROR,
@@ -14140,6 +14147,13 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
RelationGetRelationName(rel)),
errtable(rel)));
break;
+ case RELPERSISTENCE_SESSION:
+ ereport(ERROR,
+ (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+ errmsg("cannot change logged status of session table \"%s\"",
+ RelationGetRelationName(rel)),
+ errtable(rel)));
+ break;
case RELPERSISTENCE_PERMANENT:
if (toLogged)
/* nothing to do */
@@ -14627,14 +14641,7 @@ PreCommit_on_commit_actions(void)
/* Do nothing (there shouldn't be such entries, actually) */
break;
case ONCOMMIT_DELETE_ROWS:
-
- /*
- * If this transaction hasn't accessed any temporary
- * relations, we can skip truncating ON COMMIT DELETE ROWS
- * tables, as they must still be empty.
- */
- if ((MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
- oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
+ oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
break;
case ONCOMMIT_DROP:
oids_to_drop = lappend_oid(oids_to_drop, oc->relid);
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 3f67aaf..565c868 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -3266,20 +3266,11 @@ OptTemp: TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| TEMP { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMPORARY { $$ = RELPERSISTENCE_TEMP; }
| LOCAL TEMP { $$ = RELPERSISTENCE_TEMP; }
- | GLOBAL TEMPORARY
- {
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
- | GLOBAL TEMP
- {
- ereport(WARNING,
- (errmsg("GLOBAL is deprecated in temporary table creation"),
- parser_errposition(@1)));
- $$ = RELPERSISTENCE_TEMP;
- }
+ | GLOBAL TEMPORARY { $$ = RELPERSISTENCE_SESSION; }
+ | GLOBAL TEMP { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION TEMPORARY { $$ = RELPERSISTENCE_SESSION; }
+ | SESSION TEMP { $$ = RELPERSISTENCE_SESSION; }
| UNLOGGED { $$ = RELPERSISTENCE_UNLOGGED; }
| /*EMPTY*/ { $$ = RELPERSISTENCE_PERMANENT; }
;
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index ee47547..ea7fe4c 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -437,6 +437,14 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
seqstmt->options = seqoptions;
/*
+ * Why we should not always use persistence of parent table?
+ * Although it is prohibited to have unlogged sequences,
+ * unlogged tables with SERIAL fields are accepted!
+ */
+ if (cxt->relation->relpersistence != RELPERSISTENCE_UNLOGGED)
+ seqstmt->sequence->relpersistence = cxt->relation->relpersistence;
+
+ /*
* If a sequence data type was specified, add it to the options. Prepend
* to the list rather than append; in case a user supplied their own AS
* clause, the "redundant options" error will point to their occurrence,
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index c1dd816..dcfc134 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -2157,7 +2157,7 @@ do_autovacuum(void)
/*
* We cannot safely process other backends' temp tables, so skip 'em.
*/
- if (classForm->relpersistence == RELPERSISTENCE_TEMP)
+ if (IsLocalRelpersistence(classForm->relpersistence))
continue;
relid = classForm->oid;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 07f3c93..5db79ec 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -33,6 +33,7 @@
#include "postmaster/bgwriter.h"
#include "storage/fd.h"
#include "storage/bufmgr.h"
+#include "storage/ipc.h"
#include "storage/md.h"
#include "storage/relfilenode.h"
#include "storage/smgr.h"
@@ -87,6 +88,18 @@ typedef struct _MdfdVec
static MemoryContext MdCxt; /* context for all MdfdVec objects */
+/*
+ * Structure used to collect information created by this backend.
+ * Data of this related should be deleted on backend exit.
+ */
+typedef struct SessionRelation
+{
+ RelFileNodeBackend rnode;
+ struct SessionRelation* next;
+} SessionRelation;
+
+
+static SessionRelation* SessionRelations;
/* Populate a file tag describing an md.c segment file. */
#define INIT_MD_FILETAG(a,xx_rnode,xx_forknum,xx_segno) \
@@ -152,6 +165,45 @@ mdinit(void)
ALLOCSET_DEFAULT_SIZES);
}
+
+/*
+ * Delete all data of session relations and remove their pages from shared buffers.
+ * This function is called on backend exit.
+ */
+static void
+TruncateSessionRelations(int code, Datum arg)
+{
+ SessionRelation* rel;
+ for (rel = SessionRelations; rel != NULL; rel = rel->next)
+ {
+ /* Delete relation files */
+ mdunlink(rel->rnode, InvalidForkNumber, false);
+ }
+}
+
+/*
+ * Maintain information about session relations accessed by this backend.
+ * This list is needed to perform cleanup on backend exit.
+ * Session relation is linked in this list when this relation is created or opened and file doesn't exist.
+ * Such procedure guarantee that each relation is linked into list only once.
+ */
+static void
+RegisterSessionRelation(SMgrRelation reln)
+{
+ SessionRelation* rel = (SessionRelation*)MemoryContextAlloc(TopMemoryContext, sizeof(SessionRelation));
+
+ /*
+ * Perform session relation cleanup on backend exit. We are using shared memory hook, because
+ * cleanup should be performed before backend is disconnected from shared memory.
+ */
+ if (SessionRelations == NULL)
+ on_shmem_exit(TruncateSessionRelations, 0);
+
+ rel->rnode = reln->smgr_rnode;
+ rel->next = SessionRelations;
+ SessionRelations = rel;
+}
+
/*
* mdexists() -- Does the physical file exist?
*
@@ -218,6 +270,8 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
errmsg("could not create file \"%s\": %m", path)));
}
}
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ RegisterSessionRelation(reln);
pfree(path);
@@ -465,6 +519,19 @@ mdopenfork(SMgrRelation reln, ForkNumber forknum, int behavior)
if (fd < 0)
{
+ /*
+ * In case of session relation access, there may be no yet files of this relation for this backend.
+ * If so, then create file and register session relation for truncation on backend exit.
+ */
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ {
+ fd = PathNameOpenFile(path, O_RDWR | PG_BINARY | O_CREAT);
+ if (fd >= 0)
+ {
+ RegisterSessionRelation(reln);
+ goto NewSegment;
+ }
+ }
if ((behavior & EXTENSION_RETURN_NULL) &&
FILE_POSSIBLY_DELETED(errno))
{
@@ -476,6 +543,7 @@ mdopenfork(SMgrRelation reln, ForkNumber forknum, int behavior)
errmsg("could not open file \"%s\": %m", path)));
}
+ NewSegment:
pfree(path);
_fdvec_resize(reln, forknum, 1);
@@ -652,8 +720,13 @@ mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
* complaining. This allows, for example, the case of trying to
* update a block that was later truncated away.
*/
- if (zero_damaged_pages || InRecovery)
+ if (zero_damaged_pages || InRecovery || RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ {
MemSet(buffer, 0, BLCKSZ);
+ /* In case of session relation we need to write zero page to provide correct result of subsequent mdnblocks */
+ if (RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode))
+ mdwrite(reln, forknum, blocknum, buffer, true);
+ }
else
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
@@ -738,12 +811,18 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
BlockNumber
mdnblocks(SMgrRelation reln, ForkNumber forknum)
{
- MdfdVec *v = mdopenfork(reln, forknum, EXTENSION_FAIL);
+ /*
+ * If we access session relation, there may be no files yet of this relation for this backend.
+ * Pass EXTENSION_RETURN_NULL to make mdopen return NULL in this case instead of reporting error.
+ */
+ MdfdVec *v = mdopenfork(reln, forknum, RelFileNodeBackendIsGlobalTemp(reln->smgr_rnode)
+ ? EXTENSION_RETURN_NULL : EXTENSION_FAIL);
BlockNumber nblocks;
BlockNumber segno = 0;
/* mdopen has opened the first segment */
- Assert(reln->md_num_open_segs[forknum] > 0);
+ if (reln->md_num_open_segs[forknum] == 0)
+ return 0;
/*
* Start from the last open segments, to avoid redundant seeks. We have
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index a87e721..2401361 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -994,6 +994,9 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
/* Determine owning backend. */
switch (relform->relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ backend = BackendIdForSessionRelations();
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
backend = InvalidBackendId;
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index c3e7d94..6d86c28 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1191,6 +1191,111 @@ SearchCatCache4(CatCache *cache,
return SearchCatCacheInternal(cache, 4, v1, v2, v3, v4);
}
+
+void InsertCatCache(CatCache *cache,
+ Datum v1, Datum v2, Datum v3, Datum v4,
+ HeapTuple tuple)
+{
+ Datum arguments[CATCACHE_MAXKEYS];
+ uint32 hashValue;
+ Index hashIndex;
+ CatCTup *ct;
+ dlist_iter iter;
+ dlist_head *bucket;
+ int nkeys = cache->cc_nkeys;
+ MemoryContext oldcxt;
+ int i;
+
+ /*
+ * one-time startup overhead for each cache
+ */
+ if (unlikely(cache->cc_tupdesc == NULL))
+ CatalogCacheInitializeCache(cache);
+
+ /* Initialize local parameter array */
+ arguments[0] = v1;
+ arguments[1] = v2;
+ arguments[2] = v3;
+ arguments[3] = v4;
+ /*
+ * find the hash bucket in which to look for the tuple
+ */
+ hashValue = CatalogCacheComputeHashValue(cache, nkeys, v1, v2, v3, v4);
+ hashIndex = HASH_INDEX(hashValue, cache->cc_nbuckets);
+
+ /*
+ * scan the hash bucket until we find a match or exhaust our tuples
+ *
+ * Note: it's okay to use dlist_foreach here, even though we modify the
+ * dlist within the loop, because we don't continue the loop afterwards.
+ */
+ bucket = &cache->cc_bucket[hashIndex];
+ dlist_foreach(iter, bucket)
+ {
+ ct = dlist_container(CatCTup, cache_elem, iter.cur);
+
+ if (ct->dead)
+ continue; /* ignore dead entries */
+
+ if (ct->hash_value != hashValue)
+ continue; /* quickly skip entry if wrong hash val */
+
+ if (!CatalogCacheCompareTuple(cache, nkeys, ct->keys, arguments))
+ continue;
+
+ /*
+ * If it's a positive entry, bump its refcount and return it. If it's
+ * negative, we can report failure to the caller.
+ */
+ if (ct->tuple.t_len == tuple->t_len)
+ {
+ memcpy((char *) ct->tuple.t_data,
+ (const char *) tuple->t_data,
+ tuple->t_len);
+ return;
+ }
+ dlist_delete(&ct->cache_elem);
+ pfree(ct);
+ cache->cc_ntup -= 1;
+ CacheHdr->ch_ntup -= 1;
+ break;
+ }
+ /* Allocate memory for CatCTup and the cached tuple in one go */
+ oldcxt = MemoryContextSwitchTo(CacheMemoryContext);
+
+ ct = (CatCTup *) palloc(sizeof(CatCTup) +
+ MAXIMUM_ALIGNOF + tuple->t_len);
+ ct->tuple.t_len = tuple->t_len;
+ ct->tuple.t_self = tuple->t_self;
+ ct->tuple.t_tableOid = tuple->t_tableOid;
+ ct->tuple.t_data = (HeapTupleHeader)
+ MAXALIGN(((char *) ct) + sizeof(CatCTup));
+ /* copy tuple contents */
+ memcpy((char *) ct->tuple.t_data,
+ (const char *) tuple->t_data,
+ tuple->t_len);
+ ct->ct_magic = CT_MAGIC;
+ ct->my_cache = cache;
+ ct->c_list = NULL;
+ ct->refcount = 1; /* pinned*/
+ ct->dead = false;
+ ct->negative = false;
+ ct->hash_value = hashValue;
+ dlist_push_head(&cache->cc_bucket[hashIndex], &ct->cache_elem);
+ memcpy(ct->keys, arguments, nkeys*sizeof(Datum));
+
+ cache->cc_ntup++;
+ CacheHdr->ch_ntup++;
+ MemoryContextSwitchTo(oldcxt);
+
+ /*
+ * If the hash table has become too full, enlarge the buckets array. Quite
+ * arbitrarily, we enlarge when fill factor > 2.
+ */
+ if (cache->cc_ntup > cache->cc_nbuckets * 2)
+ RehashCatCache(cache);
+}
+
/*
* Work-horse for SearchCatCache/SearchCatCacheN.
*/
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 585dcee..ce8852c 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1098,6 +1098,10 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation->rd_newRelfilenodeSubid = InvalidSubTransactionId;
switch (relation->rd_rel->relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ relation->rd_backend = BackendIdForSessionRelations();
+ relation->rd_islocaltemp = false;
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
relation->rd_backend = InvalidBackendId;
@@ -3301,6 +3305,10 @@ RelationBuildLocalRelation(const char *relname,
rel->rd_rel->relpersistence = relpersistence;
switch (relpersistence)
{
+ case RELPERSISTENCE_SESSION:
+ rel->rd_backend = BackendIdForSessionRelations();
+ rel->rd_islocaltemp = false;
+ break;
case RELPERSISTENCE_UNLOGGED:
case RELPERSISTENCE_PERMANENT:
rel->rd_backend = InvalidBackendId;
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 16297a5..e7a4d3c 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -1164,6 +1164,16 @@ SearchSysCache4(int cacheId,
return SearchCatCache4(SysCache[cacheId], key1, key2, key3, key4);
}
+void
+InsertSysCache(int cacheId,
+ Datum key1, Datum key2, Datum key3, Datum key4,
+ HeapTuple value)
+{
+ Assert(cacheId >= 0 && cacheId < SysCacheSize &&
+ PointerIsValid(SysCache[cacheId]));
+ InsertCatCache(SysCache[cacheId], key1, key2, key3, key4, value);
+}
+
/*
* ReleaseSysCache
* Release previously grabbed reference count on a tuple
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index bf69adc..fa7479c 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15637,8 +15637,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
tbinfo->dobj.catId.oid, false);
appendPQExpBuffer(q, "CREATE %s%s %s",
- tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ?
- "UNLOGGED " : "",
+ tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED ? "UNLOGGED "
+ : tbinfo->relpersistence == RELPERSISTENCE_SESSION ? "SESSION " : "",
reltypename,
qualrelname);
diff --git a/src/common/relpath.c b/src/common/relpath.c
index 62b9553..cef99d2 100644
--- a/src/common/relpath.c
+++ b/src/common/relpath.c
@@ -166,7 +166,18 @@ GetRelationPath(Oid dbNode, Oid spcNode, Oid relNode,
}
else
{
- if (forkNumber != MAIN_FORKNUM)
+ /*
+ * Session relations are distinguished from local temp relations by adding
+ * SessionRelFirstBackendId offset to backendId.
+ * These is no need to separate them at file system level, so just subtract SessionRelFirstBackendId
+ * to avoid too long file names.
+ * Segments of session relations have the same prefix (t%d_) as local temporary relations
+ * to make it possible to cleanup them in the same way as local temporary relation files.
+ */
+ if (backendId >= SessionRelFirstBackendId)
+ backendId -= SessionRelFirstBackendId;
+
+ if (forkNumber != MAIN_FORKNUM)
path = psprintf("base/%u/t%d_%u_%s",
dbNode, backendId, relNode,
forkNames[forkNumber]);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 090b6ba..6a39663 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -165,6 +165,7 @@ typedef FormData_pg_class *Form_pg_class;
#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
#define RELPERSISTENCE_TEMP 't' /* temporary table */
+#define RELPERSISTENCE_SESSION 's' /* session table */
/* default selection for replica identity (primary key or nothing) */
#define REPLICA_IDENTITY_DEFAULT 'd'
diff --git a/src/include/storage/backendid.h b/src/include/storage/backendid.h
index 70ef8eb..f226e7c 100644
--- a/src/include/storage/backendid.h
+++ b/src/include/storage/backendid.h
@@ -22,6 +22,13 @@ typedef int BackendId; /* unique currently active backend identifier */
#define InvalidBackendId (-1)
+/*
+ * We need to distinguish local and global temporary relations by RelFileNodeBackend.
+ * The least invasive change is to add some special bias value to backend id (since
+ * maximal number of backed is limited by MaxBackends).
+ */
+#define SessionRelFirstBackendId (0x40000000)
+
extern PGDLLIMPORT BackendId MyBackendId; /* backend id of this backend */
/* backend id of our parallel session leader, or InvalidBackendId if none */
@@ -34,4 +41,10 @@ extern PGDLLIMPORT BackendId ParallelMasterBackendId;
#define BackendIdForTempRelations() \
(ParallelMasterBackendId == InvalidBackendId ? MyBackendId : ParallelMasterBackendId)
+
+#define BackendIdForSessionRelations() \
+ (BackendIdForTempRelations() + SessionRelFirstBackendId)
+
+#define IsSessionRelationBackendId(id) ((id) >= SessionRelFirstBackendId)
+
#endif /* BACKENDID_H */
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 4ef6d8d..bac7a31 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -229,6 +229,13 @@ typedef PageHeaderData *PageHeader;
#define PageIsNew(page) (((PageHeader) (page))->pd_upper == 0)
/*
+ * Page of temporary relation is not initialized
+ */
+#define GlobalTempRelationPageIsNotInitialized(rel, page) \
+ ((rel)->rd_rel->relpersistence == RELPERSISTENCE_SESSION && PageIsNew(page))
+
+
+/*
* PageGetItemId
* Returns an item identifier of a page.
*/
diff --git a/src/include/storage/relfilenode.h b/src/include/storage/relfilenode.h
index 586500a..20aec72 100644
--- a/src/include/storage/relfilenode.h
+++ b/src/include/storage/relfilenode.h
@@ -75,10 +75,25 @@ typedef struct RelFileNodeBackend
BackendId backend;
} RelFileNodeBackend;
+/*
+ * Check whether it is local or global temporary relation, which data belongs only to one backend.
+ */
#define RelFileNodeBackendIsTemp(rnode) \
((rnode).backend != InvalidBackendId)
/*
+ * Check whether it is global temporary relation which metadata is shared by all sessions,
+ * but data is private for the current session.
+ */
+#define RelFileNodeBackendIsGlobalTemp(rnode) IsSessionRelationBackendId((rnode).backend)
+
+/*
+ * Check whether it is local temporary relation which exists only in this backend.
+ */
+#define RelFileNodeBackendIsLocalTemp(rnode) \
+ (RelFileNodeBackendIsTemp(rnode) && !RelFileNodeBackendIsGlobalTemp(rnode))
+
+/*
* Note: RelFileNodeEquals and RelFileNodeBackendEquals compare relNode first
* since that is most likely to be different in two unequal RelFileNodes. It
* is probably redundant to compare spcNode if the other fields are found equal,
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index ff1faba..31f615d 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -228,4 +228,8 @@ extern void PrepareToInvalidateCacheTuple(Relation relation,
extern void PrintCatCacheLeakWarning(HeapTuple tuple);
extern void PrintCatCacheListLeakWarning(CatCList *list);
+extern void InsertCatCache(CatCache *cache,
+ Datum v1, Datum v2, Datum v3, Datum v4,
+ HeapTuple tuple);
+
#endif /* CATCACHE_H */
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index a5cf804..d42830f 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -327,6 +327,18 @@ typedef struct StdRdOptions
((relation)->rd_options ? \
((StdRdOptions *) (relation)->rd_options)->parallel_workers : (defaultpw))
+/*
+ * Relation persistence is either TEMP either SESSION
+ */
+#define IsLocalRelpersistence(relpersistence) \
+ ((relpersistence) == RELPERSISTENCE_TEMP || (relpersistence) == RELPERSISTENCE_SESSION)
+
+/*
+ * Relation is either global either local temp table
+ */
+#define RelationHasSessionScope(relation) \
+ IsLocalRelpersistence(((relation)->rd_rel->relpersistence))
+
/* ViewOptions->check_option values */
typedef enum ViewOptCheckOption
{
@@ -335,6 +347,7 @@ typedef enum ViewOptCheckOption
VIEW_OPTION_CHECK_OPTION_CASCADED
} ViewOptCheckOption;
+
/*
* ViewOptions
* Contents of rd_options for views
@@ -526,7 +539,7 @@ typedef struct ViewOptions
* True if relation's pages are stored in local buffers.
*/
#define RelationUsesLocalBuffers(relation) \
- ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
+ RelationHasSessionScope(relation)
/*
* RELATION_IS_LOCAL
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index 918765c..5b1598b 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -216,4 +216,8 @@ extern bool RelationSupportsSysCache(Oid relid);
#define ReleaseSysCacheList(x) ReleaseCatCacheList(x)
+
+extern void InsertSysCache(int cacheId,
+ Datum v1, Datum v2, Datum v3, Datum v4,
+ HeapTuple tuple);
#endif /* SYSCACHE_H */
diff --git a/src/test/isolation/expected/inherit-global-temp.out b/src/test/isolation/expected/inherit-global-temp.out
new file mode 100644
index 0000000..6114f8c
--- /dev/null
+++ b/src/test/isolation/expected/inherit-global-temp.out
@@ -0,0 +1,218 @@
+Parsed test spec with 2 sessions
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_update_p s1_update_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_update_p: UPDATE inh_global_parent SET a = 11 WHERE a = 1;
+step s1_update_c: UPDATE inh_global_parent SET a = 13 WHERE a IN (3, 5);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+2
+11
+4
+13
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+4
+13
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+2
+11
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_update_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_update_c: UPDATE inh_global_parent SET a = 15 WHERE a IN (3, 5);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+6
+15
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+6
+15
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_delete_p s1_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_delete_p: DELETE FROM inh_global_parent WHERE a = 2;
+step s1_delete_c: DELETE FROM inh_global_parent WHERE a IN (4, 6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+3
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_delete_c s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_delete_c: DELETE FROM inh_global_parent WHERE a IN (4, 6);
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+1
+2
+5
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+5
+6
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s2_truncate_p: TRUNCATE inh_global_parent;
+step s1_select_p: SELECT a FROM inh_global_parent;
+a
+
+3
+4
+step s1_select_c: SELECT a FROM inh_global_temp_child_s1;
+a
+
+3
+4
+step s2_select_p: SELECT a FROM inh_global_parent;
+a
+
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2;
+a
+
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_p s1_commit
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_begin: BEGIN;
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s2_select_p: SELECT a FROM inh_global_parent; <waiting ...>
+step s1_commit: COMMIT;
+step s2_select_p: <... completed>
+a
+
+5
+6
+
+starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_c s1_commit
+step s1_insert_p: INSERT INTO inh_global_parent VALUES (1), (2);
+step s1_insert_c: INSERT INTO inh_global_temp_child_s1 VALUES (3), (4);
+step s2_insert_c: INSERT INTO inh_global_temp_child_s2 VALUES (5), (6);
+step s1_begin: BEGIN;
+step s1_truncate_p: TRUNCATE inh_global_parent;
+step s2_select_c: SELECT a FROM inh_global_temp_child_s2; <waiting ...>
+step s1_commit: COMMIT;
+step s2_select_c: <... completed>
+a
+
+5
+6
diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule
index a2fa192..ef7aa85 100644
--- a/src/test/isolation/isolation_schedule
+++ b/src/test/isolation/isolation_schedule
@@ -88,3 +88,4 @@ test: plpgsql-toast
test: truncate-conflict
test: serializable-parallel
test: serializable-parallel-2
+test: inherit-global-temp
diff --git a/src/test/isolation/specs/inherit-global-temp.spec b/src/test/isolation/specs/inherit-global-temp.spec
new file mode 100644
index 0000000..5e95dd6
--- /dev/null
+++ b/src/test/isolation/specs/inherit-global-temp.spec
@@ -0,0 +1,73 @@
+# This is a copy of the inherit-temp test with little changes for global temporary tables.
+#
+
+setup
+{
+ CREATE TABLE inh_global_parent (a int);
+}
+
+teardown
+{
+ DROP TABLE inh_global_parent;
+}
+
+# Session 1 executes actions which act directly on both the parent and
+# its child. Abbreviation "c" is used for queries working on the child
+# and "p" on the parent.
+session "s1"
+setup
+{
+ CREATE GLOBAL TEMPORARY TABLE inh_global_temp_child_s1 () INHERITS (inh_global_parent);
+}
+step "s1_begin" { BEGIN; }
+step "s1_truncate_p" { TRUNCATE inh_global_parent; }
+step "s1_select_p" { SELECT a FROM inh_global_parent; }
+step "s1_select_c" { SELECT a FROM inh_global_temp_child_s1; }
+step "s1_insert_p" { INSERT INTO inh_global_parent VALUES (1), (2); }
+step "s1_insert_c" { INSERT INTO inh_global_temp_child_s1 VALUES (3), (4); }
+step "s1_update_p" { UPDATE inh_global_parent SET a = 11 WHERE a = 1; }
+step "s1_update_c" { UPDATE inh_global_parent SET a = 13 WHERE a IN (3, 5); }
+step "s1_delete_p" { DELETE FROM inh_global_parent WHERE a = 2; }
+step "s1_delete_c" { DELETE FROM inh_global_parent WHERE a IN (4, 6); }
+step "s1_commit" { COMMIT; }
+teardown
+{
+ DROP TABLE inh_global_temp_child_s1;
+}
+
+# Session 2 executes actions on the parent which act only on the child.
+session "s2"
+setup
+{
+ CREATE GLOBAL TEMPORARY TABLE inh_global_temp_child_s2 () INHERITS (inh_global_parent);
+}
+step "s2_truncate_p" { TRUNCATE inh_global_parent; }
+step "s2_select_p" { SELECT a FROM inh_global_parent; }
+step "s2_select_c" { SELECT a FROM inh_global_temp_child_s2; }
+step "s2_insert_c" { INSERT INTO inh_global_temp_child_s2 VALUES (5), (6); }
+step "s2_update_c" { UPDATE inh_global_parent SET a = 15 WHERE a IN (3, 5); }
+step "s2_delete_c" { DELETE FROM inh_global_parent WHERE a IN (4, 6); }
+teardown
+{
+ DROP TABLE inh_global_temp_child_s2;
+}
+
+# Check INSERT behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check UPDATE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_update_p" "s1_update_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_update_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check DELETE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_delete_p" "s1_delete_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_delete_c" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# Check TRUNCATE behavior across sessions
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_truncate_p" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s2_truncate_p" "s1_select_p" "s1_select_c" "s2_select_p" "s2_select_c"
+
+# TRUNCATE on a parent tree does not block access to temporary child relation
+# of another session, and blocks when scanning the parent.
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_begin" "s1_truncate_p" "s2_select_p" "s1_commit"
+permutation "s1_insert_p" "s1_insert_c" "s2_insert_c" "s1_begin" "s1_truncate_p" "s2_select_c" "s1_commit"
diff --git a/src/test/regress/expected/global_temp.out b/src/test/regress/expected/global_temp.out
new file mode 100644
index 0000000..ae1adb6
--- /dev/null
+++ b/src/test/regress/expected/global_temp.out
@@ -0,0 +1,247 @@
+--
+-- GLOBAL TEMP
+-- Test global temp relations
+--
+-- Test ON COMMIT DELETE ROWS
+CREATE GLOBAL TEMP TABLE global_temptest(col int) ON COMMIT DELETE ROWS;
+BEGIN;
+INSERT INTO global_temptest VALUES (1);
+INSERT INTO global_temptest VALUES (2);
+SELECT * FROM global_temptest;
+ col
+-----
+ 1
+ 2
+(2 rows)
+
+COMMIT;
+SELECT * FROM global_temptest;
+ col
+-----
+(0 rows)
+
+DROP TABLE global_temptest;
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest(col) ON COMMIT DELETE ROWS AS SELECT 1;
+SELECT * FROM global_temptest;
+ col
+-----
+ 1
+(1 row)
+
+COMMIT;
+SELECT * FROM global_temptest;
+ col
+-----
+(0 rows)
+
+DROP TABLE global_temptest;
+-- Test foreign keys
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest1(col int PRIMARY KEY);
+CREATE GLOBAL TEMP TABLE global_temptest2(col int REFERENCES global_temptest1)
+ ON COMMIT DELETE ROWS;
+INSERT INTO global_temptest1 VALUES (1);
+INSERT INTO global_temptest2 VALUES (1);
+COMMIT;
+SELECT * FROM global_temptest1;
+ col
+-----
+ 1
+(1 row)
+
+SELECT * FROM global_temptest2;
+ col
+-----
+(0 rows)
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temptest4(col int REFERENCES global_temptest3);
+COMMIT;
+ERROR: unsupported ON COMMIT and foreign key combination
+DETAIL: Table "global_temptest4" references "global_temptest3", but they do not have the same ON COMMIT setting.
+-- For partitioned temp tables, ON COMMIT actions ignore storage-less
+-- partitioned tables.
+BEGIN;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit_1
+ PARTITION OF temp_parted_oncommit
+ FOR VALUES IN (1) ON COMMIT DELETE ROWS;
+INSERT INTO temp_parted_oncommit VALUES (1);
+COMMIT;
+-- partitions are emptied by the previous commit
+SELECT * FROM temp_parted_oncommit;
+ a
+---
+(0 rows)
+
+DROP TABLE temp_parted_oncommit;
+-- Using ON COMMIT DELETE on a partitioned table does not remove
+-- all rows if partitions preserve their data.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test1
+ PARTITION OF global_temp_parted_oncommit_test
+ FOR VALUES IN (1) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_parted_oncommit_test VALUES (1);
+COMMIT;
+-- Data from the remaining partition is still here as its rows are
+-- preserved.
+SELECT * FROM global_temp_parted_oncommit_test;
+ a
+---
+ 1
+(1 row)
+
+-- two relations remain in this case.
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_parted_oncommit_test%';
+ relname
+-----------------------------------
+ global_temp_parted_oncommit_test
+ global_temp_parted_oncommit_test1
+(2 rows)
+
+DROP TABLE global_temp_parted_oncommit_test;
+-- Check dependencies between ON COMMIT actions with inheritance trees.
+-- Data on the parent is removed, and the child goes away.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test1 ()
+ INHERITS(global_temp_inh_oncommit_test) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_inh_oncommit_test1 VALUES (1);
+INSERT INTO global_temp_inh_oncommit_test VALUES (1);
+COMMIT;
+SELECT * FROM global_temp_inh_oncommit_test;
+ a
+---
+ 1
+(1 row)
+
+-- two relations remain
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_inh_oncommit_test%';
+ relname
+--------------------------------
+ global_temp_inh_oncommit_test
+ global_temp_inh_oncommit_test1
+(2 rows)
+
+DROP TABLE global_temp_inh_oncommit_test1;
+DROP TABLE global_temp_inh_oncommit_test;
+-- Global temp table cannot inherit from temporary relation
+BEGIN;
+CREATE TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+ERROR: cannot inherit from temporary relation "global_temp_table"
+ROLLBACK;
+-- Temp table can inherit from global temporary relation
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE TEMP TABLE temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+CREATE TEMP TABLE temp_table2 ()
+ INHERITS(global_temp_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO global_temp_table VALUES (0);
+SELECT * FROM global_temp_table;
+ a
+---
+ 0
+ 1
+ 2
+(3 rows)
+
+COMMIT;
+SELECT * FROM global_temp_table;
+ a
+---
+ 1
+(1 row)
+
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE global_temp_table;
+-- Global temp table can inherit from normal relation
+BEGIN;
+CREATE TABLE normal_table (a int);
+CREATE GLOBAL TEMP TABLE temp_table1 ()
+ INHERITS(normal_table) ON COMMIT PRESERVE ROWS;
+CREATE GLOBAL TEMP TABLE temp_table2 ()
+ INHERITS(normal_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO normal_table VALUES (0);
+SELECT * FROM normal_table;
+ a
+---
+ 0
+ 1
+ 2
+(3 rows)
+
+COMMIT;
+SELECT * FROM normal_table;
+ a
+---
+ 0
+ 1
+(2 rows)
+
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE normal_table;
+-- Check SERIAL and BIGSERIAL pseudo-types
+CREATE GLOBAL TEMP TABLE global_temp_table ( aid BIGSERIAL, bid SERIAL );
+CREATE SEQUENCE test_sequence;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+ 1 | 1
+ 2 | 2
+ 3 | 3
+(3 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 1
+(1 row)
+
+\c
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+(0 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 2
+(1 row)
+
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+ aid | bid
+-----+-----
+ 1 | 1
+ 2 | 2
+ 3 | 3
+(3 rows)
+
+SELECT NEXTVAL( 'test_sequence' );
+ nextval
+---------
+ 3
+(1 row)
+
+DROP TABLE global_temp_table;
+DROP SEQUENCE test_sequence;
diff --git a/src/test/regress/expected/session_table.out b/src/test/regress/expected/session_table.out
new file mode 100644
index 0000000..1b9b3f4
--- /dev/null
+++ b/src/test/regress/expected/session_table.out
@@ -0,0 +1,64 @@
+create session table my_private_table(x integer primary key, y integer);
+insert into my_private_table values (generate_series(1,10000), generate_series(1,10000));
+select count(*) from my_private_table;
+ count
+-------
+ 10000
+(1 row)
+
+\c
+select count(*) from my_private_table;
+ count
+-------
+ 0
+(1 row)
+
+select * from my_private_table where x=10001;
+ x | y
+---+---
+(0 rows)
+
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+create index on my_private_table(y);
+select * from my_private_table where x=10001;
+ x | y
+-------+-------
+ 10001 | 10001
+(1 row)
+
+select * from my_private_table where y=10001;
+ x | y
+-------+-------
+ 10001 | 10001
+(1 row)
+
+select count(*) from my_private_table;
+ count
+--------
+ 100000
+(1 row)
+
+\c
+select * from my_private_table where x=100001;
+ x | y
+---+---
+(0 rows)
+
+select * from my_private_table order by y desc limit 1;
+ x | y
+---+---
+(0 rows)
+
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+select * from my_private_table where x=100001;
+ x | y
+---+---
+(0 rows)
+
+select * from my_private_table order by y desc limit 1;
+ x | y
+--------+--------
+ 100000 | 100000
+(1 row)
+
+drop table my_private_table;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index fc0f141..507cf7d 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -107,7 +107,7 @@ test: json jsonb json_encoding jsonpath jsonpath_encoding jsonb_jsonpath
# NB: temp.sql does a reconnect which transiently uses 2 connections,
# so keep this parallel group to at most 19 tests
# ----------
-test: plancache limit plpgsql copy2 temp domain rangefuncs prepare conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
+test: plancache limit plpgsql copy2 temp global_temp session_table domain rangefuncs prepare conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
# ----------
# Another group of parallel tests
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 68ac56a..3890777 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -172,6 +172,8 @@ test: limit
test: plpgsql
test: copy2
test: temp
+test: global_temp
+test: session_table
test: domain
test: rangefuncs
test: prepare
diff --git a/src/test/regress/sql/global_temp.sql b/src/test/regress/sql/global_temp.sql
new file mode 100644
index 0000000..3058b9b
--- /dev/null
+++ b/src/test/regress/sql/global_temp.sql
@@ -0,0 +1,151 @@
+--
+-- GLOBAL TEMP
+-- Test global temp relations
+--
+
+-- Test ON COMMIT DELETE ROWS
+
+CREATE GLOBAL TEMP TABLE global_temptest(col int) ON COMMIT DELETE ROWS;
+
+BEGIN;
+INSERT INTO global_temptest VALUES (1);
+INSERT INTO global_temptest VALUES (2);
+
+SELECT * FROM global_temptest;
+COMMIT;
+
+SELECT * FROM global_temptest;
+
+DROP TABLE global_temptest;
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest(col) ON COMMIT DELETE ROWS AS SELECT 1;
+
+SELECT * FROM global_temptest;
+COMMIT;
+
+SELECT * FROM global_temptest;
+
+DROP TABLE global_temptest;
+
+-- Test foreign keys
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest1(col int PRIMARY KEY);
+CREATE GLOBAL TEMP TABLE global_temptest2(col int REFERENCES global_temptest1)
+ ON COMMIT DELETE ROWS;
+INSERT INTO global_temptest1 VALUES (1);
+INSERT INTO global_temptest2 VALUES (1);
+COMMIT;
+SELECT * FROM global_temptest1;
+SELECT * FROM global_temptest2;
+
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temptest3(col int PRIMARY KEY) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temptest4(col int REFERENCES global_temptest3);
+COMMIT;
+
+-- For partitioned temp tables, ON COMMIT actions ignore storage-less
+-- partitioned tables.
+BEGIN;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE temp_parted_oncommit_1
+ PARTITION OF temp_parted_oncommit
+ FOR VALUES IN (1) ON COMMIT DELETE ROWS;
+INSERT INTO temp_parted_oncommit VALUES (1);
+COMMIT;
+-- partitions are emptied by the previous commit
+SELECT * FROM temp_parted_oncommit;
+DROP TABLE temp_parted_oncommit;
+
+-- Using ON COMMIT DELETE on a partitioned table does not remove
+-- all rows if partitions preserve their data.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test (a int)
+ PARTITION BY LIST (a) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_parted_oncommit_test1
+ PARTITION OF global_temp_parted_oncommit_test
+ FOR VALUES IN (1) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_parted_oncommit_test VALUES (1);
+COMMIT;
+-- Data from the remaining partition is still here as its rows are
+-- preserved.
+SELECT * FROM global_temp_parted_oncommit_test;
+-- two relations remain in this case.
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_parted_oncommit_test%';
+DROP TABLE global_temp_parted_oncommit_test;
+
+-- Check dependencies between ON COMMIT actions with inheritance trees.
+-- Data on the parent is removed, and the child goes away.
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_inh_oncommit_test1 ()
+ INHERITS(global_temp_inh_oncommit_test) ON COMMIT PRESERVE ROWS;
+INSERT INTO global_temp_inh_oncommit_test1 VALUES (1);
+INSERT INTO global_temp_inh_oncommit_test VALUES (1);
+COMMIT;
+SELECT * FROM global_temp_inh_oncommit_test;
+-- two relations remain
+SELECT relname FROM pg_class WHERE relname LIKE 'global_temp_inh_oncommit_test%';
+DROP TABLE global_temp_inh_oncommit_test1;
+DROP TABLE global_temp_inh_oncommit_test;
+
+-- Global temp table cannot inherit from temporary relation
+BEGIN;
+CREATE TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE GLOBAL TEMP TABLE global_temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+ROLLBACK;
+
+-- Temp table can inherit from global temporary relation
+BEGIN;
+CREATE GLOBAL TEMP TABLE global_temp_table (a int) ON COMMIT DELETE ROWS;
+CREATE TEMP TABLE temp_table1 ()
+ INHERITS(global_temp_table) ON COMMIT PRESERVE ROWS;
+CREATE TEMP TABLE temp_table2 ()
+ INHERITS(global_temp_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO global_temp_table VALUES (0);
+SELECT * FROM global_temp_table;
+COMMIT;
+SELECT * FROM global_temp_table;
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE global_temp_table;
+
+-- Global temp table can inherit from normal relation
+BEGIN;
+CREATE TABLE normal_table (a int);
+CREATE GLOBAL TEMP TABLE temp_table1 ()
+ INHERITS(normal_table) ON COMMIT PRESERVE ROWS;
+CREATE GLOBAL TEMP TABLE temp_table2 ()
+ INHERITS(normal_table) ON COMMIT DELETE ROWS;
+INSERT INTO temp_table2 VALUES (2);
+INSERT INTO temp_table1 VALUES (1);
+INSERT INTO normal_table VALUES (0);
+SELECT * FROM normal_table;
+COMMIT;
+SELECT * FROM normal_table;
+DROP TABLE temp_table2;
+DROP TABLE temp_table1;
+DROP TABLE normal_table;
+
+-- Check SERIAL and BIGSERIAL pseudo-types
+CREATE GLOBAL TEMP TABLE global_temp_table ( aid BIGSERIAL, bid SERIAL );
+CREATE SEQUENCE test_sequence;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+\c
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+INSERT INTO global_temp_table DEFAULT VALUES;
+SELECT * FROM global_temp_table;
+SELECT NEXTVAL( 'test_sequence' );
+DROP TABLE global_temp_table;
+DROP SEQUENCE test_sequence;
diff --git a/src/test/regress/sql/session_table.sql b/src/test/regress/sql/session_table.sql
new file mode 100644
index 0000000..c6663dc
--- /dev/null
+++ b/src/test/regress/sql/session_table.sql
@@ -0,0 +1,18 @@
+create session table my_private_table(x integer primary key, y integer);
+insert into my_private_table values (generate_series(1,10000), generate_series(1,10000));
+select count(*) from my_private_table;
+\c
+select count(*) from my_private_table;
+select * from my_private_table where x=10001;
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+create index on my_private_table(y);
+select * from my_private_table where x=10001;
+select * from my_private_table where y=10001;
+select count(*) from my_private_table;
+\c
+select * from my_private_table where x=100001;
+select * from my_private_table order by y desc limit 1;
+insert into my_private_table values (generate_series(1,100000), generate_series(1,100000));
+select * from my_private_table where x=100001;
+select * from my_private_table order by y desc limit 1;
+drop table my_private_table;
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-01 15:26 ` Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: Robert Haas @ 2019-11-01 15:26 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Pavel Stehule <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
<[email protected]> wrote:
> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
> I wonder if there are some pitfalls of such approach?
That sounds pretty hackish. You'd have to be very careful, for
example, that if the tables were dropped or re-analyzed, all of the
old entries got removed -- and then it would still fail if any code
tried to access the statistics directly from the table, rather than
via the caches. My assumption is that the statistics ought to be
stored in some backend-private data structure designed for that
purpose, and that the code that needs the data should be taught to
look for it there when the table is a GTT.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-11-01 16:09 ` Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-01 16:09 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Pavel Stehule <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 01.11.2019 18:26, Robert Haas wrote:
> On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
> <[email protected]> wrote:
>> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
>> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
>> I wonder if there are some pitfalls of such approach?
> That sounds pretty hackish. You'd have to be very careful, for
> example, that if the tables were dropped or re-analyzed, all of the
> old entries got removed --
I have checked it:
- when table is reanalyzed, then cache entries are replaced.
- when table is dropped, then cache entries are removed.
> and then it would still fail if any code
> tried to access the statistics directly from the table, rather than
> via the caches. My assumption is that the statistics ought to be
> stored in some backend-private data structure designed for that
> purpose, and that the code that needs the data should be taught to
> look for it there when the table is a GTT.
Yes, if you do "select * from pg_statistic" then you will not see
statistic for GTT in this case.
But I do not think that it is so critical. I do not believe that anybody
is trying to manually interpret values in this table.
And optimizer is retrieving statistic through sys-cache mechanism and so
is able to build correct plan in this case.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-02 05:30 ` Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
2019-11-02 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
0 siblings, 2 replies; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-02 05:30 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <
[email protected]> napsal:
>
>
> On 01.11.2019 18:26, Robert Haas wrote:
> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
> > <[email protected]> wrote:
> >> It seems to me that I have found quite elegant solution for per-backend
> statistic for GTT: I just inserting it in backend's catalog cache, but not
> in pg_statistic table itself.
> >> To do it I have to add InsertSysCache/InsertCatCache functions which
> insert pinned entry in the correspondent cache.
> >> I wonder if there are some pitfalls of such approach?
> > That sounds pretty hackish. You'd have to be very careful, for
> > example, that if the tables were dropped or re-analyzed, all of the
> > old entries got removed --
>
> I have checked it:
> - when table is reanalyzed, then cache entries are replaced.
> - when table is dropped, then cache entries are removed.
>
> > and then it would still fail if any code
> > tried to access the statistics directly from the table, rather than
> > via the caches. My assumption is that the statistics ought to be
> > stored in some backend-private data structure designed for that
> > purpose, and that the code that needs the data should be taught to
> > look for it there when the table is a GTT.
>
> Yes, if you do "select * from pg_statistic" then you will not see
> statistic for GTT in this case.
> But I do not think that it is so critical. I do not believe that anybody
> is trying to manually interpret values in this table.
> And optimizer is retrieving statistic through sys-cache mechanism and so
> is able to build correct plan in this case.
>
Years ago, when I though about it, I wrote patch with similar design. It's
working, but surely it's ugly.
I have another idea. Can be pg_statistics view instead a table?
Some like
SELECT * FROM pg_catalog.pg_statistics_rel
UNION ALL
SELECT * FROM pg_catalog.pg_statistics_gtt();
Internally - when stat cache is filled, then there can be used
pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there
was not possibility to work with queries, only with just relations.
Or crazy idea - today we can implement own types of heaps. Is possible to
create engine where result can be combination of some shared data and local
data. So union will be implemented on heap level.
This implementation can be simple, just scanning pages from shared buffers
and from local buffers. For these tables we don't need complex metadata.
It's crazy idea, and I think so union with table function should be best.
Regards
Pavel
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-02 07:19 ` Julien Rouhaud <[email protected]>
2019-11-02 07:23 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 15:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
1 sibling, 2 replies; 1002+ messages in thread
From: Julien Rouhaud @ 2019-11-02 07:19 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]> wrote:
>
> pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <[email protected]> napsal:
>>
>> On 01.11.2019 18:26, Robert Haas wrote:
>> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
>> > <[email protected]> wrote:
>> >> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
>> >> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
>> >> I wonder if there are some pitfalls of such approach?
>> > That sounds pretty hackish. You'd have to be very careful, for
>> > example, that if the tables were dropped or re-analyzed, all of the
>> > old entries got removed --
>>
>> I have checked it:
>> - when table is reanalyzed, then cache entries are replaced.
>> - when table is dropped, then cache entries are removed.
>>
>> > and then it would still fail if any code
>> > tried to access the statistics directly from the table, rather than
>> > via the caches. My assumption is that the statistics ought to be
>> > stored in some backend-private data structure designed for that
>> > purpose, and that the code that needs the data should be taught to
>> > look for it there when the table is a GTT.
>>
>> Yes, if you do "select * from pg_statistic" then you will not see
>> statistic for GTT in this case.
>> But I do not think that it is so critical. I do not believe that anybody
>> is trying to manually interpret values in this table.
>> And optimizer is retrieving statistic through sys-cache mechanism and so
>> is able to build correct plan in this case.
>
>
> Years ago, when I though about it, I wrote patch with similar design. It's working, but surely it's ugly.
>
> I have another idea. Can be pg_statistics view instead a table?
>
> Some like
>
> SELECT * FROM pg_catalog.pg_statistics_rel
> UNION ALL
> SELECT * FROM pg_catalog.pg_statistics_gtt();
>
> Internally - when stat cache is filled, then there can be used pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there was not possibility to work with queries, only with just relations.
It'd be a loss if you lose the ability to see the statistics, as there
are valid use cases where you need to see the stats, eg. understanding
why you don't get the plan you wanted. There's also at least one
extension [1] that allows you to backup and use restored statistics,
so there are definitely people interested in it.
[1]: https://github.com/ossc-db/pg_dbms_stats
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
@ 2019-11-02 07:23 ` Pavel Stehule <[email protected]>
2019-11-02 07:24 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 08:56 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
1 sibling, 2 replies; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-02 07:23 UTC (permalink / raw)
To: Julien Rouhaud <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
so 2. 11. 2019 v 8:18 odesílatel Julien Rouhaud <[email protected]> napsal:
> On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]>
> wrote:
> >
> > pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <
> [email protected]> napsal:
> >>
> >> On 01.11.2019 18:26, Robert Haas wrote:
> >> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
> >> > <[email protected]> wrote:
> >> >> It seems to me that I have found quite elegant solution for
> per-backend statistic for GTT: I just inserting it in backend's catalog
> cache, but not in pg_statistic table itself.
> >> >> To do it I have to add InsertSysCache/InsertCatCache functions which
> insert pinned entry in the correspondent cache.
> >> >> I wonder if there are some pitfalls of such approach?
> >> > That sounds pretty hackish. You'd have to be very careful, for
> >> > example, that if the tables were dropped or re-analyzed, all of the
> >> > old entries got removed --
> >>
> >> I have checked it:
> >> - when table is reanalyzed, then cache entries are replaced.
> >> - when table is dropped, then cache entries are removed.
> >>
> >> > and then it would still fail if any code
> >> > tried to access the statistics directly from the table, rather than
> >> > via the caches. My assumption is that the statistics ought to be
> >> > stored in some backend-private data structure designed for that
> >> > purpose, and that the code that needs the data should be taught to
> >> > look for it there when the table is a GTT.
> >>
> >> Yes, if you do "select * from pg_statistic" then you will not see
> >> statistic for GTT in this case.
> >> But I do not think that it is so critical. I do not believe that anybody
> >> is trying to manually interpret values in this table.
> >> And optimizer is retrieving statistic through sys-cache mechanism and so
> >> is able to build correct plan in this case.
> >
> >
> > Years ago, when I though about it, I wrote patch with similar design.
> It's working, but surely it's ugly.
> >
> > I have another idea. Can be pg_statistics view instead a table?
> >
> > Some like
> >
> > SELECT * FROM pg_catalog.pg_statistics_rel
> > UNION ALL
> > SELECT * FROM pg_catalog.pg_statistics_gtt();
> >
> > Internally - when stat cache is filled, then there can be used
> pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there
> was not possibility to work with queries, only with just relations.
>
> It'd be a loss if you lose the ability to see the statistics, as there
> are valid use cases where you need to see the stats, eg. understanding
> why you don't get the plan you wanted. There's also at least one
> extension [1] that allows you to backup and use restored statistics,
> so there are definitely people interested in it.
>
> [1]: https://github.com/ossc-db/pg_dbms_stats
I don't think - the extensions can use UNION and the content will be same
as caches used by planner.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
2019-11-02 07:23 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-02 07:24 ` Pavel Stehule <[email protected]>
1 sibling, 0 replies; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-02 07:24 UTC (permalink / raw)
To: Julien Rouhaud <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
so 2. 11. 2019 v 8:23 odesílatel Pavel Stehule <[email protected]>
napsal:
>
>
> so 2. 11. 2019 v 8:18 odesílatel Julien Rouhaud <[email protected]>
> napsal:
>
>> On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]>
>> wrote:
>> >
>> > pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <
>> [email protected]> napsal:
>> >>
>> >> On 01.11.2019 18:26, Robert Haas wrote:
>> >> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
>> >> > <[email protected]> wrote:
>> >> >> It seems to me that I have found quite elegant solution for
>> per-backend statistic for GTT: I just inserting it in backend's catalog
>> cache, but not in pg_statistic table itself.
>> >> >> To do it I have to add InsertSysCache/InsertCatCache functions
>> which insert pinned entry in the correspondent cache.
>> >> >> I wonder if there are some pitfalls of such approach?
>> >> > That sounds pretty hackish. You'd have to be very careful, for
>> >> > example, that if the tables were dropped or re-analyzed, all of the
>> >> > old entries got removed --
>> >>
>> >> I have checked it:
>> >> - when table is reanalyzed, then cache entries are replaced.
>> >> - when table is dropped, then cache entries are removed.
>> >>
>> >> > and then it would still fail if any code
>> >> > tried to access the statistics directly from the table, rather than
>> >> > via the caches. My assumption is that the statistics ought to be
>> >> > stored in some backend-private data structure designed for that
>> >> > purpose, and that the code that needs the data should be taught to
>> >> > look for it there when the table is a GTT.
>> >>
>> >> Yes, if you do "select * from pg_statistic" then you will not see
>> >> statistic for GTT in this case.
>> >> But I do not think that it is so critical. I do not believe that
>> anybody
>> >> is trying to manually interpret values in this table.
>> >> And optimizer is retrieving statistic through sys-cache mechanism and
>> so
>> >> is able to build correct plan in this case.
>> >
>> >
>> > Years ago, when I though about it, I wrote patch with similar design.
>> It's working, but surely it's ugly.
>> >
>> > I have another idea. Can be pg_statistics view instead a table?
>> >
>> > Some like
>> >
>> > SELECT * FROM pg_catalog.pg_statistics_rel
>> > UNION ALL
>> > SELECT * FROM pg_catalog.pg_statistics_gtt();
>> >
>> > Internally - when stat cache is filled, then there can be used
>> pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there
>> was not possibility to work with queries, only with just relations.
>>
>> It'd be a loss if you lose the ability to see the statistics, as there
>> are valid use cases where you need to see the stats, eg. understanding
>> why you don't get the plan you wanted. There's also at least one
>> extension [1] that allows you to backup and use restored statistics,
>> so there are definitely people interested in it.
>>
>> [1]: https://github.com/ossc-db/pg_dbms_stats
>
>
> I don't think - the extensions can use UNION and the content will be same
> as caches used by planner.
>
sure, if some one try to modify directly system tables, then it should be
fixed.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
2019-11-02 07:23 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-02 08:56 ` Julien Rouhaud <[email protected]>
1 sibling, 0 replies; 1002+ messages in thread
From: Julien Rouhaud @ 2019-11-02 08:56 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Sat, Nov 2, 2019 at 8:23 AM Pavel Stehule <[email protected]> wrote:
>
> so 2. 11. 2019 v 8:18 odesílatel Julien Rouhaud <[email protected]> napsal:
>>
>> On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]> wrote:
>> >
>> > pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <[email protected]> napsal:
>> >>
>> >> On 01.11.2019 18:26, Robert Haas wrote:
>> >> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
>> >> > <[email protected]> wrote:
>> >> >> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
>> >> >> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
>> >> >> I wonder if there are some pitfalls of such approach?
>> >> > That sounds pretty hackish. You'd have to be very careful, for
>> >> > example, that if the tables were dropped or re-analyzed, all of the
>> >> > old entries got removed --
>> >>
>> >> I have checked it:
>> >> - when table is reanalyzed, then cache entries are replaced.
>> >> - when table is dropped, then cache entries are removed.
>> >>
>> >> > and then it would still fail if any code
>> >> > tried to access the statistics directly from the table, rather than
>> >> > via the caches. My assumption is that the statistics ought to be
>> >> > stored in some backend-private data structure designed for that
>> >> > purpose, and that the code that needs the data should be taught to
>> >> > look for it there when the table is a GTT.
>> >>
>> >> Yes, if you do "select * from pg_statistic" then you will not see
>> >> statistic for GTT in this case.
>> >> But I do not think that it is so critical. I do not believe that anybody
>> >> is trying to manually interpret values in this table.
>> >> And optimizer is retrieving statistic through sys-cache mechanism and so
>> >> is able to build correct plan in this case.
>> >
>> >
>> > Years ago, when I though about it, I wrote patch with similar design. It's working, but surely it's ugly.
>> >
>> > I have another idea. Can be pg_statistics view instead a table?
>> >
>> > Some like
>> >
>> > SELECT * FROM pg_catalog.pg_statistics_rel
>> > UNION ALL
>> > SELECT * FROM pg_catalog.pg_statistics_gtt();
>> >
>> > Internally - when stat cache is filled, then there can be used pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there was not possibility to work with queries, only with just relations.
>>
>> It'd be a loss if you lose the ability to see the statistics, as there
>> are valid use cases where you need to see the stats, eg. understanding
>> why you don't get the plan you wanted. There's also at least one
>> extension [1] that allows you to backup and use restored statistics,
>> so there are definitely people interested in it.
>>
>> [1]: https://github.com/ossc-db/pg_dbms_stats
>
>
> I don't think - the extensions can use UNION and the content will be same as caches used by planner.
Yes, I agree that changing pg_statistics to be a view as you showed
would fix the problem. I was answering Konstantin's point:
>> >> But I do not think that it is so critical. I do not believe that anybody
>> >> is trying to manually interpret values in this table.
>> >> And optimizer is retrieving statistic through sys-cache mechanism and so
>> >> is able to build correct plan in this case.
which is IMHO a wrong assumption.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
@ 2019-11-02 15:09 ` Konstantin Knizhnik <[email protected]>
2019-11-02 15:30 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-02 15:09 UTC (permalink / raw)
To: Julien Rouhaud <[email protected]>; Pavel Stehule <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 02.11.2019 10:19, Julien Rouhaud wrote:
> On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]> wrote:
>> pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <[email protected]> napsal:
>>> On 01.11.2019 18:26, Robert Haas wrote:
>>>> On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
>>>> <[email protected]> wrote:
>>>>> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
>>>>> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
>>>>> I wonder if there are some pitfalls of such approach?
>>>> That sounds pretty hackish. You'd have to be very careful, for
>>>> example, that if the tables were dropped or re-analyzed, all of the
>>>> old entries got removed --
>>> I have checked it:
>>> - when table is reanalyzed, then cache entries are replaced.
>>> - when table is dropped, then cache entries are removed.
>>>
>>>> and then it would still fail if any code
>>>> tried to access the statistics directly from the table, rather than
>>>> via the caches. My assumption is that the statistics ought to be
>>>> stored in some backend-private data structure designed for that
>>>> purpose, and that the code that needs the data should be taught to
>>>> look for it there when the table is a GTT.
>>> Yes, if you do "select * from pg_statistic" then you will not see
>>> statistic for GTT in this case.
>>> But I do not think that it is so critical. I do not believe that anybody
>>> is trying to manually interpret values in this table.
>>> And optimizer is retrieving statistic through sys-cache mechanism and so
>>> is able to build correct plan in this case.
>>
>> Years ago, when I though about it, I wrote patch with similar design. It's working, but surely it's ugly.
>>
>> I have another idea. Can be pg_statistics view instead a table?
>>
>> Some like
>>
>> SELECT * FROM pg_catalog.pg_statistics_rel
>> UNION ALL
>> SELECT * FROM pg_catalog.pg_statistics_gtt();
>>
>> Internally - when stat cache is filled, then there can be used pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there was not possibility to work with queries, only with just relations.
> It'd be a loss if you lose the ability to see the statistics, as there
> are valid use cases where you need to see the stats, eg. understanding
> why you don't get the plan you wanted. There's also at least one
> extension [1] that allows you to backup and use restored statistics,
> so there are definitely people interested in it.
>
> [1]: https://github.com/ossc-db/pg_dbms_stats
It seems to have completely no sense to backup and restore statistic for
temporary tables which life time is limited to life time of backend,
doesn't it?
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Re: [Proposal] Global temporary tables Julien Rouhaud <[email protected]>
2019-11-02 15:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-02 15:30 ` Julien Rouhaud <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Julien Rouhaud @ 2019-11-02 15:30 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Pavel Stehule <[email protected]>; Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Sat, Nov 2, 2019 at 4:09 PM Konstantin Knizhnik
<[email protected]> wrote:
>
> On 02.11.2019 10:19, Julien Rouhaud wrote:
> > On Sat, Nov 2, 2019 at 6:31 AM Pavel Stehule <[email protected]> wrote:
> >> pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik <[email protected]> napsal:
> >>> On 01.11.2019 18:26, Robert Haas wrote:
> >>>> On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
> >>>> <[email protected]> wrote:
> >>>>> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
> >>>>> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
> >>>>> I wonder if there are some pitfalls of such approach?
> >>>> That sounds pretty hackish. You'd have to be very careful, for
> >>>> example, that if the tables were dropped or re-analyzed, all of the
> >>>> old entries got removed --
> >>> I have checked it:
> >>> - when table is reanalyzed, then cache entries are replaced.
> >>> - when table is dropped, then cache entries are removed.
> >>>
> >>>> and then it would still fail if any code
> >>>> tried to access the statistics directly from the table, rather than
> >>>> via the caches. My assumption is that the statistics ought to be
> >>>> stored in some backend-private data structure designed for that
> >>>> purpose, and that the code that needs the data should be taught to
> >>>> look for it there when the table is a GTT.
> >>> Yes, if you do "select * from pg_statistic" then you will not see
> >>> statistic for GTT in this case.
> >>> But I do not think that it is so critical. I do not believe that anybody
> >>> is trying to manually interpret values in this table.
> >>> And optimizer is retrieving statistic through sys-cache mechanism and so
> >>> is able to build correct plan in this case.
> >>
> >> Years ago, when I though about it, I wrote patch with similar design. It's working, but surely it's ugly.
> >>
> >> I have another idea. Can be pg_statistics view instead a table?
> >>
> >> Some like
> >>
> >> SELECT * FROM pg_catalog.pg_statistics_rel
> >> UNION ALL
> >> SELECT * FROM pg_catalog.pg_statistics_gtt();
> >>
> >> Internally - when stat cache is filled, then there can be used pg_statistics_rel and pg_statistics_gtt() directly. What I remember, there was not possibility to work with queries, only with just relations.
> > It'd be a loss if you lose the ability to see the statistics, as there
> > are valid use cases where you need to see the stats, eg. understanding
> > why you don't get the plan you wanted. There's also at least one
> > extension [1] that allows you to backup and use restored statistics,
> > so there are definitely people interested in it.
> >
> > [1]: https://github.com/ossc-db/pg_dbms_stats
> It seems to have completely no sense to backup and restore statistic for
> temporary tables which life time is limited to life time of backend,
> doesn't it?
In general yes I agree, but it doesn't if the goal is to understand
why even after an analyze on the temporary table your query is still
behaving poorly. It can be useful to allow reproduction or just give
someone else the statistics to see what's going on.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
@ 2019-11-02 15:15 ` Konstantin Knizhnik <[email protected]>
2019-11-02 16:34 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-02 15:15 UTC (permalink / raw)
To: Pavel Stehule <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 02.11.2019 8:30, Pavel Stehule wrote:
>
>
> pá 1. 11. 2019 v 17:09 odesílatel Konstantin Knizhnik
> <[email protected] <mailto:[email protected]>> napsal:
>
>
>
> On 01.11.2019 18:26, Robert Haas wrote:
> > On Fri, Nov 1, 2019 at 11:15 AM Konstantin Knizhnik
> > <[email protected] <mailto:[email protected]>>
> wrote:
> >> It seems to me that I have found quite elegant solution for
> per-backend statistic for GTT: I just inserting it in backend's
> catalog cache, but not in pg_statistic table itself.
> >> To do it I have to add InsertSysCache/InsertCatCache functions
> which insert pinned entry in the correspondent cache.
> >> I wonder if there are some pitfalls of such approach?
> > That sounds pretty hackish. You'd have to be very careful, for
> > example, that if the tables were dropped or re-analyzed, all of the
> > old entries got removed --
>
> I have checked it:
> - when table is reanalyzed, then cache entries are replaced.
> - when table is dropped, then cache entries are removed.
>
> > and then it would still fail if any code
> > tried to access the statistics directly from the table, rather than
> > via the caches. My assumption is that the statistics ought to be
> > stored in some backend-private data structure designed for that
> > purpose, and that the code that needs the data should be taught to
> > look for it there when the table is a GTT.
>
> Yes, if you do "select * from pg_statistic" then you will not see
> statistic for GTT in this case.
> But I do not think that it is so critical. I do not believe that
> anybody
> is trying to manually interpret values in this table.
> And optimizer is retrieving statistic through sys-cache mechanism
> and so
> is able to build correct plan in this case.
>
>
> Years ago, when I though about it, I wrote patch with similar design.
> It's working, but surely it's ugly.
>
> I have another idea. Can be pg_statistics view instead a table?
>
> Some like
>
> SELECT * FROM pg_catalog.pg_statistics_rel
> UNION ALL
> SELECT * FROM pg_catalog.pg_statistics_gtt();
And pg_catalog.pg_statistics_gtt() is set returning functions?
I afraid that it is not acceptable solution from performance point of
view: pg_statictic table is accessed by keys (<relid>,<attpos>,<inh>)
If it can not be done using index scan, then it can cause significant
performance slow down.
>
> Internally - when stat cache is filled, then there can be used
> pg_statistics_rel and pg_statistics_gtt() directly. What I remember,
> there was not possibility to work with queries, only with just relations.
>
> Or crazy idea - today we can implement own types of heaps. Is possible
> to create engine where result can be combination of some shared data
> and local data. So union will be implemented on heap level.
> This implementation can be simple, just scanning pages from shared
> buffers and from local buffers. For these tables we don't need complex
> metadata. It's crazy idea, and I think so union with table function
> should be best.
Frankly speaking, implementing special heap access method for
pg_statistic just to handle case of global temp tables seems to be overkill
from my point of view. It requires a lot coding (or at least copying a
lot of code from heapam). Also, as I wrote above, we need also index for
efficient lookup of statistic.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-11-01 16:09 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-02 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-02 16:34 ` Pavel Stehule <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Pavel Stehule @ 2019-11-02 16:34 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
And pg_catalog.pg_statistics_gtt() is set returning functions?
>
yes
I afraid that it is not acceptable solution from performance point of view:
> pg_statictic table is accessed by keys (<relid>,<attpos>,<inh>)
>
I don't think so it is problem. The any component, that needs to use fast
access can use some special function that check index or check some memory
buffers.
If it can not be done using index scan, then it can cause significant
> performance slow down.
>
where you need fast access when you use SQL access? Inside postgres
optimizer is caches everywhere. And statistics cache should to know so have
to check index and some memory buffers.
The proposed view will not be used by optimizer, but it can be used by some
higher layers. I think so there is a agreement so GTT metadata should not
be stored in system catalogue. If are stored in some syscache or somewhere
else is not important in this moment. But can be nice if for user the GTT
metadata should not be black hole. I think so is better to change some
current tables to views, than use some special function just specialized
for GTT (these functions should to exists in both variants). When I think
about it - this is important not just for functionality that we expect from
GTT. It is important for consistency of Postgres catalog - how much
different should be GTT than other types of tables in system catalogue from
user's perspective.
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-11-08 15:06 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-11 15:19 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
1 sibling, 1 reply; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-11-08 15:06 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Pavel Stehule <[email protected]>; Robert Haas <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
My comments for global_private_temp-4.patch
good side:
1 Lots of index type on GTT. I think we need support for all kinds of indexes.
2 serial column on GTT.
3 INHERITS GTT.
4 PARTITION GTT.
I didn't choose to support them in the first release, but you did.
Other side:
1 case: create global temp table gtt2(a int primary key, b text) on commit delete rows;
I think you've lost the meaning of the on commit delete rows clause.
After the GTT is created, the other sessions feel that this is an on commit PRESERVE rows GTT.
2 truncate gtt, mybe this is a bug in DropRelFileNodeBuffers.
GTT's local buffer is not released.
Case:
postgres=# insert into gtt2 values(1,'xx');
INSERT 0 1
postgres=# truncate gtt2;
TRUNCATE TABLE
postgres=# insert into gtt2 values(1,'xx');
ERROR: unexpected data beyond EOF in block 0 of relation base/13579/t3_16384
HINT: This has been seen to occur with buggy kernels; consider updating your system.
3 lock type of truncate GTT.
I don't think it's a good idea to hold a big lock with truncate GTT, because it only needs to process private data.
4 GTT's ddl Those ddl that need to rewrite data files may need attention.
We have discussed in the previous email. This is why I used shared hash to track the GTT file.
5 There will be problems with DDL that will change relfilenode. Such as cluster GTT ,vacuum full GTT.
A session completes vacuum full gtt(a), and other sessions will immediately start reading and writing new storage files and existing data is also lost.
I disable them in my current version.
6 drop GTT
I think drop GTT should clean up all storage files and definitions. How do you think?
7 MVCC visibility clog clean
GTT data visibility rules, like regular tables, so GTT also need clog.
We need to avoid the clog that GTT needs to be cleaned up.
At the same time, GTT does not do autovacuum, and retaining "too old data" will cause wraparound data loss.
I have given a solution in my design.
Zeng Wenjing
> 2019年11月1日 下午11:15,Konstantin Knizhnik <[email protected]> 写道:
>
>
>
> On 25.10.2019 20:00, Pavel Stehule wrote:
>>
>> >
>> >> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
>> >> If all of the following conditions are true:
>> >>
>> >> 1) GTT are used in joins
>> >> 2) There are indexes defined for GTT
>> >> 3) Size and histogram of GTT in different backends can significantly vary.
>> >> 4) ANALYZE was explicitly called for GTT
>> >>
>> >> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
>> >> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
>> > I think that's *definitely* a show stopper.
>> Well, if both you and Pavel think that it is really "show stopper", then
>> this problem really has to be addressed.
>> I slightly confused about this opinion, because Pavel has told me
>> himself that 99% of users never create indexes for temp tables
>> or run "analyze" for them. And without it, this problem is not a problem
>> at all.
>>
>>
>> Users doesn't do ANALYZE on temp tables in 99%. It's true. But second fact is so users has lot of problems. It's very similar to wrong statistics on persistent tables. When data are small, then it is not problem for users, although from my perspective it's not optimal. When data are not small, then the problem can be brutal. Temporary tables are not a exception. And users and developers are people - we know only about fatal problems. There are lot of unoptimized queries, but because the problem is not fatal, then it is not reason for report it. And lot of people has not any idea how fast the databases can be. The knowledges of users and app developers are sad book.
>>
>> Pavel
>
> It seems to me that I have found quite elegant solution for per-backend statistic for GTT: I just inserting it in backend's catalog cache, but not in pg_statistic table itself.
> To do it I have to add InsertSysCache/InsertCatCache functions which insert pinned entry in the correspondent cache.
> I wonder if there are some pitfalls of such approach?
>
> New patch for GTT is attached.
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com <http://www.postgrespro.com/;
> The Russian Postgres Company
> <global_private_temp-4.patch>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Re: [Proposal] Global temporary tables Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-11-08 15:06 ` Re: [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
@ 2019-11-11 15:19 ` Konstantin Knizhnik <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-11-11 15:19 UTC (permalink / raw)
To: 曾文旌(义从) <[email protected]>; +Cc: Pavel Stehule <[email protected]>; Robert Haas <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 08.11.2019 18:06, 曾文旌(义从) wrote:
> My comments for global_private_temp-4.patch
Thank you very much for inspecting my patch.
>
> good side:
> 1 Lots of index type on GTT. I think we need support for all kinds of
> indexes.
> 2 serial column on GTT.
> 3 INHERITS GTT.
> 4 PARTITION GTT.
>
> I didn't choose to support them in the first release, but you did.
>
> Other side:
> 1 case: create global temp table gtt2(a int primary key, b text) on
> commit delete rows;
> I think you've lost the meaning of the on commit delete rows clause.
> After the GTT is created, the other sessions feel that this is an on
> commit PRESERVE rows GTT.
>
Yes, there was bug in my implementation of ON COMMIT DELETE ROWS for GTT.
It is fixed in global_private_temp-6.patch
> 2 truncate gtt, mybe this is a bug in DropRelFileNodeBuffers.
> GTT's local buffer is not released.
> Case:
> postgres=# insert into gtt2 values(1,'xx');
> INSERT 0 1
> postgres=# truncate gtt2;
> TRUNCATE TABLE
> postgres=# insert into gtt2 values(1,'xx');
> ERROR: unexpected data beyond EOF in block 0 of relation
> base/13579/t3_16384
> HINT: This has been seen to occur with buggy kernels; consider
> updating your system.
>
Yes another bug, also fixed in new version of the patch.
> 3 lock type of truncate GTT.
> I don't think it's a good idea to hold a big lock with truncate GTT,
> because it only needs to process private data.
Sorry, I do not understand which lock you are talking about.
I have not introduced any special locks for GTT.
> 4 GTT's ddl Those ddl that need to rewrite data files may need attention.
> We have discussed in the previous email. This is why I used shared
> hash to track the GTT file.
>
You are right.
But instead of prohibiting ALTER TABLE at all for GTT, we can check
that there are no other backends using it.
I do not think that we should maintain some hash in shared memory to
check it.
As far as ALTER TABLE is rare and slow operation in any case, we can
just check presence of GTT files
created by other backends.
I have implemented this check in global_private_temp-6.patch
>
> 5 There will be problems with DDL that will change relfilenode. Such
> as cluster GTT ,vacuum full GTT.
> A session completes vacuum full gtt(a), and other sessions will
> immediately start reading and writing new storage files and existing
> data is also lost.
> I disable them in my current version.
Thank you for noticing it.
Autovacuum full should really be prohibited for GTT.
>
> 6 drop GTT
> I think drop GTT should clean up all storage files and definitions.
> How do you think?
>
Storage files will be cleaned in any case on backend termination.
Certainly if backend creates and deletes huge number of GTT in the
loop, it can cause space exhaustion.
But it seems to be very strange pattern of GTT usage.
> 7 MVCC visibility clog clean
> GTT data visibility rules, like regular tables, so GTT also need clog.
> We need to avoid the clog that GTT needs to be cleaned up.
> At the same time, GTT does not do autovacuum, and retaining "too old
> data" will cause wraparound data loss.
> I have given a solution in my design.
>
But why do we need some special handling of visibility rules for GTT
comparing with normal (local) temp tables?
Them are also not proceeded by autovacuum?
In principle, I have also implemented special visibility rules for GTT,
but only for the case when them
are accessed at replica. And it is not included in this patch, because
everybody think that access to GTT
replica should be considered in separate patch.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-28 07:15 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2 siblings, 0 replies; 1002+ messages in thread
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= @ 2019-10-28 07:15 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: Robert Haas <[email protected]>; pgsql-hackers; =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>; =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>; =?UTF-8?B?5byg5bm/6IifKOaYjuiZmik=?= <[email protected]>; =?UTF-8?B?6LW15q6/5aWO?= <[email protected]>; =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
> 2019年10月26日 上午12:22,Konstantin Knizhnik <[email protected]> 写道:
>
>
>
> On 25.10.2019 18:01, Robert Haas wrote:
>> On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
>> <[email protected]> wrote:
>>> Just to clarify.
>>> I have now proposed several different solutions for GTT:
>>>
>>> Shared vs. private buffers for GTT:
>>> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
>>> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
>> I vote for #1. I think parallel query for temp objects may be a
>> desirable feature, but I don't think it should be the job of a patch
>> implementing GTTs to make it happen. In fact, I think it would be an
>> actively bad idea, because I suspect that if we do eventually support
>> temp relations for parallel query, we're going to want a solution that
>> is shared between regular temp tables and global temp tables, not
>> separate solutions for each.
>
> Sorry, may be I do not not understand you.
> It seems to me that there is only one thing preventing usage of temporary tables in parallel plans: private buffers.
> If global temporary tables are accessed as normal tables though shared buffers then them can be used in parallel queries
> and no extra support is required for it.
> At least I have checked that parallel queries are correctly worked for my implementation of GTT with shared buffers.
> So I do not understand about which "separate solutions" you are talking about.
>
> I can agree that private buffers may be good starting point for GTT implementation, because it is less invasive and GTT access speed is exactly the same as of normal temp tables.
> But I do not understand your argument why it is "actively bad idea".
>
>>> Access to GTT at replica:
>>> 1. Access is prohibited (as for original temp tables). No changes at all.
>>> 2. Tuples of temp tables are marked with forzen XID. Minimal changes, rollbacks are not possible.
>>> 3. Providing special XIDs for GTT at replica. No changes in CLOG are required, but special MVCC visibility rules are used for GTT. Current limitation: number of transactions accessing GTT at replica is limited by 2^32
>>> and bitmap of correspondent size has to be maintained (tuples of GTT are not proceeded by vacuum and not frozen, so XID horizon never moved).
>> I again vote for #1. A GTT is defined to allow data to be visible only
>> within one session -- so what does it even mean for the data to be
>> accessible on a replica?
>
> There are sessions at replica (in case of hot standby), aren't there?
>
>>
>>> So except the limitation mentioned above (which I do not consider as critical) there is only one problem which was not addressed: maintaining statistics for GTT.
>>> If all of the following conditions are true:
>>>
>>> 1) GTT are used in joins
>>> 2) There are indexes defined for GTT
>>> 3) Size and histogram of GTT in different backends can significantly vary.
>>> 4) ANALYZE was explicitly called for GTT
>>>
>>> then query execution plan built in one backend will be also used for other backends where it can be inefficient.
>>> I also do not consider this problem as "show stopper" for adding GTT to Postgres.
>> I think that's *definitely* a show stopper.
> Well, if both you and Pavel think that it is really "show stopper", then this problem really has to be addressed.
> I slightly confused about this opinion, because Pavel has told me himself that 99% of users never create indexes for temp tables
> or run "analyze" for them. And without it, this problem is not a problem at all.
>
>>> I still do not understand the opinion of community which functionality of GTT is considered to be most important.
>>> But the patch with local buffers and no replica support is small enough to become good starting point.
>> Well, it seems we now have two patches for this feature. I guess we
>> need to figure out which one is better, and whether it's possible for
>> the two efforts to be merged, rather than having two different teams
>> hacking on separate code bases.
>
> I am open for cooperations.
> Source code of all my patches is available.
We are also willing to cooperate to complete this feature.
Let me prepare the code(merge code to pg12) and up to community, then see how we work together.
> --
> Konstantin Knizhnik
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
>
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-28 12:13 ` Robert Haas <[email protected]>
2019-10-28 13:48 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2 siblings, 1 reply; 1002+ messages in thread
From: Robert Haas @ 2019-10-28 12:13 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Fri, Oct 25, 2019 at 12:22 PM Konstantin Knizhnik
<[email protected]> wrote:
> On 25.10.2019 18:01, Robert Haas wrote:
> > On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
> > <[email protected]> wrote:
> >> Just to clarify.
> >> I have now proposed several different solutions for GTT:
> >>
> >> Shared vs. private buffers for GTT:
> >> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
> >> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
> > I vote for #1. I think parallel query for temp objects may be a
> > desirable feature, but I don't think it should be the job of a patch
> > implementing GTTs to make it happen. In fact, I think it would be an
> > actively bad idea, because I suspect that if we do eventually support
> > temp relations for parallel query, we're going to want a solution that
> > is shared between regular temp tables and global temp tables, not
> > separate solutions for each.
>
> Sorry, may be I do not not understand you.
> It seems to me that there is only one thing preventing usage of
> temporary tables in parallel plans: private buffers.
> If global temporary tables are accessed as normal tables though shared
> buffers then them can be used in parallel queries
> and no extra support is required for it.
> At least I have checked that parallel queries are correctly worked for
> my implementation of GTT with shared buffers.
> So I do not understand about which "separate solutions" you are talking
> about.
>
> I can agree that private buffers may be good starting point for GTT
> implementation, because it is less invasive and GTT access speed is
> exactly the same as of normal temp tables.
> But I do not understand your argument why it is "actively bad idea".
Well, it sounds like you're talking about ending up in a situation
where local temporary tables are still in private buffers, but global
temporary table data is in shared buffers. I think that would be
inconsistent. And it would mean that when somebody wanted to make
local temporary tables accessible in parallel query, they'd have to
write a patch for that. In other words, I don't support dividing the
patches like this:
Patch #1: Support global temporary tables + allow global temporary
tables to used by parallel query
Patch #2: Allow local temporary tables to be used by parallel query
I support dividing them like this:
Patch #1: Support global temporary tables
Patch #2: Allow (all kinds of) temporary tables to be used by parallel query
The second division looks a lot cleaner to me, although as always I
might be missing something.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 12:13 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
@ 2019-10-28 13:48 ` Konstantin Knizhnik <[email protected]>
2019-10-28 16:29 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
0 siblings, 1 reply; 1002+ messages in thread
From: Konstantin Knizhnik @ 2019-10-28 13:48 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On 28.10.2019 15:13, Robert Haas wrote:
> On Fri, Oct 25, 2019 at 12:22 PM Konstantin Knizhnik
> <[email protected]> wrote:
>> On 25.10.2019 18:01, Robert Haas wrote:
>>> On Fri, Oct 11, 2019 at 9:50 AM Konstantin Knizhnik
>>> <[email protected]> wrote:
>>>> Just to clarify.
>>>> I have now proposed several different solutions for GTT:
>>>>
>>>> Shared vs. private buffers for GTT:
>>>> 1. Private buffers. This is least invasive patch, requiring no changes in relfilenodes.
>>>> 2. Shared buffers. Requires changing relfilenode but supports parallel query execution for GTT.
>>> I vote for #1. I think parallel query for temp objects may be a
>>> desirable feature, but I don't think it should be the job of a patch
>>> implementing GTTs to make it happen. In fact, I think it would be an
>>> actively bad idea, because I suspect that if we do eventually support
>>> temp relations for parallel query, we're going to want a solution that
>>> is shared between regular temp tables and global temp tables, not
>>> separate solutions for each.
>> Sorry, may be I do not not understand you.
>> It seems to me that there is only one thing preventing usage of
>> temporary tables in parallel plans: private buffers.
>> If global temporary tables are accessed as normal tables though shared
>> buffers then them can be used in parallel queries
>> and no extra support is required for it.
>> At least I have checked that parallel queries are correctly worked for
>> my implementation of GTT with shared buffers.
>> So I do not understand about which "separate solutions" you are talking
>> about.
>>
>> I can agree that private buffers may be good starting point for GTT
>> implementation, because it is less invasive and GTT access speed is
>> exactly the same as of normal temp tables.
>> But I do not understand your argument why it is "actively bad idea".
> Well, it sounds like you're talking about ending up in a situation
> where local temporary tables are still in private buffers, but global
> temporary table data is in shared buffers. I think that would be
> inconsistent. And it would mean that when somebody wanted to make
> local temporary tables accessible in parallel query, they'd have to
> write a patch for that. In other words, I don't support dividing the
> patches like this:
>
> Patch #1: Support global temporary tables + allow global temporary
> tables to used by parallel query
> Patch #2: Allow local temporary tables to be used by parallel query
>
> I support dividing them like this:
>
> Patch #1: Support global temporary tables
> Patch #2: Allow (all kinds of) temporary tables to be used by parallel query
>
> The second division looks a lot cleaner to me, although as always I
> might be missing something.
>
Logically it may be good decision. But piratically support of parallel
access to GTT requires just accessing their data through shared buffer.
But in case of local temp tables we need also need to some how share
table's metadata between parallel workers. It seems to be much more
complicated if ever possible.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* Re: [Proposal] Global temporary tables
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-25 15:01 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-25 16:22 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
2019-10-28 12:13 ` Re: [Proposal] Global temporary tables Robert Haas <[email protected]>
2019-10-28 13:48 ` Re: [Proposal] Global temporary tables Konstantin Knizhnik <[email protected]>
@ 2019-10-28 16:29 ` Robert Haas <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Robert Haas @ 2019-10-28 16:29 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: 曾文旌(义从) <[email protected]>; pgsql-hackers; 蔡松露(子嘉) <[email protected]>; Cai, Le <[email protected]>; 张广舟(明虚) <[email protected]>; 赵殿奎 <[email protected]>; 萧少聪(铁庵) <[email protected]>
On Mon, Oct 28, 2019 at 9:48 AM Konstantin Knizhnik
<[email protected]> wrote:
> Logically it may be good decision. But piratically support of parallel
> access to GTT requires just accessing their data through shared buffer.
> But in case of local temp tables we need also need to some how share
> table's metadata between parallel workers. It seems to be much more
> complicated if ever possible.
Why? The backends all share a snapshot, and can load whatever they
need from the system catalogs.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
* [PATCH 5/9] document store_change somewhat more
@ 2026-03-12 15:10 Álvaro Herrera <[email protected]>
0 siblings, 0 replies; 1002+ messages in thread
From: Álvaro Herrera @ 2026-03-12 15:10 UTC (permalink / raw)
---
.../replication/pgoutput_repack/pgoutput_repack.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/backend/replication/pgoutput_repack/pgoutput_repack.c b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
index 90f3a8975b9..79fc611b9ff 100644
--- a/src/backend/replication/pgoutput_repack/pgoutput_repack.c
+++ b/src/backend/replication/pgoutput_repack/pgoutput_repack.c
@@ -158,7 +158,14 @@ plugin_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
}
}
-/* Store concurrent data change. */
+/*
+ * For each change affecting the table being repacked, we store enough
+ * information about each tuple in it, so that it can be replayed in the
+ * new copy of the table.
+ *
+ * XXX for DELETE and the UPDATE OLD tuples, we could store just the
+ * replication identity instead of the full tuple.
+ */
static void
store_change(LogicalDecodingContext *ctx, Relation relation,
ConcurrentChangeKind kind, HeapTuple tuple)
--
2.47.3
--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename*0="0006-use-int-instead-of-uint32-for-the-result-of-list_len.noc";
filename*1="fbot.txt"
^ permalink raw reply [nested|flat] 1002+ messages in thread
end of thread, other threads:[~2026-03-12 15:10 UTC | newest]
Thread overview: 1002+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 12:15 [Proposal] Global temporary tables =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-11 13:50 ` Konstantin Knizhnik <[email protected]>
2019-10-12 05:16 ` Pavel Stehule <[email protected]>
2019-10-15 09:49 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-17 10:18 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-25 15:01 ` Robert Haas <[email protected]>
2019-10-25 15:13 ` Pavel Stehule <[email protected]>
2019-10-28 12:07 ` Robert Haas <[email protected]>
2019-10-28 13:37 ` Konstantin Knizhnik <[email protected]>
2019-10-28 16:40 ` Robert Haas <[email protected]>
2019-10-29 08:04 ` Konstantin Knizhnik <[email protected]>
2019-11-06 13:24 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-06 16:08 ` Konstantin Knizhnik <[email protected]>
2019-11-07 09:30 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 09:40 ` Pavel Stehule <[email protected]>
2019-11-07 12:17 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 12:29 ` Pavel Stehule <[email protected]>
2019-11-07 11:49 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-07 16:32 ` Konstantin Knizhnik <[email protected]>
2019-11-08 07:50 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-08 12:57 ` Konstantin Knizhnik <[email protected]>
2019-10-25 16:22 ` Konstantin Knizhnik <[email protected]>
2019-10-25 17:00 ` Pavel Stehule <[email protected]>
2019-11-01 15:15 ` Konstantin Knizhnik <[email protected]>
2019-11-01 15:26 ` Robert Haas <[email protected]>
2019-11-01 16:09 ` Konstantin Knizhnik <[email protected]>
2019-11-02 05:30 ` Pavel Stehule <[email protected]>
2019-11-02 07:19 ` Julien Rouhaud <[email protected]>
2019-11-02 07:23 ` Pavel Stehule <[email protected]>
2019-11-02 07:24 ` Pavel Stehule <[email protected]>
2019-11-02 08:56 ` Julien Rouhaud <[email protected]>
2019-11-02 15:09 ` Konstantin Knizhnik <[email protected]>
2019-11-02 15:30 ` Julien Rouhaud <[email protected]>
2019-11-02 15:15 ` Konstantin Knizhnik <[email protected]>
2019-11-02 16:34 ` Pavel Stehule <[email protected]>
2019-11-08 15:06 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-11-11 15:19 ` Konstantin Knizhnik <[email protected]>
2019-10-28 07:15 ` =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
2019-10-28 12:13 ` Robert Haas <[email protected]>
2019-10-28 13:48 ` Konstantin Knizhnik <[email protected]>
2019-10-28 16:29 ` Robert Haas <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
2026-03-12 15:10 [PATCH 5/9] document store_change somewhat more Álvaro Herrera <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox