Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread ls7777
Hi,I'll try to return it to the original thread. I absolutely agree with you. Data loss during migration is an unacceptable situation. And why it's still happening, I don't understand. But issuing messages will require translating it into other languages and complicate the patch.  I'm not a program

RE: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread Hayato Kuroda (Fujitsu)
Hi, Thanks for updating the patch. Mostly looks good. I ran pgindent locally and indents of my part were incorrect. PSA the included version. I have no comments anymore. Thanks for the great work. Best regards, Hayato Kuroda FUJITSU LIMITED v7-0001-Migration-of-the-pg_commit_ts-directory.pa

Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread ls7777
Hi, Yes, track_commit_timestamp must be installed in the new instance.This is only the responsibility of an experienced user.pg_upgrage should allow you to save pg_commit_ts if this data exists at the time of migration.Warnings are not needed, the loss of this data is not critical in most cases. Th

Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread Maxim Orlov
On Thu, 2 Oct 2025 at 11:49, Amit Kapila wrote: > When we try to > copy slots and the wal_level on the new server is minimal, we error > out, so shouldn't we do the same here and error_out if > track_commit_timestamp is not enabled and we have some valid commit_ts > data to copy? > +1 Sounds re

Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread Maxim Orlov
On Wed, 15 Oct 2025 at 04:46, Hayato Kuroda (Fujitsu) < [email protected]> wrote: > Hi, > > Thanks for updating the patch. Mostly looks good. Yep, looks good to me too. If there are no objections, I will move forward to mark the thread as ready for committers. Hayato Kuroda, you did a

Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread ls7777
Hi, You did consider the case that track_commit_timestamp is set to on but the instancehas not started before the pg_upgrade, right? Valid point. Yes. Sorry, I'm not very clear this part. Can you describe the point bit more?Easy-to-read code. But I've already changed everything. I've followed all t

Re: Patch for migration of the pg_commit_ts directory

2025-10-18 Thread ls7777
Hi, At the time check_control_data is launched for the new cluster, the control file does not contain information about the set track_commit_timestamp=on. It is installed only in postgresql.conf. The check_track_commit_timestamp_parameter function is only needed for the new cluster. And you can not

RE: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Hayato Kuroda (Fujitsu)
Hi, Thanks for updating the patch. Regarding the check_track_commit_timestamp_parameter(), I'm not sure the function is needed. Since pg_controldata outputs whether the commit_ts module is enabled or not [1], can we obtain there instead? I imagined like we can add a new field at ControlData, it

RE: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Hayato Kuroda (Fujitsu)
Hi, Thanks for updating the patch and sorry for the late reply. Here are my comments. 01. ``` + prep_status("Checking for pg_commit_ts"); ``` I think we must clarify which node is being checked. Something like: Checking for new cluster configuration for commit timestamp 02. ``` }

Re: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Maxim Orlov
Looks good to me. As I see it, the patch is almost ready, so I decided to create an CF entry [0]. Feel free to edit it as you see fit. And your mail also includes attachment (unknown_filename ), interfering with the CF-bot.

RE: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Hayato Kuroda (Fujitsu)
Hi, > At the time check_control_data is launched for the new cluster, the control > file > does not contain information about the set track_commit_timestamp=on. It is > installed only in postgresql.conf. You did consider the case that track_commit_timestamp is set to on but the instance has not

RE: Patch for migration of the pg_commit_ts directory v2

2025-10-17 Thread Hayato Kuroda (Fujitsu)
Hi, Could you please reply to the original thread? Otherwise, it is difficult to track later. Regarding the patch, I think Amit suggested to raise an ERROR in case of parameter mismatch, and Maxim agreed the point [2]. How do you feel? [1]: https://www.postgresql.org/message-id/CAA4eK1%2BZayox

Re: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread ls7777
Thanks.That's the good news.Thanks to Hayato Kuroda, for the advice.Thanks to everyone who participated in the promotion of the patch.  Кому: ls ([email protected]);Копия: Hayato Kuroda (Fujitsu) ([email protected]), [email protected], [email protected]

Re: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread ls7777
Hi,Followed all recommendations.   Кому: 'ls' ([email protected]);Копия: [email protected], [email protected], [email protected];Тема: Patch for migration of the pg_commit_ts directory;09.10.2025, 11:22, "Hayato Kuroda (Fujitsu)" :Hi,Thanks for updating the patch

Re: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Bruce Momjian
On Mon, Oct 6, 2025 at 07:31:52PM +0500, ls wrote: > Hi, > I'll try to return it to the original thread. >   > I absolutely agree with you. Data loss during migration is an unacceptable > situation. And why it's still happening, I don't understand. But issuing > messages will require translati

RE: Patch for migration of the pg_commit_ts directory

2025-10-17 Thread Hayato Kuroda (Fujitsu)
Hi, Thanks for updating the patch. ``` +my ($xid,$ts) = $resold =~ /\s*(\d+)\s*\|(.*)/; ``` Per my understanding $ts is not used here. Can you remove it? Apart from above, I found some cosmetic issues. Please see attached my fix which can be applied atop HEAD. Can you check and include if it is

Re: Patch for migration of the pg_commit_ts directory

2025-10-14 Thread ls7777
Hi,I applied the diff file.Deleted the $ts variable.   Кому: 'ls' ([email protected]);Копия: [email protected], [email protected], [email protected];Тема: Patch for migration of the pg_commit_ts directory;14.10.2025, 09:27, "Hayato Kuroda (Fujitsu)"

Re: Patch for migration of the pg_commit_ts directory

2025-10-06 Thread ls7777
Hi. Added a fatal message about an incorrect track_commit_timestamp parameter for new cluster.  Update test.Fail check:Checking for new cluster tablespace directories               okChecking for pg_commit_ts                                     "track_commit_timestamp" must be "on" but is set to "o

Re: Patch for migration of the pg_commit_ts directory

2025-10-02 Thread Amit Kapila
On Thu, Oct 2, 2025 at 12:10 PM Hayato Kuroda (Fujitsu) wrote: > > > Yes, track_commit_timestamp must be installed in the new instance. > > This is only the responsibility of an experienced user. > > pg_upgrage should allow you to save pg_commit_ts if this data exists at the > > time of migration

RE: Patch for migration of the pg_commit_ts directory

2025-10-01 Thread Hayato Kuroda (Fujitsu)
Hi, (Sorry but I cannot find your name) > Yes, track_commit_timestamp must be installed in the new instance. > This is only the responsibility of an experienced user. > pg_upgrage should allow you to save pg_commit_ts if this data exists at the > time of migration. > Warnings are not needed, the

RE: Patch for migration of the pg_commit_ts directory

2025-10-01 Thread Hayato Kuroda (Fujitsu)
Hi, Per my understanding, track_commit_timestamp must be on the new instance, otherwise it would be removed when new instance starts. Is it correct? If so, should we detect the difference and do some warnings/errors here? Or it is just the user's responsibility? Best regards, Hayato Kuroda FUJITS

RE: Patch for migration of the pg_commit_ts directory

2025-10-01 Thread Hayato Kuroda (Fujitsu)
Dear Maxim, Thanks for considering the test case. To confirm, where should we put the test code? Pp_upgrade has already had 006 test, and commit_ts has not had 005 test. Regarding the test, it is enough to check whether oldest/newest transactions on the old cluster can be tracked. Best regards

Re: Patch for migration of the pg_commit_ts directory

2025-09-30 Thread Maxim Orlov
Yes, the pg_commit_ts directory is not transferred by pg_upgrade. Basically, you can get the exact same result by manually copying the pg_commit_ts directory and running pg_resetwal. And this patch does it automatically. In other words, the patch provides the stated functionality, but consider ru