![]() This means that the psql I started will be running from postgres system account. Normally, when you do “sudo some_command", sudo logs to root account, and then executed some_command.īut if I'd use “sudo -u postgres some_command" – then sudo will log not to root, but rather to account that I named as -u option. If i'll run psql now, I will be greeted with error: Log file where you can find logs for this PostgreSQL clusterįirst, let's start with default, always available, command line interface to PostgreSQL – namely psql.Data directory where does PostgreSQL keep all the data files related to this cluster, or at least – main data files.Generally you will see there postgres, unless you will do some manual changes. Owner which system user PostgreSQL data belongs to.For now, it's safe to assume you will only see statuses online, down, and potentially suffixed by ,recovery if given cluster is starting now and executing recovery. Status well, what is the status of this cluster.These are both for TCP/IP connections, and connections over Unix Socket. Port which port PostgreSQL is listening on.As in – you can have two clusters named main, in different versions, but only one in single version It has to be unique within given version. Ver which PostgreSQL version is this cluster using.You can have multiple installations of PostgreSQL on the same server – with the same, or different, versions. Rather it basically means “installation". ![]() What do all the fields mean? Well, each line is so called “cluster", which is rather unfortunate term, as it's not cluster in the generally used meaning. Ver Cluster Port Status Owner Data directory Log file 13 main 5432 online postgres /var /lib /postgresql / 13 /main /var /log /postgresql /postgresql- 13-main.log One, generally, should always use the latest version – it has the most features, and the most bugs removed. Postgresql- 9.6 - object-relational SQL database, version 9.6 server ![]() Postgresql- 9.5 - object-relational SQL database, version 9.5 server Postgresql- 9.4 - object-relational SQL database, version 9.4 server Postgresql- 9.3 - object-relational SQL database, version 9.3 server Postgresql- 9.2 - object-relational SQL database, version 9.2 server Postgresql- 9.1 - object-relational SQL database, version 9.1 server Postgresql- 9.0 - object-relational SQL database, version 9.0 server ![]() Postgresql- 8.4 - object-relational SQL database, version 8.4 server Postgresql- 8.3 - object-relational SQL database, version 8.3 server Postgresql- 8.2 - object-relational SQL database, version 8.2 server Postgresql- 13 - object-relational SQL database, version 13 server Postgresql- 12 - object-relational SQL database, version 12 server Postgresql- 10 - object-relational SQL database, version 10 server ![]() Postgresql- 11 - object-relational SQL database, version 11 server Ubuntu ships with sudo configured in such a way that my user (first created) already belongs to sudo group, thanks to which I apt-cache search ^postgresql- | grep -E '^postgresql-+ ' So, I need some way to get to root for things like package installation. Now, before I will go any further – I tend to not work from root account, unless I absolutely must.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |