Closed dpage closed 2 years ago
Image migrated from Redmine: https://redmine.postgresql.org/attachments/download/6426 Originally created by Akshay Joshi at 2021-10-25 08:58:37 UTC.
Filename: Preferences.png
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-2 Originally created by Akshay Joshi at 2021-10-25 09:00:20 UTC.
Hi Franz
What is the value of "Ignore owner" and "Ignore whitespaces" in the Preferences -> Schema Diff -> Display? It should be set to true if you would like to ignore the owner and whitespaces in the function.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Assigned To changed | Franz-Josef Färber | |
Attachment added | Preferences.png |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-3 Originally created by Franz-Josef Färber at 2021-10-28 09:27:03 UTC.
Ignore Owner and Ignore Whitespaces are both false.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-4 Originally created by Franz-Josef Färber at 2021-10-28 09:28:21 UTC.
You needn't send me a screenshot describing how to find that in the preferences. I am able to find that with the textual description, too ;-)
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-5 Originally created by Akshay Joshi at 2021-10-28 09:37:28 UTC.
Then set those parameters to True and compare the databases/schemas again.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-6 Originally created by Franz-Josef Färber at 2021-10-28 10:46:57 UTC.
OK, I now have begun debugging myself:
In case #1 of schema tablefunc, the JSON shows different owners (by name, as opposed to #2). BUT THE SCHEMA DIFF TOOL SHOULD SUGGEST AN "ALTER xy OWNER TO xz" STATEMENT, WHICH IT DOES NOT. I again strongly suggest you to add kind of assertions to your program code that when the schema diff lists DB objects as different but your source and target SQL are identical, SOMETHING IS DEEPLY WRONG with your software.
In case #2 of type "meldung", the typowner oids are different, but their names in pg_authid are identical. The role names should get compared, not the role ids.
In case #3, there is a minimal whitespace variation. One space after line "FROM pg_catalog.pg_attribute a". My fault.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-7 Originally created by Akshay Joshi at 2021-10-28 11:42:58 UTC.
Franz-Josef Färber wrote:
OK, I now have begun debugging myself:
In case #1 of schema tablefunc, the JSON shows different owners (by name, as opposed to #2). BUT THE SCHEMA DIFF TOOL SHOULD SUGGEST AN "ALTER xy OWNER TO xz" STATEMENT, WHICH IT DOES NOT. I again strongly suggest you to add kind of assertions to your program code that when the schema diff lists DB objects as different but your source and target SQL are identical, SOMETHING IS DEEPLY WRONG with your software.
That's what we are trying to identify and fix the issue for the betterment of the software.
In case #2 of type "meldung", the typowner oids are different, but their names in pg_authid are identical. The role names should get compared, not the role ids.
In the above case we already have below logic to ignore typowner: if ignore_owner: owner_keys = ['owner', 'eventowner', 'funcowner', 'fdwowner', 'fsrvowner', 'lanowner', 'relowner', 'seqowner', 'typowner', 'typeowner'] ignore_keys = ignore_keys + owner_keys
We are not able to reproduce this issue,
In case #3, there is a minimal whitespace variation. One space after line "FROM pg_catalog.pg_attribute a". My fault.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-8 Originally created by Akshay Joshi at 2021-10-28 11:46:51 UTC.
Hi Franz
Can we have a screen-sharing session or have a zoom call to identify the issue?
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-9 Originally created by Franz-Josef Färber at 2021-10-28 16:32:25 UTC.
Can we have a screen-sharing session or have a zoom call to identify the issue? Yes. I am working in UTC+1 time zone from about 8:00 to 18:00 (with breaks).
Nevertheless,
case #1: Is pgadmin's fault, do you agree?
case #2: I DO NOT want to ignore the owner. When "ignore owner" is off, I expect pgadmin to treat the owners as equal. As I already said, the owners' "names in pg_authid are identical." , just happen to have different oids (because they reside on different DBs). Do you agree?
case #3: My fault.
I again strongly suggest you to add kind of assertions to your program code that when the schema diff lists DB objects as different but your source and target SQL are identical, SOMETHING IS DEEPLY WRONG with your software.
That's what we are trying to identify and fix the issue for the betterment of the software.
Well, you still don't seem to consider my suggestion. You aren't even relating to it in your answer.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-10 Originally created by Akshay Joshi at 2021-11-26 12:03:12 UTC.
Hi Franz
How we can connect to check the issue? Maybe Zoom call?
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-11 Originally created by Franz-Josef Färber at 2021-11-29 08:18:44 UTC.
My employer's webex video chat would be possible for me. I am in UTF-1 time zone.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-12 Originally created by Franz-Josef Färber at 2021-11-29 08:19:09 UTC.
Ah sorry, UTC-1 time zone :-D
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-13 Originally created by Akshay Joshi at 2021-12-03 05:55:59 UTC.
Hi Franz
I am in UTC+05:30 time zone, whenever you will be free to show the issue, send me the Webex link
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-14 Originally created by Franz-Josef Färber at 2021-12-07 07:42:20 UTC.
Hello Akshay, sorry for my late reply. I'm quite busy currently. The thing is, I have to prepare the database beforehand. Is today 10:00 UTC+1 okay, this is in about 1 hour. Can I have your email so that I can send the webex link?
Thank you in advance for your time.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-15 Originally created by Akshay Joshi at 2021-12-07 07:58:08 UTC.
Hi Franz
My email id is akshay.joshi@enterprisedb.com.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-16 Originally created by Franz-Josef Färber at 2021-12-07 08:41:53 UTC.
Thank you, E-Mail is on the way. Do get irritated, my business E-Mail address is Franz-Josef.Faerber@stmuk.bayern.de .
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-17 Originally created by Franz-Josef Färber at 2021-12-07 08:42:13 UTC.
DO NOT get irritated, I meant.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-18 Originally created by Akshay Joshi at 2021-12-07 10:07:53 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Sprint changed | EDB Sprint 105 | |
Assigned To changed | Franz-Josef Färber | Akshay Joshi |
Status changed | New | In Progress |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-19 Originally created by Akshay Joshi at 2021-12-08 10:34:39 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Sprint changed | EDB Sprint 105 | EDB Sprint 106 |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-20 Originally created by Akshay Joshi at 2021-12-11 16:41:27 UTC.
Applied in changeset commit:bd545fd5b25990afa4d894e0c4dcff5a1b823197.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Done Ratio changed | 0 | 90 |
Status changed | In Progress | In Testing |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-21 Originally created by Akshay Joshi at 2021-12-11 16:42:47 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Fixed Version changed | 6.3 |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-22 Originally created by Yogesh Mahajan at 2021-12-15 07:42:29 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Assigned To changed | Akshay Joshi | Yogesh Mahajan |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/6957#note-23 Originally created by Yogesh Mahajan at 2021-12-16 10:38:22 UTC.
Working fine. Issue was due to same user name but different oid as both servers were on different machines.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Status changed | In Testing | Resolved |
Issue closed on Redmine.
Issue migrated from Redmine: https://redmine.postgresql.org/issues/6957 Originally created by Franz-Josef Färber at 2021-10-25 07:51:17 UTC.
See #6877: Problem still exists.
Schema Diff keeps listing quite a bunch of objects, but the source and target windows contain exactly the same sql. I have also confirmed the database objects are indeed equal by comparing using pg_dump.
This time I have recorded a debug log as advised in #6877. As I consider that log confidential, I won't post the whole log here. Please contact me if you need it.
Note: In case of tablefunc extensions, there seem to be different owners; but schema diff does neither seem to display that nor suggest a ALTER statement to change the owner.
Excerpts from the log: