Hi Dominique

When we used jdbcconfig, we would first initialise the DB with one manual
execution (import=true) and then start up the cluster with a slightly
different configuration (import=false). Why aren't you doing this?

However, if you really need to start your cluster with import=true each
time, you can always tweak initdb.postgres.sql to first select/query and
then delete the tables i.e. you can modify the script as much as you want,
but I suspect the first solution is what you need.

Peter


On Tue, 15 Jul 2025, 20:43 Bessette-Halsema, Dominique E via
Geoserver-users, <geoserver-users@lists.sourceforge.net> wrote:

> Hello
>
>
>
> I am running across the following issue.
>
>
>
> Steps to reproduce:
>
>    1. Start up a geoserver with database clustering enabled
>       1. In the jdbcconfig.properties import=true, enabled=true, init
>       script= initdb.postgres.sql
>    2. GeoServer starts successfully
>    3. Stop the GeoServer, and delete the data directory
>    4. Recreate the data directory, restart GeoServer with the same setup
>    as step1
>
>
>
> Error:
>
> GeoServer does not start up successfully because there are duplicate id
> errors thrown since the cluster tables in the postgres database were not
> truncated.
>
>
>
> Question:  Is there a way to remove/truncate the tables automatically if a
> duplicate entry is detected?
>
>
>
> Thank you
>
>
>
> Dominique Bessette
>
> Senior Software Engineer
>
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to