Postgres mandatory?
NT6000
Posts: 15
Very new to Daz3d. Tried installing it yesterday and was surprised to find it trying to turn my PC into a database server. Unpleasantly surprised, to be precise. I was less than impressed to see that my computer now runs a bunch of Postgres services.
Is it critical that postgres be installed or is there any way around this? If it really is necessary (poor show), can I set it up to use a different postgres database and schema that I provide myself?
Comments
Probably not. Unless you're a very new computer user this can't be the first time you've had a program install a DB on your PC.
I think it is in fact the first piece of software I've ever installed that dragged with it a full install of Postgres/MySQL/et al. And I've installed plenty of software in my life. This wants to turn my machine into a full on database server. And I don't see any good reason that's necessary.
Though probably not quite as visibly. But considering that he accesses this site with probably a modern browser...
PostgreSQL will run (if nothing lse is using it) only while Daz Studio or Install Manager are running - it drives the Content Management System which is used by features in DS. You can omit it, you will just get a pop-up on launching DS, but it will have consequences and in future more featues may make use of it.
There are ways to "turn off" Postgres, but it will also disable some important features of DS, features that are especially designed to make the user experience better, especially new users. If you search for it, you can find out how (use Google to find it), but I would advise against it since you are a new user. Those that have done it are experienced users that understand the way DS accesses the data, and the file structure required for DS to operate properly.
With regard to Postgres, it is a highly efficient data base, has a relatively small memory footprint (one of the smallest), is extremely stable, and very secure. While I can understand the idea of having a database server running on your machine may be a little disconcerting, the reality is that it won't impact the performance or use of you computer much at all (i.e. not noticable), especially when DS isn't running (it only runs when DS is running). At the time DAZ implemented the use of Postgres, it was without a doubt the best free option (they migrated from Valentina DB - which did have some issues, Postgres has been much better). If you use smart content and/or connect to download your data, then Postgres is a must. It is also used for the search function in Content Library, Products and Categories, and I believe that Autofit needs it as well.
With regard to other programs not running a DB server, how many of those programs include a content asset management system like DS does? If any of them do, the chances are very good they include the use of some sort of data base management system. Some might include it in an unobtrusive way (i.e. they use a commercial solution that they can "hide" from the end user), or they use an online database server. All of Autodesk's products (Maya, AutoCad, Mudbox, etc.) now include services that run in the background all the time to ensure your "up to date ... and licensed to use the products". If you use Steam, then you also have services associated with Steam running in the background, and the same is true for Adobe subscription products. Unfortunately, this is just a part of the evolution of computers and software. The plus is with DS and Postgres, it's there to actually improve the end user experience (yes there are those that will argue this point, but the use of Postgres is really one of the things that improves the new user experience).
And from a technical pov you really have nothing to worry about when Postgres is running, because there's a reason why you don't get any firewall warnings:
This is from %appdata%\Daz 3D\cms\ContentCluster\postgresql.conf. Don't mind my manual edit, that has a different purpose. Instead focus on 'listen_address'. It is set to 'localhost' by default (127.0.0.1) which means that the service won't be listening for any incoming connections. Ergo: you don't have to worry about suddenly starting 'werid' services which provide a possible risk of abuse.
And other than what is already mentioned above (performance, low memory usage, etc.) there's something else to consider as well: data integrity and protection. PostgreSQL is a very solid environment and it would take effort to corrupt its data (not claiming it cannot happen, but psql is very good with its integrity checks).
Just for the record: Last year I was still running Daz Studio on a Win7/32 bit machine which is far from ideal. I've actually tried sessions where I'd stop the database in order to lessen memory consumption and well.. It's honestly as minimal as people claim above. Sure, it was noticable on my environment, but shutting it down didn't get me the increased performance that you might have expected.
I'd rather use a program which makes no secret about any backend services it's using rather than software which simply installs services in the background without you knowing (when was the last time you went over your Windows services list?).
I really doubt that.
As others have said above Psql is very light weight and in this case isn't taking outside connections. IKt's just handling persistent storage for DS. Many programs use a DB for this, many in fact use either psql or mysql for this precisely because they are robust, light weight and free.
I agree with the OP. It's overkill to install a full-blown, enterprise-grade database server just to keep track of a few bits of data about Daz content. There are other (free) alternatives better suited for a small, local, embedded database. The number of issues that come up regarding Postgres show it's not a great choice.
The fact it is configured to only accept connections from the local machine is good, but that's not really the point that's being made. Neither is it a question of how good Postgrs is at what it does, which is very good. It's like running a supercomputer to send your emails.
@ShelLuser - I am sure you know, but for anyone referring to it, in the snippet you posted, the listening_addresses setting is commented out. I think it should be uncommented (remove the # at the beginning of the line) to be sure connections are limited to localhost only; that way, you are not relying on whatever the behavior happens to be with the setting not specified.
I removed Postgres a.s.a.p. You lose Smart Content, which I never used anyway. You lose Daz Connect, which I never wanted. You get an irritating pop-up warning when you start DS, which I can live with. No issues with autofit. I never have to do any database admin.
I would also be interested in knowing whether it's possible to use a different postgres database and schema that I provide myself?
Okay then. List some common software I've probably installed that would include a full-blown database server in it. I'll be waiting with interest.
You have a funny definition of "lightweight." I've a pretty good idea of it's capabilities and it is waaay overkill for what I imagine it is doing here. I've used it professionally. This is an enterprise grade database server.
I had seen postgres services running whilst I thought Daz Studio was closed, but I cannot swear to it. I would have to check, so you may be right. I still do not like this.
I appreciate what you're saying but I'm still unconvinced because I don't see that its presence should be necessary in the first place.
Yes, Postgres is excellent. But it's capacity to preserve data integrity is immaterial to the fact I don't want it on my system in the first place.
I'm the sort of person who knows what postgres is and noticed it running in the background. So you can probably conclude that I look at my Windows services list quite often. ;)
Thanks. This is a helpful post. Smart Content is where the panel on the left shows only entities that are appropriate to the currently selected figure?
Well if Maya or AutoCad install a Postgres or MySQL database server then I might criticise them also if I used them, but do they? An update service is not equivalent to a full-blown database server running on your machine. Also, I can typically disable it (as in the case of your example Steam). And Adobe uses SQLite for its client-side data management. Adobe don't see the need to go beyond that and Adobe is frankly the King of Bloat.
What do you imagien it is doing? I'm not privy to the internal workings, but it is keeping a list of products and the files in products, plus dependencies and compatibilities, plus the stores products came from and the identifier used for the product in that store (so it can provide a URL - only daz is set up by default but others can be added). It may well be doing other stuff too.
Well based on replies here and an educated guess, I imagine it is checking what products you have installed work with what things you have selected. And probably plays some part in checking if there are new products / versions you own but which are not yet installed.
Apparently SQLite was tried in the intitial (internal) development and found to be inadequate for the task. Valentina was used as, despite not being free, it fulfilled the requirements - however, it proved in use to be prone to corruption of the database (which rather defeated the object of the exercise). PostgreSQL scores on both capability and reliability, and as a bonus is free and doesn't have to run as a service the way Valentina did.
SQLite was inadequate for the job? Now I am really fascinated about what they're doing! SQLite can't do some things (like it's no good as a multi-writer tool) but at what it can do it's very good.
Well, both DS and DIM (and Carrara, which I always forget in this context, as well as other things that were internal to Daz or works in prgtress we haven't seen yet) need access to the database so the multi-writer issue that may well have been a factor.
Edited to fill out list of things that had to interact with the database.
That is my understanding of Smart Content. I've never felt a need for it, given that products related to, for example, G3M are listed under G3M in the folder tree in the Content Library, but maybe I have underestimated its smartness. What you don't have, you often don't miss.
Okay. By multi-writer, I meant real concurrency. Lots of users making lots of concurrent writes. The sort of thing you need an enterprise level database. A few separate processes making sporadic writes to the database isn't in the same order of magnitude, not by a long shot. SQLite can handle that fine.
Windows 10 doesn't come with an enterprise database system running out of the box. Nor does Android. Nor does Chrome. I don't believe MacOS does. Firefox most certainly doesn't. I don't know much about Quickbooks but I've certainly never installed it. By Unity I'm guessing the game engine rather than the actual development environment? In which case again, it doesn't. Windows 10 does include SQLite by default and I believe Firefox uses it as well. Other browsers and Android probably the same. But none of what you've listed includes a full-blown database server except (for all I know), QuickBooks, which I've never installed. Though as I think it's a single-user accounting program and you were wrong about all the rest, I suspect this doesn't either. So, please do take a second stab at this: I was told it wouldn't be the first software I've installed that dragged in a full-blown database server unless I was (sarcasm) "new to computers". So please, I'm still waiting for an example.
Thanks. I'll see how I get along without Postgres installed. Appreciate the help.
No, you're wrong. Win10 installs Access which may not be enterprise grade but it sure is a DB server. The rest install some flavor of MySQL.
Which would suggest it may well not have been a factor - the use of "may" was intended to indicate that I was merely picking up on what you said, I don't know what Daz's reasons for not using SQLite were - only that they tested it and it was not an adequate solution.
An embedded DB server still is a fully functional DB server. Just because you don't see it doesn't mean it isn't there.
True, but I don't think there is a suggestion that it isn't. The argument is that having a fully-featured, enterprise grade database server installed to support DS is overkill. Like buying a Ferrari to drive to the corner store, and for only that. (And saying "Well, you already have a database server installed by some other software" doesn't negate that argument, it just means you now have two, at least one of which you didn't need.)
Ah, and if a tree falls in the forest... The fact you can't see it doesn't mean it is there either! A 'server' would indicate to me a running process waiting for connections from clients which it will then serve. Server processes that are hidden are usually up to no good.
There seems to be a lot of confusion about database engines.
A lot of programs use databases to persist their data, I'd say virtually all significant programs that do not revolve around some sort of discrete interchangeable file format and even those may use a DB for something. All those db's can accept inbound logins from users with the proper credentials. The programs get around this by only having one, sometimes two (an admin and a user), set of credentials for the db. The also usually are listening on ports that are not open through the firewall so no connections off localhost, that is the machine the db is running on, are accepted. Most, all that I'm aware, db's can also be configured to reject connections except from specific ip addy's or specific subnets. So again that can be set to localhost and again no connections off the machine get in.
Finally these db's usually get started when the program is started and shut down when the program itself shuts down. The only issue with that is companies who leave a listener app running all the time checking for updates that might mean the db stays up all the time.
But Mysql and Postgres while very nice db's and considered very capable are not Oracle or SQL Server. The difference in what is installed is not just vast it really cannot be compared. A machine doesn't really have Oracle installed and then get used for something else.
The footprint of these programs is tiny. Studio's PostgreSQL processes all add up to less than 10MB, at that size, does it really matter if I'm storing my mothers birthday and not the Amazon inventory?
While it's healthy to be sceptical, (and even a bit paranoid), it's better to secure your firewall or work in off-line mode than remove functionality.
edited for spelling.
Just to add a bit more coal onto the postre fire - How can I check that postres is actually working?
Three ways, start up DS and check task manager, should be several instances of it under processes.
Start up DS and not get an error message about not being able to find it.
Start up DS and get an error message about it, clear the error and check the Content Library tab, if "Products" and "Categories" have a little triangle next to them then the CMS is running. In this case the error is being caused by Connect not being able to find [the database]