[MapServer-dev] Suggestion - downloading a map file from the database, atomic logs and etc.

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 24 04:10:58 PDT 2023


I think those changes are useful to the community (PostGIS is used so 
heavily by the MapServer community, and, more debugging help is always 

It would be great if you could create separate pull requests for these 
changes (each in their own pull request), against the 'main' branch at 

It would also be great if you could include an msautotest as part of 
each of your pull requests, to test that new feature automatically 
(follow steps at https://mapserver.org/development/tests/autotest.html ) 
  You can likely modify an existing test for some of your changes.



Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G

On 2023-07-24 7:42 a.m., Nikolay Sukhno via MapServer-dev wrote:
> Hello, sorry if i'm posting in the wrong place
> In our company, we have made some modifications to the mapserver, and 
> would like to offer this functionality.
> Will the community be interested in the following modifications?
> 1. The function of loading a mapfile from the database (we have it postgres)
> mappostgis.cpp::msPostGisLoadTextFileFromDb
> This is controlled by two config parameters, like
> MS_MAP_FROM_DB_CONN "host= port=5432 dbname=postgres_mapserv 
> user=*** password=***"
> MS_MAP_FROM_DB_SQL "select x.mapfile from mta_mapserv x where …"
> We did it because mapfiles are generated automatically. It is also 
> faster than reading from disk, and this is visibly on large mapfiles.
> 2. Atomic logging of the function msDebug. We have implemented through Mutex
> It helps a lot when testing, when several threads write to one file, the 
> lines are confused.
> 3. Logging the layer name for various errors.
> This helps us a lot to find errors in the mapfile in real user experience.

More information about the MapServer-dev mailing list