You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-RT The tablespace -- SELECT spcname FROM pg_tablespace WHERE oid = ? (zero to many)
-RD The database -- SELECT datname FROM pg_database WHERE oid = ? (zero to many)
-RR The relation -- SELECT relname FROM pg_class WHERE relfillnode = ? (zero to many)
Combination
-R RT/RD/RR
We would need maps of oid/relfillnode -> name such that users can use the real names instead. Otherwise only raw numbers are supported. Likely best long-term is to do a -c pgmoneta_walinfo.conf plus -u pgmoneta_walinfo_users.conf -- those should be optional.
If these maps are available we can replace them in the WAL record description - probably need a switch for that, like --translate
We would need maps of oid/relfillnode -> name such that users can use the real names instead. Otherwise only raw numbers are supported. Likely best long-term is to do a -c pgmoneta_walinfo.conf plus -u pgmoneta_walinfo_users.conf -- those should be optional.
Why would I need pgmoneta_walinfo_users.conf? pgmoneta_walinfo.conf may be useful now, but it's easier to just make them CLI arguments. Also, pgmoneta_walinfo.conf may be useless as pgmoneta-walinfo is a tool that runs once on the wal file, not starting a server or something like that, so a conf file can be more than what the feature needs.
If these maps are available we can replace them in the WAL record description - probably need a switch for that, like --translate
I don't understand the difference between -R TDR and --translate; can you explain the difference between them?
Besides, when I took a look here, I didn't find anything related to databases/tablespaces/relations. Should I add them to the description of the WAL record, or did you mean something else in the issue description?
You need access to the cluster in order to resolve the OIDs in the WAL records. However, this should be optional and then the filtering requiring that information wouldn't work.
We could save the mappings in a file and then load that instead after the first run with a user/password
The part of accessing the cluster and getting the mappings directly from it seems a bit complicated to me, so I will go with the solution of the existence of a mappings YAML file or something that I load into memory and use it to update the WAL records. Although I don't consider it the best solution, it will give the core functionality, and maybe in the future, when I get exposed a little bit to the codebase, I will make it totally without making the user execute some queries manually and put them in the config file.
Activity
Mohab96 commentedon Feb 14, 2025
Can I work on this one? @jesperpedersen
jesperpedersen commentedon Feb 14, 2025
@Mohab96 #475 is likely better as a first contribution
Mohab96 commentedon Feb 14, 2025
Okay, no problem.
Mohab96 commentedon Mar 8, 2025
pgmoneta_walinfo_users.conf?pgmoneta_walinfo.confmay be useful now, but it's easier to just make them CLI arguments. Also,pgmoneta_walinfo.confmay be useless aspgmoneta-walinfois a tool that runs once on the wal file, not starting a server or something like that, so a conf file can be more than what the feature needs.-R TDRand--translate; can you explain the difference between them?Mohab96 commentedon Mar 8, 2025
Besides, when I took a look here, I didn't find anything related to databases/tablespaces/relations. Should I add them to the description of the WAL record, or did you mean something else in the issue description?
jesperpedersen commentedon Mar 8, 2025
You need access to the cluster in order to resolve the OIDs in the WAL records. However, this should be optional and then the filtering requiring that information wouldn't work.
We could save the mappings in a file and then load that instead after the first run with a user/password
jesperpedersen commentedon Mar 8, 2025
--translateis a heavy operation as it replaces the OIDs in the WAL record's description with the actual namesMohab96 commentedon Mar 8, 2025
Aha, I see. Then, what I need to do now is:
e.g. oid 12345; -> dbname mydb
I will work on these and get back to you.
Mohab96 commentedon Mar 8, 2025
The part of accessing the cluster and getting the mappings directly from it seems a bit complicated to me, so I will go with the solution of the existence of a mappings YAML file or something that I load into memory and use it to update the WAL records. Although I don't consider it the best solution, it will give the core functionality, and maybe in the future, when I get exposed a little bit to the codebase, I will make it totally without making the user execute some queries manually and put them in the config file.
jesperpedersen commentedon Mar 8, 2025
You have the queries in the 1st post.
You can use JSON or YAML - I would use JSON
Mohab96 commentedon Mar 8, 2025
Then, the
-Roption specifies which objects the user wants to map, while--translatespecifies whether the user wants the mapping, right?jesperpedersen commentedon Mar 8, 2025
mydb/public/mytableor something like thatMohab96 commentedon Mar 8, 2025
Can you please emphasize the difference between -R and --translate because I didn't understand what you've said here?
35 remaining items
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering
[pgmoneta#415] Implemented translation and filtering