If anybody wants to follow along and they can't see the slides, the slides are at that URL at the bottom. They're the exact same thing I'm looking at now, so they're available whenever. If anybody needs me to reference back to that slide to get the URL, just let me know. My name is Keith Fisk. I'm a database administrator at OmniTI. Some things I've been, I've mostly been working on a lot of third-party tools in the Postgres community, PG Apartman, some of the bigger ones I've worked on. I also did a PD extractor in Mimeo, which is another logical replication tool for Postgres. OmniTI is a work consulting firm. We specialize in very high-traffic websites and applications. People have like multi-terabytes of data, millions of users are very high-concurrency, so that's mostly what we specialize in. At the moment, we are hiring, we're looking for sysadmins and developers. As with any time you download software or need to get software and knowing where to go to get it is the most important part. Of course, postgresql.org slash download provides all the sources for being able to download Postgres, all the binary packages, all the source code. There's actually live CDs available for demoing as well and whole application suites that are there. The first way I'm going to go over is the way Debian does Postgres packaging. Of the three, I'm going to go over Debian, CentOS slash Red Hat and FreeBSD. I actually like, they deviate the most from traditional Postgres, but I actually also like their method the best because as far as the system administration standpoint, it's a lot easier. As of today, the latest version, Debian is 8.7. As with most of the default repositories and operating systems, the default OS package for Postgres is not the most current. Thankfully, it's not that old. It is 9.4, so it's much better than Debian used to be. They were stuck on 8.4 for quite a long time, well outside of its supported range. But for any Ubuntu-based or Debian, which is also Ubuntu-based distribution, it's highly recommended that you go to app.PostgreSQL.org, and I can click on that. Anytime you see something orange in here, it's actually an active link, so you can click on that and go to it. That takes you to the Postgres Wiki and has full installation instructions for how to actually do this. I'll go through a little bit of a demo later. That has all of the up-to-date packages, that actually has also out-of-date packages as well, so if you need to get older stuff, but it has everything all the way up to and including 9.6, and sometimes they get alpha and beta versions in there available as well. It all depends on how much effort the maintainers feel like putting into it. But this also includes a lot of third-party applications like PgAdmin, PgBouncer, PgPartman. So if you'd like to have packages installed to manage your third-party software, this repository is actually a really good place to go as well. So the naming convention for the packages pretty much goes like this. The one that has no special name to it is the server package. If you just need the client, like you don't need to run the whole server, there's an individual client package. So if you just need PSQL or PgDump or something like that on a server, you can just uninstall the client package. Wherever you install the server, I highly always recommend installing the Contrib module or the Contrib package. That includes, if you go to the Postgres URL source, that includes the third-party tools that are part of Postgres Core like DB Link and PgCrypto and all of those kind of tools. Those are all provided in that one package. So I always highly recommend installing that even if you don't need it at the time that you're installing it. I can almost guarantee you will need it at some point, so just plan that from the beginning. If you need to do any compilation of any other third-party packages where actually development, the source code is available as a package for dev. So that's required for doing any compiling. If you want to compile PgPartman or PgBouncer or something like that yourself, you need that documentation as self-explanatory. The last two are unique to Debian. Common is, I'll get into a little bit later, they have a bunch of wrapper scripts that go around a lot of the binaries that come with Postgres and that's all contained in the common package. And libpq is also its own library if you're doing any C development in Postgres. Those are actually tied to, and I'll get to a little bit later too, there's default packages. Both common, you see common and libpq 5 don't actually have a version number associated with them. They are associated usually by default with whatever the latest version of the package you have installed. So if you installed 9.6, common and libpq are associated with 9.6. If 9.5 is the latest one, if you have 9.5 and 9.6, by default it's associated with 9.6. There's ways to control that as well. When you install the main package, server package for Debian, it does set up a default cluster for you. It runs in it DB for you, sets up a service and starts it up and you're all up and running just by installing that one package. So it's very easy to use. As I said, for common and libpq they're associated with a specific version. If you, if for some reason you need a specific version like you, you want to install 9.6 as you want to test for upgrading, but you need the 9.5 version of libpq or common. You can, this is something you can actually do for any package in Debian or Ubuntu. You can pin the versions.  And it follows this basic pattern. So any, any package that starts with postgresql.star and libpq and libpqdev, I want to stay, I want this package to stay it on postgres 9.4.6. It actually pins it to the minor version. So if you need to do that, that's a very easy way to do that. We actually had a client that had some custom libpq code that I think it was the 9.3 binary for some reason broke their 9.1 libpq code. So they had to do this. File locations, I actually, one of the main reasons I wrote, did this talk was for reference for myself. This slide is one of those references for myself of where you can actually find the default locations, mostly the binaries, as we'll get to later when I show you the wrapper scripts. You can, the wrapper scripts are all in user slash bin, but if you actually need the real PGCTL or something like that, this is where it's actually located at. They do have a different major version number. So if you have 9.4, 9.5, and 9.6 are installed at the same time, they all go in their same, in their own folder. So you can have them all installed at the same time. This, this folder is actually pretty important. If you ever install extensions, and you need to know where to put the files yourself, that is the folder where that would go. And for config file, normally by default, in like the default Postgres install, the config files are in the data directory. Debian is very strict on their file hierarchy. They want all config files in the etsy folder. So they have all of these files located in the etsy folder with the 9.6 and then a cluster name, which I'll show you later. As well, the log files are usually in the data directory, on Debian, they're in var.log, or var slash log. So to have the service automatically start up, there is a very simple file. It's located in this directory, sorry, this directory, the etsy Postgres.com directory. There is a start.comp file. There's only one value you have to put in there. Auto will automatically start the service when the server starts. Manual lets you still use the wrapper scripts to start the cluster, but does not automatically start the cluster when the server starts. And disabled, disables the wrapper scripts from working and disables it from starting. You can still manually start the server yourself if you know how to with PGCTL and that kind of stuff, but it stops the services and stuff from being able to start the cluster. Default access for the database. There's a system user called Postgres, as well as a role in the database called Postgres, which is the super user. This is the default pghba.conf right here. Basically what this means is only local system users can log in via socket with no password. And you have to have a matching role in the database to your system user, that's what peer means. So if you're the Postgres user, you can log into the Postgres database without a password. If you're your user, you cannot log into the Postgres database without a password. And for all other new roles via TCP, it requires a password. So for any external connections, you need a password. And by default, it does not allow remote connections into the database. By default, it only allows local connections. If you've seen news recently about how MongoDB installations and some other database, their default configuration leaves them open to the world. Postgres' default configuration is not to be open to the world. And this, that last one in the Postgresql.conf is how it does that. By default, when it's either commented out or the default value is local host, so only local network and socket connections are allowed. So this is the specialty thing with Debian as it has these wrapper scripts. So the create cluster is pretty much a replacement for initDB. It automatically creates new data directories, automatically picks the next available port available and sets up a new cluster for you, starts it up, sets the services up, and everything's all up and running with that one command. Easily supports multiple major versions and multiple minor, multiple clusters on the same minor version as well. This is just basically a replacement for pgctl to, and I'll show you a little bit later the command line options for it. There is a wrapper for upgrading and I highly recommend not using it, especially if you've never run pgupgrade. Because if everything, if it works and it just works, it's fine. If it doesn't work and you've never done pgupgrade and you don't know how pgupgrade works, you have no idea what it did and you have no idea what went wrong. It's good to use if you know what it does and how to debug things. If you've never done it, I don't recommend using it at all. So my recommendation is to use pgcreatecluster to create your new clusters and then manually edit ports and all that kind of stuff around it to do your pgupgrading. LSClusters just basically lists all the clusters that the wrapper scripts are managing for you.  So actually let me do switch out here and do a little bit of a demo here to show how it works. So this is a, we can see that, this is a clean Debian install. So if you actually look for, you can see the latest version of Postgres available is all nine four and there's not really too much else Postgres server related. So if we go over here, basically they give you this nice little command right here to add the repo to your system pretty easily. So that just basically made this pgdl list and so I've added the app repo for you there. Okay, there we go. So now if we look at Postgres packages now you can see there's a whole bunch of other stuff available now. Goes all the way back to eight dot four for packages that are available. So if we go ahead and install, thankfully Wi-Fi's cooperating today. You can see now it's setting up a cluster for you. Do change to the Postgres user. So if I try to log into the Postgres line out myself to the database says I don't have a role named Keith in the database, it won't let me log in. If I try to log in as the Postgres user, peer authentication failed because that's the default that set up, you have to have the same, you have to be that user to log in as that user. So I have 962 up and running just with a single package install. And so if you do a pgls clusters, see this is how the cluster management works. It has the major version number than the name of the cluster's main port 532. So if I do, let's see, pg6, I call it test. Now we have a new cluster. So it should start up by itself eventually. But now you can see it automatically picked the next port and you have a new one up and running. If you set that install and go back to the talk here. So one of the other things you can do, and this is pretty much in general for any package that Demi manages that has a system called update alternatives. So if you see that the psql is actually a wrapper script that's actually, if you install 9.5, 9.6 and 10 all at the same time, psql will automatically always be with the latest version associated with the latest version of Postgres. So this is a way you can manage it with this update alternatives command. If you do this get selections, you can see that there's two alternatives that Demi manages for you. This first one is basically the server and stuff and this pgsql is all like the commands like pgjump and itdb and all those commands are all managed by that alternative. So if you wanted to see what, if you had 9.6 and 9.5 installed and you wanted to see what was available for the psql alternative, you can see there's 9.5 and 9.6 are both there available to you. If you actually want to see what they manage, you can give a display and it'll show you everything that it actually manages. So if you actually want to change this, you can use the config option and then give it the alternative you want to change. So there's options. You can actually pick the one that starred is the current one and is also, there's also one that's always set to automatic. So to automatically always choose the latest. That's the one that's automatically chosen. So it goes by these priority lists. So it just uses the psql version as a priority. So it's easier to see what it is. 9.6 is a higher number than 9.5. So that's the one that's automatically picked when you install the new version. If you want to go change 9.5 if you want to, you can just use selection one and change those as needed. So you can see it automatically set up a 9.5 cluster for us, also called main. So as long as the major version is different, you can have the same name on these. Managing multiple databases on Debian is very, very easy because of this. It does abstract a lot of things for you that you don't have to manage on your own anymore. But once you are familiar with how all that stuff works, it makes managing all this stuff easier. Makes doing upgrades a lot easier. Makes getting test instances up and running very, very easy. Good old system D. So the PGCTL cluster actually redirects to the system control for the control cluster for actually starting and stopping your instances. Actually redirects to using system D CTL. So system D is actually aware of starting and stopping the services. Make sure you are on the latest version of Debian if you need to use system D with Postgres. The early versions of Debian 8, system D was not aware of Postgres services. So if you stopped a cluster without system D, system D still thought it was running. If you started the cluster without system D, system D had no idea that it was running. And it caused all kinds of confusion and trying to actually get it, tell it to start and stop the right way was confusing, especially before 9.6. When the default for the, if you ever do a stop command for PGCTL, the default used to be a smart shutdown which would wait for all connections to start to disconnect before it would actually shut down the database. When system D was not aware of that and there was no way to tell system D to shut down the Postgres with the fast option which forces all things to disconnect. So if you ever tried to use system D to shut down Postgres, it would never shut down if you had an active connection. It was not fun to manage.  They fixed it all with the latest versions of Debian. They've gotten system D integrated with the wrapper scripts and the Postgres services. So if you have to do this, just highly recommend you're on this latest version of Debian. Any questions about Debian or Ubuntu Postgres management? Next, I'm gonna talk about CentOS. I know the latest version of CentOS is actually seven but I actually, I haven't run CentOS seven with any clients so I'm not quite as familiar with it and seven actually now uses system D as well. So I don't know of all the idiosyncrasies but I still have a lot of clients on six and I think a lot of other people I have talked to were still on six. So that's pretty much what, the way this is presented is for CentOS six. Obviously things will change for seven. One thing I don't think it changed was seven and I think eight four is still the default package. So you definitely do not want to be using the OS provided package for on CentOS systems. Just like Debian, there is a Postgres community that maintains repositories for them. So it's not quite like the Debian one where there's just one repo. You've installed one repo and they're all available to you. There is actually a specific repo for each major version as you can see here and for each different version of Red Hat or CentOS. So you just have to make sure you grab the right one for that and also they include some similar third party tools the same way the app repo does. So if you need like PG Bouncer and PostGIS and all that kind of stuff this is a great way to get the packages for that. So this is actually the opposite of Debian. The client package is the one without the special name on there. So if you actually need the server you have to install the server package. If you just need the client do the one without the name. The server one does install the client. Same, there's a contrived package the same way. And the development package for compiling yourself. It does not have separate packages for libpq. I believe those are included in the server. You know the server or the development package. I don't remember. And there are no wrapper scripts for CentOS you're just pretty much, there is one, I'm sorry, I'll get to that later. There's no cluster management wrapper scripts like there is for Debian. There are still wrapper scripts for doing managing multiple versions. So default instance is not created upon installation. So you have to actually do that yourself. But a service is set up for it. So and the service actually has an NADB command for it. So using the service to initialize a cluster will install the default system for you in the default locations. But this only manages one instance for that major version. If you need to do multiple instances, I'll get to that a little bit later. So if you need to do additional instances you have to use the normal NADB binary yourself to make more instances. There's nothing to manage it for you like there was in Debian. So data directories, mostly similar. Data directory has its own major version. The config files are located in the data directory unlike Debian. So this is the default. As well as the log files are also in the data directory which is usually the default if you're compiling from source. One thing that throws people off though is there is a separate startup log if you use the service. So if your server doesn't start it's usually not gonna be in the Postgres log because the service command redirects the things before the database actually starts to this startup log. So if it doesn't start you have to go look at that log file and not in the PG log data folder in your data directory.  This is pretty similar to CentOS as far as the defaults. Ident and peer in practice do the same thing. You have to have the same system user as the database user to log into the database. But it also if you, getting into what an IDENT server is is beyond this talk. But this also allows you to use an IDENT server to log in as well. The thing is for default TCP connections is to contact the IDENT server so it's not using a password authentication by default for remote connections either. So you have to add that in. But thankfully the default is to still not allow remote connections in by default. So you have to change that. There's an update alternatives on CentOS just like there is on Debian. It's got slightly different command line options. You can see all of the alternatives that are available. So if you go to our level alternatives on CentOS you can see there's actually many things it manages. But you can see that each binary has its own individual alternative. So unlike with Debian where you just update the PSQL alternative package to update all the binaries. If you need to update the default version binaries on CentOS you have to do it for each individual command like PSQL, PGDOM, NetDB. All of those are all alternatives. So you kind of have to, it's a little bit more of a pain to manage but it's more customizable. One thing that's also a little bit different too is when you run the config command there's no option to choose the automatic one. In the config you actually have to pass the dash dash auto command to have it automatically pick whatever the highest priority alternative is. In this case it's nine five and nine six. So the star is the current selection and the plus is what auto is set to. So since there's no cluster management scripts there's no simple way to have multiple versions or multiple clusters running on CentOS like there was with Debian. But it's not actually not that bad. You basically just, well prior to 9.0 there actually was no way to do this because the packages all install the binaries all to the same place. There was no major version folder for the binaries. So you could not have multiple major versions prior to Postgres 9.0 on any CentOS. But as of 9.0 every package goes into its own major version folder. But so to make multiple services it's basically just making a copy of the entity file. So if you could call up Postgres QL dash nine six main nine six tests just name it whatever you want. And these are, there's quite a lot more in the file than just these things but these are the main things that and it's kind of hard to see here. See, I can't make it any bigger unfortunately. But the main one are like the data directory the PG data directory the PG log directory. You can customize where it's putting the PID files. The other, the one thing that throws people off and it threw me off for a while too is if you scroll down in the service script there is this overrides section. And I guess it's been like a standard thing in CentOS and Red Hat to you have the service file that pretty much controls most of it but then there's this override which overrides the data directory in the port. So you can set the port and the data directory in the config file but then if you look down further there's this override and if that exists it overrides whatever you put there. Also if you set the port here this overrides whatever port you set in the Postgres QL.com file. So things to be aware of that you go and change the port in your Postgres QL.com and it doesn't change anything when you start and stop the service. That's because the service is the one that's actually defining the port. So just look over the service script carefully and make sure it's doing what you want. You don't have to do this override but it is there in almost every service file on CentOS that I've seen. So it's all depending on whether somebody actually decides they wanna use it or not. That's it for CentOS. Run a little bit short on time so I'm gonna skip the demos unless people really wanna see them. Oh yeah, sure. If you compile from source yourself. No. No. And actually I actually do go over compiling from source at the end for a little bit but the source does come with some example in its scripts for you but it doesn't automatically install them. If you use a compile from source you pretty much you're telling it where the binaries go and you're responsible for setting up the service and stuff yourself. Yeah, yeah. Yep, sure, nope. Yeah, yeah, yeah. Honestly, and if you're doing this for production systems I recommend just going with the package if you can. It's because they make their own, there's repositories that keep the most recent versions out pretty much and keep them up to date. For production systems where you need to keep things consistent there's honestly no reason not to use the package. That's a bit beyond me. I don't know if you can customize where the package is putting things. So, they're, I think so. I don't really know the ins and outs of how you can tell Yum the word to put things but maybe. But yeah, if you have to put it in your own custom place there's no way around that. Yeah. So I don't actually run FreeBSD for any clients. I just, I run FreeBSD myself for my own servers. So I figured I'd look in to see how Postgres manages FreeBSD and share that with people as well. So on FreeBSD there's two ways to install software. PKG is like pretty much the way Yum and Apget are on the other, on Debian and CentOS. But FreeBSD also has the port system which custom compiles the software during ad installation kind of like Gen2 and that kind of stuff. Actually I prefer using ports myself just because it kept up, kept more up to date. As this example shows FreeBSD 11 is actually the most recent version but back on 10.3 package still only has 9.5 as the latest available version. But if you install from ports on any version of FreeBSD 9.6 is available. Actually they may even make 10 available in development for some, on some port trees. But either way package or port, the installation result is the same. So either way you do it, thankfully it's consistently the same for both. Four simple packages, server, client, contriven, docs. There's not anything more than that. Most of the extra stuff you see on the other operating systems is either in call put in server or client. So kind of have to look and see what you need. Most of the time I just install both the server and client and then I have everything I need. Does not create a default cluster on installation by default so just like CentOS. And there's a service system or FreeBSD revolves around this rfc.com file in Etsy. There's also one in user local Etsy to for most custom things. And each software package has its own thing that'll tell you as part of the setup of how to actually start the service using FreeBSD. And for PostgreSQL you add this command to the rfc.com and that automatically starts any PostgreSQL services you have defined. The package does have a, the service command does have an NITDB just like CentOS did. And that'll make things in the default locations which I'll show you in a second and you can pretty much start and stop the service like you would normally on any system. So one nice thing about the first, the first time I did this talk was actually or actually second time I did this talk was in at PGCon and thankfully if you know who Dan Langwell is he's a big BSD guy. He's one of the people that came to my talk and realized how bad Postgres package management is on FreeBSD. You cannot install multiple, and you still can't. You cannot install multiple major versions of the packages at the same time. Ports are packaged, it just doesn't work. But at least they're getting there. So as of nine six, like before that it used to be just be, there's one data directory. Now it actually defines a nine six data directory. Things still aren't fixed as far as the binaries and stuff, it still all puts them in the same location. So still working on getting things fixed. The one thing that I don't like about it is it defaults to doing syslog. If you use this login, that's your preferred logging method, that's fine, but most people don't. So it's recommended to go in and change the default logging directory to scder, you can look in the Postgresql.com for what that means, but that just basically allows you to define where the logging is done yourself. The default users in access, this is actually, if you compile Postgres from source, this is the default hba.conf you get. So all local users, socket and TCP, are able to log into the database without a password, no matter what, to all databases. So but that is a default, okay, thank you. That is a default for Postgres, source and compile as well. So it's not unusual for that to be, but it's still only allowing local connections. So as long as your system's not compromised, allowing anybody to locally log into the database usually isn't a bad thing. But it is good to be aware of this, if it's a multi-user system that you don't want everybody logging into the database, you definitely want to go in and change this. So multiple major and minor version packages are not supported at the same, oh actually that was one of the things they did too. So prior to 9.6, the system user was pgsql, which really confused a lot of people because it's the only system that doesn't have Postgres as a system user. So and basically whatever user initializes the database, so if my username's Keith, if I do an intdb, the role that's created in that cluster is your system username. So the other ones, the Postgres system user is the one that initializes the database, so there's a Postgres role in the database. For EBSD, the role is called pgsql, so the default role in the database is pgsql. So they're actually changed that in 9.6, so the default system user is now Postgres and the default role is now Postgres. So thankfully I'm starting to make things more consistent. So using, as I said, you can't have multiple major versions installed and because of that, the only officially supported way to do upgrades in FreeBSD is to pgdump, shut down the database, install the new package which uninstalls your old package so you no longer have it available and then start out the new cluster. So if things don't go right, you're kind of in a bit of a bind there. So the easiest way to do it on FreeBSD now is to actually just install the source yourself to some custom location, mainly create the new data directory structure, run pgupgrade yourself and then install the new packages. So that way you can, at least, you still have your old cluster, you can go back to it, nothing's overwritten, you can go roll back if you need to. So for right now, if you run FreeBSD, I would actually recommend and you need multiple clusters or if you need to be able to easily do upgrades, you can't have a lot of downtime for upgrades, I recommend not using the packages, like you're saying, install from source and just manage it yourself for FreeBSD at this time until they get multiple major version support included. As I said, and actually, if you're using the packages, like I said, there's an initdbservice command. Actually, I have to update this, this is not true as of 9.6 anymore, then it doesn't create a version data directory as of 9.6, it actually does do that now. There actually are, if you decide to have the data directory in a different location or the binaries are in a different location, that rc.com file where you defined to start up the service, there's this file in most FreeBSD ports, if you go into the ports tree and look at this, there's this .in file, it'll have different options that you can put in the rc.conf that are available for that package, so for Postgres you can define in rc.conf where the data directory is, any special flags you always want to pass to the CTL command and any other initdb flags you always want to send, but rc.conf does not support multiple cluster definitions, so you can't define the data directory more than one data directory here, there's no way to do that via rc.conf, so if you have to run multiple clusters, but there is still a way to run multiple instances on FreeBSD and it's pretty much the same way for CentOS did. You make a copy of, so the service command, the service looks in a local, user local at CD, rc.d for a service file, all you do is make a copy of that file, it starts up every file it finds in that rc.d service folder, so if you have multiple clusters defined there, the service system will automatically start them up for you, so it is possible to run multiple clusters, just takes more effort just the way CentOS currently does right now, and there's a bit beyond this talk right now too, but a lot of people actually also use just run Postgres in a JL and then you can run as many as you want on as many different JLs as you want on the same system. They're all kind of, their own little independent systems. Any questions about FreeBSD? All right, lastly, compiling from source, so if none of the packages options work out for you, Postgres compiling from source is actually one of the most easiest packages to, software packages to compile from source that I've come across, so actually if you're comfortable with doing this, I don't see any reason not to, but if you have to manage many, many systems and keep them all consistent, obviously the packages are much more easy to do that with, but if you have to compile from source, Debian just requires these three packages. Build Essential basically puts all the, all the compilers and everything installed for you, and then Postgres itself needs Reline and Zlib. For CentOS, there's this group install called Development Tools, which is the same thing as Build Essential that installs all your basic compilers and all that kind of stuff for you, and again, it also needs Reline and Zlib. FreeBSD, the only thing, the only package that I needed to install that wasn't there was Gmake, because you need GNUmake for Postgres, you can't use the make that BSD comes with, so that's the only thing that was required on FreeBSD, and if you're actually pulling things from the source Git repo, you'll see these warnings about needing Bison and Flex, I think it's for like a document compilation and stuff like that, so you don't need the development packages for that, you just need the normal Bison and Flex packages if you're doing the Git repo. Some useful compilation options. I always recommend this first one. It's not there, but it's not on by default. The distribution packages and stuff usually have all of these set already, so you don't have to go and go back and recompile them to get these options, but if you're compiling from source yourself, these are not by default. Postgres does not compile with OpenSSL, so if you need that, definitely turn that flag on, and if you need any other authentication mechanisms, they actually have their own compile flag that you have to set. There's three languages that come with Postgres, as far as external languages, Perl, Python, and Tickle, so if you need any of those, you get to set that flag. If you're doing development on Postgres, I highly recommend setting both debug and assert, especially debug, because if you come across a problem and you have to talk to hackers, they won't even help you if you have no debug output, so I highly recommend turning that one on. And then to actually compile and make it, there's the special flag to make called World that actually, if you just do make, that compiles none of the contrib modules, and you can go back and compile each contrib module you need on an individual basis if you want, but I find it's just easier if you give it World. It compiles all the contrib modules for you automatically, or you can just go straight to make, there's install-world that compiles it and installs all the contrib modules for you in one step. The Postgres source does come with some sample service startup scripts for most operating systems. I actually don't recommend using those though. What I would recommend is installing the package and use the service script that the package makes, because it's much more extensive, and these are not really tailored to keep up with new operating system options that are available in services and that kind of stuff. They do their best to keep up with it, but that's not their primary job, that she was the job of the operating system maintainer, so I'd recommend looking at the startup scripts that the package is installed and use those versus using these that come with the source. And you can configure where the binaries are installed. I recommend doing just the major version, so I usually install the opt, is where I usually install custom software locations. If you do it for each minor version, you run into the problem that your extension source is not, like if you use other third party extensions, those are located in that binary installation directory, so if you have each minor version going into its own folder, whenever you upgrade a new minor version, your extension libraries and files are no longer available in that new folder, but if you install them, if you install the new minor versions, just overwrite the current location, which is the major version number, which right now is like the first two numbers, but as a 10, there'll just be one version number, so. And then from there, you can just do a, like if you want to just, like if you set your path to always look at the latest, so you have PSQL in your path so you don't have to do the full thing, you can just do a sim link for like, this is a PostgresQL95, then you can just point your sim link to opt slash PSQL slash bin, and then whenever you update the Postgres to the new major version, update the sim link. Data directory should also be versioned, so you can easily do PG upgrade and have a 95 directory, then a 96 directory, you can have the cluster in the one, but the thing with that is, do not have that major version on a different mount point, so you can have, thank you, you can have like the PG data directory, that be a mount point, but then make folders for 95 and 96, don't make them their own mount points, because then PG upgrade, there's a link option to PG upgrade that allows it to do hard links and significantly speed up your database upgrade, like I did a one terabyte upgrade in 45 seconds using the link option, but it has to be on the same mount point, you can't do link across mount points, so that's just a tip for when you're making your own custom data directory, just have the major version number be a folder and not a mount point, that's it. Go back to the beginning here, I'll give you the way where these slides are located. Any questions? Yeah, yeah. So for upgrade, what is the best way to upgrade, so like having use for this, and PG dump sort of thing? I mean, if you have the time for a PG dump and restore, that is always the best way to do an upgrade, in my opinion, but most people don't have that time for an outage, so like I said, make sure the current data directory and the new data directory are on the same mount point and then just use PG upgrade to go from one to the other and then you can use the link option and keep things going pretty, excuse me, keep things going pretty quick. I will say that upgrade did only take 45 seconds, but when you do a PG upgrade, the statistics are not up to date on the new cluster, so you have to run an analyze on the new cluster for it's actually useful, that took another hour after that, so upgrade's not quite as fast as it could be, but even if you do a PG dump, you still have to do the analyze anyway, so yeah, sure.


This study found that a beauty program had positive effects on the self-perceptions of aging and depression among older adults living in an agricultural area in Taiwan. After the program, the participants' perceptions of aging increased and their levels of depression decreased. Additionally, the participants reported improvements in their body image and willingness to maintain their appearance. This article was authored by Yiling Wu and Sean Root-Shell.


Ahoy-Hoy, and welcome to the channel. I'm Dr. Smerian, not a real doctor, and today we're going to talk about the competition that we have set down for ourselves to resolve. Who will win in a fight between Superman and SCP-682? Let's get started. So first of all we have to set our parameters for our fight. I think what we're going to certainly do is have this be a physical confrontation between the two, because Superman is in some incarnations known for his intellect, but 682, and 682 is known for having a fairly impressive intellect in some of the stories that feature him. But in general, this isn't going to be a fight that's, this isn't going to be a fight of what's the word I'm looking for here. It's not going to be a battle of wits. It's going to be a battle of strength, which already gives a slight advantage to 682, because Superman's core ethos, if you're not talking about the films, but Superman's core ethos in most media is that his first, the very first thing he wants to do is redeem whoever or whatever it is he's dealing with. It's not always followed in every media, but it is, we're going to have to amalgamate here. So what we'll do is we'll take a look at Superman first and see what kind of, what version of Superman we're talking about. So Silver Age Superman was unstoppably powerful. This is after Action Comics 1, but like way a little bit later as it got really well established. I mean, we're talking about a character who could push planets out of orbit. Our Superman for this fight is not going to be that powerful. Our Superman for this fight is going to be modern Superman. So very, very, very, very strong heat vision, ice breath, and very, very, very close to invulnerable and flight. Those are the main things we'll be dealing with here. None, no super mimicry or super puppeteering like Silver Age Superman had every power you could possibly imagine if you looked hard enough. So flight, super strength, super speed, ice breath, laser beam eyes, super hearing, that kind of stuff. All right. So now we've settled on which Superman we're dealing with. It becomes pretty easy to do that, because again, it's just the baseline. You would think it would be easy to deal with what 682 we're dealing with, right? Just use the one from the Wiki. But unfortunately, the version of 682 that a lot of people have in their heads is different 682 than most people, but not most people that some other people use. So for me, 682 is mostly, not exclusively, but mostly what you find in just the article, not the termination log. The termination log has been expanded long after the actual article was written. So what is contained in it can't really be said to fully be representative of what the author was intending in the beginning. We can talk all about how authorial intent doesn't matter here. But for what we're talking about, we need to define what 682 can and can't do. 682, and when linking out to the termination log, the hard to kill reptile, not impossible to kill reptile, by the way, it's actually called the hard to kill reptile on the English Wiki at the very least. The hard to kill reptile in its article is defined as having fairly limited regeneration and adaptive powers. It talks about how it can filter in liquids and use those to regenerate, but mostly outside of that it can't regenerate. However, most iterations of 682 and the collaboration log itself tend to lend itself to the idea that it can just regenerate from anything. And here we can come down to something interesting. So you want to pit this highly adaptive creature against Superman. Well, there's a one-to-one for that, right? Doomsday versus Superman. This has already happened in a fight. And Doomsday killed Superman and Superman killed Doomsday at the same time. They killed each other. However, I don't think Doomsday, and a lot of people will use this as an example. There's even been, I think, a video that was Doomsday versus 682 as though it is a one-to-one example, like 682 and Doomsday are the same thing. They are so totally not. First of all, Doomsday's adaptation is very, very limited. Oh, that's complicated. The effects of its adaptation are not very limited. However, its ability to trigger its adaptation is limited. There have been comics, and this is the problem within consistencies of characters. And we're not going to get it too much into Doomsday here because he's not applicable to this. But the point is, in some comics you can find Doomsday has adapts mid-battle, but most portrayals of him show that he has to die first to something, and then when he comes back to life and regenerates, he is now adapted to that thing. That's not how 682 works. 682 adapts on the fly. When he is pitched to get pitted against 173, for example, he just grows extra eye stalks immediately. And in almost a sense that he doesn't even understand why or how it's happening, just that it works. We could talk about 682 having hyperintelligence and just immediately being like, aha, every time I close my eyes, this thing moves and tries to break my neck. I should grow extra eyes that don't close. Or every time I look away, it's a problem. So let's create something on a swivel that never looks away. There is a superhero that does that, but it's not a DC superhero. It's a Marvel superhero and it's actually an X-man called Darwin. Darwin is literally adapts to anything that is thrown at him. His body automatically evolves. It's not really what he does, but automatically adapts to anything thrown at him. And this has resulted in, you know, Darwin being able to beat many, many much more powerful things. But generally, you can only get like one power at a time, weirdly enough. I think 682 would be a good, an amalgamation of characters from Marvel would probably do the trick. So strength on par with, say, Spider-Man, a regeneration factor on par with Wolverine, which is very, very strong. And then an adaptation ability on par with Darwin. Put those together and you've got roughly what 682 is. Put all that together into a reptile and you'll get basically what 682 is. But here's the thing. The closest one-to-one comparison you can get for Superman in the Marvel universe, well, that's not technically true. There are closer parallels, but the most recognizable one that I won't have to explain to you, like I could explain to you Sentry, or a couple other very, very powerful superheroes that are basically Superman versions. The closest one that most of the audience will recognize without me having to explain it is the Hulk. The Hulk is super strong, super powerful, okay? And most of what Superman is going to do here is going to be punching, because I'm going to tell you his laser eyes are probably going to work once and then it's going to immediately reflect it back anytime it's a problem. His cold breath probably won't be enough to freeze him all the way through and he'll adapt again before that happens and so on and so forth. The only thing that Superman really has going for him is his ability to lift him up and fly him away and probably punch him to death. So what does Darwin do when he encounters the Hulk? And there we come to a problem. And when we talk about the relative power levels here, 682 and Darwin can adapt to anything and almost instantaneously. Darwin's first thing is to try and absorb the gamma radiation, his body adapts to be able to do that, of the Hulk. That is not applicable here. Although you could say if they're just adapt without knowledge, without knowledge necessary, then either one of them could just adapt to have a chunk of kryptonite.  We'll say that can't happen. So what does Darwin do? Well when the gamma radiation absorption doesn't work, which wouldn't apply to Superman anyway, his body develops the ability to teleport and then forcibly teleports him away from the battle. That's it. That's what he does. He runs. He doesn't run, his body literally runs him away and says, the best way to survive this is not to grow super strong and try and fight back.   And this is the problem. If you pit 682 against Superman, I will charitably say, and this is being very charitable, because if you look at the original article, none of this is technically applicable. We have to expand our scope to make 682 powerful enough for this to even work as a battle. But if you do that, and you've got a 682 that is somehow able to survive this encounter, what you have essentially is one option, run, and run fast enough that he can't find you. And that's, I think, the conclusion here, to be honest with you. I think that is it. That's how 682 versus Superman works out. Superman is too strong. He's too fast. He's got too many available powers for ranged attacks that would, if not incapacitate, temporarily incapacitate 682. However, and this is important, it wouldn't happen immediately because once Superman realized that 682 was a sentient, living, breathing, thinking entity, which wouldn't take too long because of the insults, he would not try to kill him. And that may be worse for him, or maybe worse for 682. I don't know. But he wouldn't try to kill him because that's not 682's, that's not 682. That's not Superman style. Superman doesn't do that. At first, when he killed Doomsday, it was after a long period of time of realizing that, one, there was no other option, and two, the thing he was fighting was essentially a mindless beast. He blows up robots. He does fight monsters that are unthinking, and he has killed them in the past. But once Superman understands that something is a thinking, breathing, intellect, he will try to reason with it, and he will try to see if he can salvage them somehow. And this is the opportunity that 682 might have to actually get in some punches at least. I say punches, but in this case probably bites and claw attacks. And depending, they may be strong enough. Here's the other half of this. And this is something that I had to decide on when I first talked about this. Is the source of 682's power magical in nature? Big important question here, because if it is, then Superman will probably die. Probably die, not necessarily die. Superman has fought things before that can hit him with magical attacks and survived.  Magic hurts him just as much as it hurts you or me. So if 682's source of power is magical, he can do way, way more damage in those opening salvos while Superman is trying his best to reason with him. That's the other thing. What if 682 doesn't speak and just mindlessly attacks? He looks like a monster. He must be a mindless monster. These are the questions we have to ask. And this is where we settle on our final scenario. We're going to set our battleground on the outskirts of his SCP Foundation site. The SCP 682 has just escaped and he is making his way to the nearest populated city to kill as many people as possible because he hates all living creatures. And the SCP Foundation secret up to this point finally just realizes that they have reached the Godzilla threshold and they call in Superman. And Superman comes down faster than a speeding bullet flying as quickly as he can to the location and gets there just before he gets to a populated city.  And he realizes that this thing is a thinking creature and so he stops and he might still stay out of range but he will try to reason with it. And at this is the point where 682 may be able to get in some good licks. If they're magical he can dig deep and do some real damage but if they're non-magical he's not going to be able to do anything during this time period. And if 682 is 682 he'll eventually realize he can't do anything to this guy but he can do tons to those people down the road and keep moving towards the city. At which point Superman will have to make a choice, engage fully, incapacitate, attempt to incapacitate at the very least, or let innocent people die and that is the one time that Superman agonizingly will actually move in to stop 682 once and for all. Split him in half with some heat vision if he can. Remember 682 might adapt but he's not going to adapt until it's actually done to him. So that first, and I've seen instances where Superman is just vaporizes people. He can narrow it down to tight beams and cut things or he can wide beam it and literally just vaporize things. I think caught unawares without the ability to immediately adapt. 682 could end up vaporized in such a situation and that would be the end of him period. Anyway, what do you think? I do think that 682 is held up as this great powerful creature from the SCP community but it really isn't. And if we were to throw him up against say Spider-Man or something like that we could go into a real fight but if we put him up against Superman, Superman is leagues in power above 682. It's non-comparative. So that's it in my opinion and all of this is in my opinion because, and this is important to say, I speak as though I am an authority on these sorts of things but guess what? No one's ever seen 682 in Superman fight. We can only make assumptions and guesses and set our parameters but in the parameters that we've set here I feel as though it's very clear Superman wins. Thank you very much for watching. If you enjoyed the video, hit the subscribe button and then hit the notification bell next to that so you're notified when I upload new videos. And then head on over to patreon.com forward slash D Sumerian and pledge at any level like everybody here on the screen already has. So nice to know that I'm not alone out here and I will see you all again on Thursday.


it's the first one, yes, perfect. So I will talk about open data challenge. Maybe some of you knows about open data, maybe not. Open data is to make data available for everybody, okay? And what we are providing is a platform running on OpenShift that can allow any provider to deploy an open data platform. So what is an open data? For example, for the French government, you've got open data, it's a law in France. You need to provide data about financial, your financial account subject, about your subventions, about a number of people living in your city, data about transportation, any kind of data can be open to the public. You've got another one there, which is a French 5G deployment in France. So that's the law. So most of the entity needs to provide data as open data. Open data is also sharing data between people, okay? Meaning you can go, you can take the data, you can offer new service for those data. For example, you can develop a smartphone application, okay, which is called re-usage of the data. So this you can do, you can also access to the data using API. So we need to provide also an API infrastructure so that development companies can use the API to connect not to the database, but to a data request, HTTP request, and get the data. And we have a lot of website example. I put some here so that when you can download letters, PowerPoint, you can have some example. So I will tell you about the first open data application. Maybe you know this, it's the cholera discovery. It's 1854, and this is how John Snow discovered where people get the cholera, simply because he put all the cholera cases on a map and he just discovered there was a pump water around this. So which means open data interest is also crossing data from various database, okay? And putting it on a map, it's very easy and trying to analyze your data and find out something. You have a lot of application now, people put where you have some accident in your city to provide to people some maps about where it's dangerous to run bicycle, where it's dangerous to walk, and so on. So our open data architecture, so for this, I needed Dilbert to help me, and I need to understand what is an open data architecture. We, my platform, we use SICAN, some of you know SICAN, you can raise VN if you know it, nobody, so it's a good day for you. So SICAN is the number one open data infrastructure. The front end we are using Drupal, I guess most of you know Drupal, right? Thank you, I'm safe. And we use our BI platform, Vanilla, ETL, to ingest, to connect to a new database and ingest the data into the SICAN database, and we use Vanilla BI to develop dashboard. We provide also a K-Clock, I guess you know K-Clock as an EAM infrastructure and other subject. So that's our data for citizen open infra. Again, some website example, Paris Grandest, region of, sorry, Grand Paris, you will hear a lot about Grand Paris because in two years we have the Olympic Games. Region Grandest, also some, just very close from Germany. So all those websites are always about data, so data visualization, data on map, data publication. And because we had some interesting success in France, now we needed to improve our deployment strategy, our maintenance strategy, all those things that goes when you start having success with your application that you start on your own computer, and after you have to deploy it on many different instance. So how did we do this? First we move simply from a single base server installation to virtual machine. Okay, and it was four years ago, before for us all those things, we would never use it. And we like it, really Proxmox, some of you maybe know Proxmox, it's very nice. We started with Proxmox 5, now we are in Proxmox 6, it's on top of Debian or something like this. My team is happy with this, it's my team is happy, it's first good things. And my customer also are happy, so I guess my life is better. And after we move two years ago to Image, so we start, and there was some development change, but don't ask me which one, okay? It's our deal together, so my team changed something in the software, so now we are able to deploy as Image Docker, and we had a large project with one French region, and they found us the OpenShift Migration, okay? Otherwise we will not do it to be clear with you, we stay on Docker, we don't know how it works really. But moving to OpenShift, deployment and plaster of that are really easy, okay? All the burden about updating the platform, saving the data, all those things, we have some dozen of instance, all is done very, very easily. So again, moving to Proxmox, even we were happy with Proxmox to OpenShift was a nice pass for us, okay? We took this way and at the end it's okay. What we have now, we have image of Data for Citizen, our open data platform, and we have also an image of Vanilla, which is our business intelligence and ETL platform, okay? It's all deployed on OpenShift, it's running pretty well. You've got here an example of what we do, you connect with Vanilla on any kind of application, you put it, you build visualization, maps, all those things, and after you can communicate with any open data platform, and also provide your data as API so that people can connect on your database, okay? We have interfaces and we have what we call pod. Pod is like a small number of image, some of you may know this, and to start a new instance of Data for Citizen, now it's just running a script and you have it ready in like maybe less than five minutes. Before when there was a virtual machine new instance, you need to copy the virtual machine master, you need to change the IP configuration of the machine, it's little longer, let's say less than one day. And now we can have a new application up in less than 10 minutes, which is really, really easy. And we also add new image because you find it very easily on Docker Hub or other Docker repository. So for example, we added Lime Survey, maybe some of you know Lime Survey, it's a platform to build survey and collect data. So it's very clever in an open data application because using Lime Survey you can build survey and ask the citizen to answer to some information. We can also collect data now using open street map. And so people for example, if they want to declare that somewhere there is some trash in a street or something like this, they can use the survey point to a specific area and said here there is something, please do something or act to clean the street or something like this, okay. And all this is running on container, public or private hybrid cloud, we are now deploying on OVH, it's a French, you saw them somewhere here, they are not here, boom. So okay, so we deploy on OVH, we are happy with OVH except when Strasbourg was burning, maybe you've heard about this, they did not tell you but we lost some server also at that time, but basically we are happy with OVH, it's easy to deploy, it's easy to manage. I have no stock option in OVH so I can talk freely about this, that's it, okay. So we have our inside infrastructure to develop and for any of our customer we deploy on OVH, also because it's a French provider and most of our customers are French government so they ask us to host in France, which is normal, okay. France or Europe, there is always some discussion about this but basically we don't move like this, okay. So some open shift interfaces. So this one I saw it yesterday for OVH was in the low key, okay, it was exactly the same. Here it's me, I just give words, I know nothing, you know, I want container, I want Kubernetes, all those things, I want to have my development team very happy, the infra team very happy and customer very happy, okay. And with this kind of interface, let's say we go, okay and we provide good results. What we can do, we can now deploy large data sets of data, we deploy data using geo data infrastructure, we do real time integration and before when you use some single server, we have some memory problems, we had sometimes some crash, I should not tell it publicly but it happens before and now moving honest, moving now to this kind of infrastructure, it's less. It can happen, I don't know, my team did not tell it to me, my customer don't call me so I feel more happy so we can directly ingest data in real time which is very nice and put the data for example on the map. Here it's something very nice, if you go to this website which is La Rochelle, I encourage all of you to go to La Rochelle in holiday, it's a nice city and if you go to La Rochelle like here in Berlin, you can have a bicycle and this is a real time bicycle availability, okay. It's updated every five minutes. So if you want, if you have the smartphone application because somebody developed a smartphone application with those data, okay, you can see where is the next bicycle available or you can see where is a free spaces to drop your bicycle, all those things, okay. So it's very easy to use. What we do also is we provide API so to manage the success for example of La Rochelle with the API, we deploy also gravity. Don't know if some of you knows gravity, it's an API management tools, okay. If you register with this mega city, they will give you an API key and so you can request many API requests every day. If you don't register, maybe you have a limitation to 10 or 20 requests per day so that we limit with this people who just request, request, request to have the server dropping down, okay. So with gravity, we are really happy also with this and gravity also deploys in OpenShift, I mean it's an image, so all things is very consistent, easy to insert new services. I will not tell you about microservices or something but it's kind of new services and we just have some configuration file adding new plan in gravity and after it's okay. We were able to set new application and new services, for example, it's a real time activity for firemen in the south of France, okay. It can be useful, it is useful, okay. And we can also have some dashboard and the other one, this one is an example of you put two or three different data set on a map. For example, you can put the camping data set with restaurant data set, with the lake data set and to see where is the best camping you can go, okay. If you want to have a glass of wine or something like this and after swimming the lake, okay. That's an image but this is just to image my speech and maybe you have something clever to do, okay. You just take all your data and you put it on a map. Unfortunately last slide, customer is not really happy with OKD because of the price. Nobody from Red Hat here, so sorry. It's running perfectly, believe me, but it's very expensive. So they ask us now to say okay, it's a simple application just to display data. It's not nuclear application. It's not health application. It's something honest that can stop during 10 minutes if you understand my word, okay. So we don't need something 100% available. If it's 99.90, it's okay, okay. So can you evaluate what's the cost human side to go from open shift to Kubernetes? And so now we are in a process to install a Kubernetes infra just to see if it works or not. The script are almost all the same. There is no problem. That's what my team told me. It's just knowledge. We have to, because we like OKD, the interface is okay. So we have to learn a new kind of interface. And again, it's just for cost strategy from my customer side. And also it's better also to deploy in other country and other region because if you can only with OKD, sometimes some people tell you okay for this kind of application, it's maybe too expensive. Second things, now because of this new application, we have a vanilla BI platform available on OKD and Kubernetes. So before also with vanilla, when we started a new project, it's like one or two days to set up a new infrastructure. Now it's 10 minutes. Okay. I go beyond my time. I'm sorry. Do you have any question? No. Thank you very much.  There was people. Thank you very much.


What's good job your boy Ross back out again with another video? So we're gonna check out top 20 debuts from the crowd in wrestling history. It should be a good one It's always cool when you have a debut and somebody comes through the crowd It's just it gives it that extra to their debut man. This should be a good one Appreciate all the love and support on the channel wrote to 80k and let's get right into this bad boy, man Rest in peace Scott Hall that would be the first clip rest in peace Scott Hall, man damn Damn, is it still a sad thing to even have to say in 2022? But my thoughts and prayers go out to his family his close friends his loved ones Alleged or a legendary wrestling icon that will never be forgotten. So rest in peace Scott Hall Shout out to my ablocker.  Yep. Yep. He made his name As soon as he came in it was he was destined to be The the person to care you next to you on his back. He was destined.  I didn't come alone. What is NXT gonna do next? I know how to get you there Yeah, this is cool This was cool, I love this moment Now all those guys are in AEW every single except Roger Strong not sure where Roger Strong's gonna go what he's gonna do But ah man Yeah, the Usos they've come a long way They didn't really utilize them as well as they should have as well China No, oh Santino Mirella, I remember watching this live. I thought this was just insane at this was happening right now He won the intercontinental championship. I remember watching that live.  But the crowd loved it Quite honestly, I am trying to create the next step friggin Rollins Oh some more Joe This was so cool This is cool The only problem is Didn't really push Joe like they should have I Still for the life of me will never understand why Samoa Joe was not a world champion. I Never understand it. I know he did get injured at some point, but he's fantastic on the microphone Great in the ring He comes off believable. What more do you want? He may not have the six pack and all this other stuff But the dude still look like he could kill you. I Don't know man. That's WWE. Oh The dog collar match We see him pump That's cool. This is cool to see Ladies and gentlemen, yes Yep recipe said he shield the shield Love it Love it. Oh man, one of the greatest factions in WWE history Oh Jericho book a T Book a T Man That was a cool moment, bro This was cool, bro This was so cool, right? This was one of those scenes where People were expecting it and when it finally happened He kind of I guess you could say paved the way for people to especially in WWE Like yo, you don't have to be here to be a star you can go to this company be a star You know I'm saying and have somewhat control over your character and And what you want to do with your character and be happy here. So that was a Very monumental moment for a WWE and just wrestling as a whole that crowd went stupid, bro But yo comment down below. Let me know your favorite debut from the crowd Hey, man Once again, rest in peace Scott Hall a legend in his in his business in the wrestling business the wrestling industry Will never be forgotten his legacy will continue to live on through all our memories and It's just an unfortunate thing that we have to talk about that in In the year 2022, but appreciate all of them support roll to 80k appreciate y'all kicking me see y'all next one. Peace