Gerrit 3.0 and newer store most of their data in git in what is called
"notedb". Essentially account, group, and change data go into
different git refs in various repos. The SQL database that remains is
the "accountPatchReviewDb" [0] so I'm going to assume this is what you
are trying to migrate from H2 to PostgreSQL. This database tracks
which files users have reviewed in a change. There is a migration tool
to migrate this DB from one backend to another [1].
The reason old documentation differs is that the content of the noteDB
was once stored in a SQL database as well. But that stopped being
possible with Gerrit 3.0.
I've never migrated an accountPatchReviewDb or used the migration tool
so am not much more help than pointing you at the docs. Note, [0] says
this migration must happen with the server offline. Others on this
list may have done this migration and have more information than me.
You may also want to double check that the H2 database you want to
migrate is the accountPatchReviewDb; I think H2 may also be used for
caches.
[0]
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#accountPatchReviewDb
[1]
https://gerrit-review.googlesource.com/Documentation/pgm-MigrateAccountPatchReviewDb.html