wangyong86 opened a new issue, #1545:
URL: https://github.com/apache/cloudberry/issues/1545

   ### Apache Cloudberry version
   
   postgres=# select version();
                                                                                
                                 version
   
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PostgreSQL 14.4 (Apache Cloudberry 3.0.0-devel+dev.2152.gb0057df3405 build 
dev) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.2.1 20210130 (Red Hat 
10.2.1-11), 64-bit compiled on Oct 24 2025 08:10:02 (with assert checking)
   (1 row)
   
   
   ### What happened
   
   reorg和copy并发操作时,copy到的数据为空。
   
   ### What you think should happen instead
   
   copy到的数据应该是全部记录
   
   ### How to reproduce
   
   con1
   ```sql
   db1=# alter table t2 set with (reorganize=true);
   ALTER TABLE
   db1=# select count(*) from t2;
     count
   ----------
    40000000
   (1 row)
   
   db1=#
   ```
   con2
   [gpadmin@dev1 workspace]$ psql db1 -c "copy t2 to '/home/gpadmin/t2.csv' 
with (format csv, header true);"
   COPY 0
   [gpadmin@dev1 workspace]$
   
   
   ### Operating System
   
   [wy@sdw1 ~]$ uname -a Linux sdw1 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 
23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   
   ### Anything else
   
   如果换成是select则数据是正常的的。原因是:select 在拿到锁后,还会再更新一下snapshot。而 
copy仅在是在拿锁前取到snapshot就不再变化。
   这个问题似乎由来已久,但pg类似的操作比如 vacuum full 和 copy则没有类似问题。
   
   ### Are you willing to submit PR?
   
   - [ ] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to