Compatibility Matrix for Postgres SQL with gerrit 3.0.9

114 views
Skip to first unread message

anish anil

unread,
Jun 16, 2020, 5:43:58 AM6/16/20
to Repo and Gerrit Discussion
Hello Gerrit Experts,

Is there a compatibility matrix for gerrit when installed with Postgres SQL Server.

We are on 2.15.6 and intending to upgrade to 3.0.9.
We are currently using Postgres and I would like to know if there is a compatibility Matrix for each version.

Like Postgress sql Version supported for 2.15.6
Like Postgress sql Version supported for 2.16
Like Postgress sql Version supported for 3.0
Like Postgress sql Version supported for 3.08

I checked the release and did not find anything in particular.

Also, is there a upgrade path that needs to be followed and upgrade instructions???

I just went through a whole lot of documentation which only states on the DB change -->From Review DB to Note DB is the change.
Our Gerrit Instance was alwayz on Postgres SQL so will we need any additional steps.

Is there relevant documentation that can be refereed????

Thank you,
Anish

Sven Selberg

unread,
Jun 16, 2020, 5:51:15 AM6/16/20
to Repo and Gerrit Discussion
In Gerrit 3.0 the main database is Note DB and there's no need for a relational database (apart from the persistent caches).

Luca Milanesio

unread,
Jun 16, 2020, 5:57:33 AM6/16/20
to Sven Selberg, Luca Milanesio, Repo and Gerrit Discussion

On 16 Jun 2020, at 10:51, Sven Selberg <sven.s...@axis.com> wrote:

In Gerrit 3.0 the main database is Note DB

… NoteDB is not a database either: I would say “Gerrit v3.0” doesn’t need any database as it stores all the information into the Git repository directly :-)

Luca.

-- 
-- 
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/e57f41c6-513d-4ed1-ae6f-da17c68f7528o%40googlegroups.com.

Sven Selberg

unread,
Jun 16, 2020, 6:12:47 AM6/16/20
to Repo and Gerrit Discussion


On Tuesday, June 16, 2020 at 11:57:33 AM UTC+2, lucamilanesio wrote:


On 16 Jun 2020, at 10:51, Sven Selberg <sven....@axis.com> wrote:

In Gerrit 3.0 the main database is Note DB

… NoteDB is not a database either: I would say “Gerrit v3.0” doesn’t need any database as it stores all the information into the Git repository directly :-)

I believe you have a too narrow definition of a database.
https://www.britannica.com/technology/database
What does "DB" in NoteDB otherwize stand for?

I think you mean "Gerrit doesn't need any external DBMS since it manages it's database by itself.".
;-)

 

Luca.

and there's no need for a relational database (apart from the persistent caches).
https://www.gerritcodereview.com/3.0.html#release-highlights 

On Tuesday, June 16, 2020 at 11:43:58 AM UTC+2, anish anil wrote:
Hello Gerrit Experts,

Is there a compatibility matrix for gerrit when installed with Postgres SQL Server.

We are on 2.15.6 and intending to upgrade to 3.0.9.
We are currently using Postgres and I would like to know if there is a compatibility Matrix for each version.

Like Postgress sql Version supported for 2.15.6 
Like Postgress sql Version supported for 2.16
Like Postgress sql Version supported for 3.0
Like Postgress sql Version supported for 3.08

I checked the release and did not find anything in particular.

Also, is there a upgrade path that needs to be followed and upgrade instructions???

I just went through a whole lot of documentation which only states on the DB change -->From Review DB to Note DB is the change.
Our Gerrit Instance was alwayz on Postgres SQL so will we need any additional steps.

Is there relevant documentation that can be refereed????

Thank you,
Anish

-- 
-- 

More info at http://groups.google.com/group/repo-discuss?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

David Ostrovsky

unread,
Jun 16, 2020, 6:26:04 AM6/16/20
to Repo and Gerrit Discussion

Am Dienstag, 16. Juni 2020 11:51:15 UTC+2 schrieb Sven Selberg:
In Gerrit 3.0 the main database is Note DB and there's no need for a relational database (apart from the persistent caches).

This statement is not the whole truth. Gerrit 3.2 still requires database
beside persistent caches: [1]:

"The AccountPatchReviewDb is a database used to store the user file reviewed flags."

As mentioned in the documentation: [1] the following dialects are supported:

  H2, POSTGRESQL, MARIADB, and MYSQL

Luca Milanesio

unread,
Jun 16, 2020, 6:27:33 AM6/16/20
to Sven Selberg, Luca Milanesio, Repo and Gerrit Discussion

On 16 Jun 2020, at 11:12, Sven Selberg <sven.s...@axis.com> wrote:



On Tuesday, June 16, 2020 at 11:57:33 AM UTC+2, lucamilanesio wrote:


On 16 Jun 2020, at 10:51, Sven Selberg <sven....@axis.com> wrote:

In Gerrit 3.0 the main database is Note DB

… NoteDB is not a database either: I would say “Gerrit v3.0” doesn’t need any database as it stores all the information into the Git repository directly :-)

I believe you have a too narrow definition of a database.
https://www.britannica.com/technology/database
What does "DB" in NoteDB otherwize stand for?

NoteDb was a misleading name I believe: “note” comes from the commit notes and “DB” because it was containing the information we had in our DB.

In reality:
- The information is NOT stored in the commit notes
- The information is NOT stored as a DB

The definition of DBMS you pointed out says:
"Database, also called electronic database, any collection of data, or information, that is specially organized for rapid search and retrieval by a computer. Databases are structured to facilitate the storage, retrieval, modification, and deletion of data in conjunction with various data-processing operations. A database management system (DBMS) extracts information from the database in response to queries.”

NoteDb is not specially organised for rapid search *AT ALL*, that’s why we rely on Lucene indexing for it.
NoteDb does not have a query language.

If you say that NoteDb is a DB, people would really get confused and will start looking at “how to install NoteDb” and “is NoteDb allowed in my organisation as DB?”.

If you say “NoteDb means: the information is stored in Git and there isn’t a DBMS requirement at all” then the people will understand (I hope).



I think you mean "Gerrit doesn't need any external DBMS since it manages it's database by itself.".

Nope, there is NO Gerrit Database at all: all information is stored in Git and indexed in Lucene (or ElasticSearch).

P.S. Gerrit uses H2 for persisting their caches, *that* is a DB but is automatically rebuilt if absent, so it isn’t a primary storage either.

Luca.


More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/32c96659-0fa3-417f-85ba-3d2c471eebf3o%40googlegroups.com.

Luca Milanesio

unread,
Jun 16, 2020, 6:29:02 AM6/16/20
to David Ostrovsky, Luca Milanesio, Repo and Gerrit Discussion

On 16 Jun 2020, at 11:26, David Ostrovsky <david.o...@gmail.com> wrote:


Am Dienstag, 16. Juni 2020 11:51:15 UTC+2 schrieb Sven Selberg:
In Gerrit 3.0 the main database is Note DB and there's no need for a relational database (apart from the persistent caches).

This statement is not the whole truth. Gerrit 3.2 still requires database
beside persistent caches: [1]:

"The AccountPatchReviewDb is a database used to store the user file reviewed flags."

As mentioned in the documentation: [1] the following dialects are supported:

  H2, POSTGRESQL, MARIADB, and MYSQL

Yep, true. We discussed but never really agreed of where to put that information.
It is the “last mile” of ReviewDb :-)

Shall we tackle its removal in v3.3?

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Sven Selberg

unread,
Jun 16, 2020, 6:40:07 AM6/16/20
to Repo and Gerrit Discussion
Forgot about accountPatchReviewDb.

I'm saying that Note DB is a database, I'm not saying that Note DB is a Database Management System.
I'm saying that Gerrit doesn't need an external DBMS since it effectively is it's own DBMS.
H2 is not a database it's a DBMS. :-)

/Sven


On Tuesday, June 16, 2020 at 12:29:02 PM UTC+2, lucamilanesio wrote:


On 16 Jun 2020, at 11:26, David Ostrovsky <david.o...@gmail.com> wrote:


Am Dienstag, 16. Juni 2020 11:51:15 UTC+2 schrieb Sven Selberg:
In Gerrit 3.0 the main database is Note DB and there's no need for a relational database (apart from the persistent caches).

This statement is not the whole truth. Gerrit 3.2 still requires database
beside persistent caches: [1]:

"The AccountPatchReviewDb is a database used to store the user file reviewed flags."

As mentioned in the documentation: [1] the following dialects are supported:

  H2, POSTGRESQL, MARIADB, and MYSQL

Yep, true. We discussed but never really agreed of where to put that information.
It is the “last mile” of ReviewDb :-)

Shall we tackle its removal in v3.3?

Luca.

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

Luca Milanesio

unread,
Jun 16, 2020, 6:46:09 AM6/16/20
to Sven Selberg, Luca Milanesio, Repo and Gerrit Discussion

On 16 Jun 2020, at 11:40, Sven Selberg <sven.s...@axis.com> wrote:

Forgot about accountPatchReviewDb.

I'm saying that Note DB is a database,

Then also the Git repository is a database, right?
I believe people will definitely get confused :-(

I'm not saying that Note DB is a Database Management System.
I'm saying that Gerrit doesn't need an external DBMS since it effectively is it's own DBMS.

Again, people will get confused.
When you say in a company “Gerrit has its down DBMS” people will start engaging with DBA and asking for you data-schema, the fact that needs to be compliant with the company policies as well.

I hope people will use the mailing list as a source of information and I am trying to be very careful in not being ambiguous or misleading.

NoteDb is a “JSON file format” we use in Gerrit to store the review meta-data, that’s it.
If you look at NoteDb, it is a set of commits with JSON files inside the refs/changes/*/meta space, that’s it.
If you show to people what is NoteDb, they will understand.

Luca.


More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/68611537-4dff-4385-a915-ccd4ebfefecbo%40googlegroups.com.

Matthias Sohn

unread,
Jun 16, 2020, 7:05:44 AM6/16/20
to Luca Milanesio, Sven Selberg, Repo and Gerrit Discussion
On Tue, Jun 16, 2020 at 12:46 PM Luca Milanesio <luca.mi...@gmail.com> wrote:


On 16 Jun 2020, at 11:40, Sven Selberg <sven.s...@axis.com> wrote:

Forgot about accountPatchReviewDb.

I'm saying that Note DB is a database,

Then also the Git repository is a database, right?
I believe people will definitely get confused :-(

I'm not saying that Note DB is a Database Management System.
I'm saying that Gerrit doesn't need an external DBMS since it effectively is it's own DBMS.

Again, people will get confused.
When you say in a company “Gerrit has its down DBMS” people will start engaging with DBA and asking for you data-schema, the fact that needs to be compliant with the company policies as well.

I hope people will use the mailing list as a source of information and I am trying to be very careful in not being ambiguous or misleading.

NoteDb is a “JSON file format” we use in Gerrit to store the review meta-data, that’s it.
If you look at NoteDb, it is a set of commits with JSON files inside the refs/changes/*/meta space, that’s it.
If you show to people what is NoteDb, they will understand.

I think git is a kind of a NoSQL database [1]. Gerrit's noteDB leverages that and uses git notes to also store
all the metadata it needs to implement code review (review comments, votes, users, groups, ...)
in git and adds indexes using lucene or elasticsearch to implement fast queries.
 

Luca Milanesio

unread,
Jun 16, 2020, 7:24:11 AM6/16/20
to Matthias Sohn, Luca Milanesio, Sven Selberg, Repo and Gerrit Discussion

On 16 Jun 2020, at 12:05, Matthias Sohn <matthi...@gmail.com> wrote:

On Tue, Jun 16, 2020 at 12:46 PM Luca Milanesio <luca.mi...@gmail.com> wrote:


On 16 Jun 2020, at 11:40, Sven Selberg <sven.s...@axis.com> wrote:

Forgot about accountPatchReviewDb.

I'm saying that Note DB is a database,

Then also the Git repository is a database, right?
I believe people will definitely get confused :-(

I'm not saying that Note DB is a Database Management System.
I'm saying that Gerrit doesn't need an external DBMS since it effectively is it's own DBMS.

Again, people will get confused.
When you say in a company “Gerrit has its down DBMS” people will start engaging with DBA and asking for you data-schema, the fact that needs to be compliant with the company policies as well.

I hope people will use the mailing list as a source of information and I am trying to be very careful in not being ambiguous or misleading.

NoteDb is a “JSON file format” we use in Gerrit to store the review meta-data, that’s it.
If you look at NoteDb, it is a set of commits with JSON files inside the refs/changes/*/meta space, that’s it.
If you show to people what is NoteDb, they will understand.

I think git is a kind of a NoSQL database [1]. Gerrit's noteDB leverages that and uses git notes to also store
all the metadata it needs to implement code review (review comments, votes, users, groups, ...)
in git

Yes

and adds indexes using lucene or elasticsearch to implement fast queries.

No, Lucene and Elasticsearch are not strictly related to NoteDb at all: in fact they were introduced when NoteDb did not exist yet and they were useful with ReviewDb as well.


Thanks for sharing, really interesting :-)

The article though is more for "how you can use git as a NoSQL database” correct?
If we consider Git as a NoSQL database, then you are right, NoteDb is based on Git and therefore is a NoSQL database as well.

Luca.

anish anil

unread,
Jun 16, 2020, 8:01:36 AM6/16/20
to Repo and Gerrit Discussion
Wow, This has confused me the most now,

Our current Version is 2.15.6 and we are using postgresql and we intend to upgrade to 3.0.9

The current $GERRIT_HOME/etc/config file looks like the below:

*****************
[database]
        type = postgresql
        hostname = gitdb02.ad.harman.com
        database = dbhub
        username = gerrit
        connectionPool = true
        poolLimit = 500
        poolMaxWait = 120s
        poolMaxIdle = 16
*******************

Now I know that we moved to Note DB in 2.16 But couple of years back when we started off, we were using postgre sql DB and not the default Review DB provided in 2.15.

This is as per the documentation link below:


**********************

PostgreSQL

This option is more complicated than the H2 option but is recommended for larger installations. It’s the database backend with the largest userbase in the Gerrit community.

Create a user for the web application within PostgreSQL, assign it a password, create a database to store the metadata, and grant the user full rights on the newly created database:

**********************

Now, should be still switch to Note DB or stay on Posgresql as we have  huge user base and nearly 5k+ Projects
What should our migrate path be????

Do we have a documentation or what version of postgresql is compatible to the version of gerrit

Is it possible to move the Data from the Postgre SQL DB to NoteDB??? If Yes, How do we do that???

Is there anything that is documented to do the Upgrade to the latest version when using the PostgreSQL ............

As we went by the documenation which states that postgres is what is recommended.

Thank you,
Anish

Sven Selberg

unread,
Jun 16, 2020, 9:00:10 AM6/16/20
to Repo and Gerrit Discussion


On Tuesday, June 16, 2020 at 2:01:36 PM UTC+2, anish anil wrote:
Wow, This has confused me the most now,
Sorry about the tool-shedding. 

Our current Version is 2.15.6 and we are using postgresql and we intend to upgrade to 3.0.9

The current $GERRIT_HOME/etc/config file looks like the below:

*****************
[database]
        type = postgresql
        hostname = gitdb02.ad.harman.com
        database = dbhub
        username = gerrit
        connectionPool = true
        poolLimit = 500
        poolMaxWait = 120s
        poolMaxIdle = 16
*******************

Now I know that we moved to Note DB in 2.16 But couple of years back when we started off, we were using postgre sql DB and not the default Review DB provided in 2.15.

This is as per the documentation link below:


**********************

PostgreSQL

This option is more complicated than the H2 option but is recommended for larger installations. It’s the database backend with the largest userbase in the Gerrit community.

Create a user for the web application within PostgreSQL, assign it a password, create a database to store the metadata, and grant the user full rights on the newly created database:

**********************

Now, should be still switch to Note DB or stay on Posgresql as we have  huge user base and nearly 5k+ Projects
What should our migrate path be????

In 3.0 you have no choice but to use Note DB.
The only thing you might want to consider still using PostgresQL for is accountPatchReviewDb which is just a small table to keep track of which files are reviewed by which users.

I can't imagine that you would run into any compatibility issues with regards to PostgresQL if you decide to use it for accountPatchReviewDb.

anish anil

unread,
Jun 16, 2020, 2:03:04 PM6/16/20
to Repo and Gerrit Discussion
Thank you, But how do we really Migrate now ??????
What happens to all the data in the postreSQL DB that we have???

Is there a conversion from postgres to Note DB Which needs to be done???

Do we have any documented steps that needs to tested and performed???


On Tuesday, 16 June 2020 15:13:58 UTC+5:30, anish anil wrote:

Sven Selberg

unread,
Jun 17, 2020, 3:25:57 AM6/17/20
to Repo and Gerrit Discussion


On Tuesday, June 16, 2020 at 8:03:04 PM UTC+2, anish anil wrote:
Thank you, But how do we really Migrate now ??????
What happens to all the data in the postreSQL DB that we have???

Is there a conversion from postgres to Note DB Which needs to be done???

Do we have any documented steps that needs to tested and performed???

I believe the safest route would be to upgrade to 2.16 as an intermediary step and do a full migration:
https://www.gerritcodereview.com/2.16.html#migration-to-notedb
And once that is complete upgrade to v3.0.x. But there are probably others that have a better idea if this is necessary.

On a different note. Have you considered upgrading to v3.2.x instead of 3.0.x?

Luca Milanesio

unread,
Jun 17, 2020, 4:02:11 AM6/17/20
to Repo and Gerrit Discussion, Luca Milanesio, Sven Selberg

On 17 Jun 2020, at 08:25, Sven Selberg <sven.s...@axis.com> wrote:



On Tuesday, June 16, 2020 at 8:03:04 PM UTC+2, anish anil wrote:
Thank you, But how do we really Migrate now ??????
What happens to all the data in the postreSQL DB that we have???

Is there a conversion from postgres to Note DB Which needs to be done???

Do we have any documented steps that needs to tested and performed???

I believe the safest route would be to upgrade to 2.16 as an intermediary step and do a full migration:
https://www.gerritcodereview.com/2.16.html#migration-to-notedb
And once that is complete upgrade to v3.0.x. But there are probably others that have a better idea if this is necessary.

On a different note. Have you considered upgrading to v3.2.x instead of 3.0.x?

I won’t suggest v3.2.x for now, we are still finding so major regressions on the replication side (the last P1 reporter yesterday was [1]).

But v3.1.6 would be a good “next step” after the v3.0.x upgrade.

Luca.



 


On Tuesday, 16 June 2020 15:13:58 UTC+5:30, anish anil wrote:
Hello Gerrit Experts,

Is there a compatibility matrix for gerrit when installed with Postgres SQL Server.

We are on 2.15.6 and intending to upgrade to 3.0.9.
We are currently using Postgres and I would like to know if there is a compatibility Matrix for each version.

Like Postgress sql Version supported for 2.15.6
Like Postgress sql Version supported for 2.16
Like Postgress sql Version supported for 3.0
Like Postgress sql Version supported for 3.08

I checked the release and did not find anything in particular.

Also, is there a upgrade path that needs to be followed and upgrade instructions???

I just went through a whole lot of documentation which only states on the DB change -->From Review DB to Note DB is the change.
Our Gerrit Instance was alwayz on Postgres SQL so will we need any additional steps.

Is there relevant documentation that can be refereed????

Thank you,
Anish

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Shad Perwez

unread,
Jul 15, 2020, 12:35:10 PM7/15/20
to Repo and Gerrit Discussion
Okay guys, I have a question.

If we host a stand alone gerrit v3.0.9 on a production , will it be okay not to use external database like PostgresSQL.

Becuase , I did host a gerrit v3.0.9 with Postgress, It seems no data is being written in the Postgres.

Will It be okay to get rid of the external database Server. If Gerrit v3.xx not require it any more.

Thanks in advance


On Wednesday, 17 June 2020 13:32:11 UTC+5:30, lucamilanesio wrote:

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-d...@googlegroups.com.

Matthias Sohn

unread,
Jul 15, 2020, 12:49:59 PM7/15/20
to Shad Perwez, Repo and Gerrit Discussion
On Wed, Jul 15, 2020 at 6:35 PM Shad Perwez <tech....@gmail.com> wrote:
Okay guys, I have a question.

If we host a stand alone gerrit v3.0.9 on a production , will it be okay not to use external database like PostgresSQL.

Becuase , I did host a gerrit v3.0.9 with Postgress, It seems no data is being written in the Postgres.

Will It be okay to get rid of the external database Server. If Gerrit v3.xx not require it any more.

A database is still needed to store the reviewed flag which remembers the status of the flag shown
next to each modified file in the change detail UI. The default is to use h2 for this, other options are
postgresql, mysql and mariadb.

Since Gerrit 3.0 all other data is stored in git and fast search access is implemented via Lucene or ElasticSearch index.


-Matthias

ravirajk...@gmail.com

unread,
Jul 16, 2020, 3:31:35 AM7/16/20
to Repo and Gerrit Discussion

"A database is still needed to store the reviewed flag which remembers the status of the flag shown
next to each modified file in the change detail UI. The default is to use h2 for this, other options are
postgresql, mysql and mariadb."

I see default is to use h2. Is there any advantage in using external DBMS or h2 is fine.
Is the data stored in this DB needed even after the change is submitted or it has entries only when the changes are in review?
If it has to be stored for longer duration, is h2 recommended to be used?

Luca Milanesio

unread,
Jul 16, 2020, 10:09:45 AM7/16/20
to ravirajk...@gmail.com, Luca Milanesio, Repo and Gerrit Discussion

On 16 Jul 2020, at 08:31, ravirajk...@gmail.com <ravirajk...@gmail.com> wrote:


"A database is still needed to store the reviewed flag which remembers the status of the flag shown
next to each modified file in the change detail UI. The default is to use h2 for this, other options are
postgresql, mysql and mariadb."

I see default is to use h2. Is there any advantage in using external DBMS or h2 is fine.

You have to use an external DBMS if you want to share that information across nodes (e.g. HA configuration), OR if you have a substantial amount of data stored (e.g. millions of rows).
If none of the two apply, then it’s better to stick with the default H2.

HTH

Luca.

Is the data stored in this DB needed even after the change is submitted or it has entries only when the changes are in review?
If it has to be stored for longer duration, is h2 recommended to be used?

On Wednesday, 15 July 2020 at 22:19:59 UTC+5:30 Matthias Sohn wrote:
On Wed, Jul 15, 2020 at 6:35 PM Shad Perwez <tech....@gmail.com> wrote:
Okay guys, I have a question.

If we host a stand alone gerrit v3.0.9 on a production , will it be okay not to use external database like PostgresSQL.

Becuase , I did host a gerrit v3.0.9 with Postgress, It seems no data is being written in the Postgres.

Will It be okay to get rid of the external database Server. If Gerrit v3.xx not require it any more.

A database is still needed to store the reviewed flag which remembers the status of the flag shown
next to each modified file in the change detail UI. The default is to use h2 for this, other options are
postgresql, mysql and mariadb.

Since Gerrit 3.0 all other data is stored in git and fast search access is implemented via Lucene or ElasticSearch index.


-Matthias


More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/9b1f8282-406c-421b-8080-707731a1aad6n%40googlegroups.com.

Shad Perwez

unread,
Jul 16, 2020, 11:04:15 AM7/16/20
to Luca Milanesio, ravirajk...@gmail.com, Repo and Gerrit Discussion
Hi Luca,

So if we want to have an external DB instead of the native H2. so what should be the [database] parameter on gerrit.config

Mine is : gerrit.config

[database]
       type = postgresql
       hostname = rds-xxx.rds.amazonaws.com
       database = gitlfsxx
       username = gitlfsusrxx
       connectionPool = true

Note: even setting this up still we are getting 
                     ~/gerrit/db/account_patch_reviews.h2.db
                     ~/gerrit/db/ account_patch_reviews.lock.db

The external RDS not getting any data populated.

Note: This is a fresh installation of gerrit v 3.0.9 (EC2 + PstgresSQL RDS)

 


David Ostrovsky

unread,
Jul 16, 2020, 11:25:11 AM7/16/20
to Repo and Gerrit Discussion

Am Donnerstag, 16. Juli 2020 17:04:15 UTC+2 schrieb Shad Perwez:
Hi Luca,

So if we want to have an external DB instead of the native H2. so what should be the [database] parameter on gerrit.config

Wrong configuration option? Have you checked the documentation?
See accountPatchReviewDb section: [1] and migration site program: [2].

ravirajk...@gmail.com

unread,
Jul 17, 2020, 6:29:21 AM7/17/20
to Repo and Gerrit Discussion
Hi David,

is it possible to put the DB password in secure.config for this config item?

[accountPatchReviewDb] url = jdbc:postgresql://<host>:<port>/<db_name>?user=<user>&password=<password>  

David Ostrovsky

unread,
Jul 17, 2020, 10:07:24 AM7/17/20
to Repo and Gerrit Discussion

Am Freitag, 17. Juli 2020 12:29:21 UTC+2 schrieb ravirajk...@gmail.com:
Hi David,

is it possible to put the DB password in secure.config for this config item?

If you don't see this configuration option documented, it doesn't exist. You can
only specify the password option as part of the JDBC connection URL.

ravirajk...@gmail.com

unread,
Jul 18, 2020, 3:36:05 AM7/18/20
to Repo and Gerrit Discussion
Should it not be in line with other passwords too?
Could that be taken into consideration for the future versions?

Reply all
Reply to author
Forward
0 new messages