pgagroal_databases.conf(5)

πŸ’– pgagroal_databases.conf β€” the file formats manual bestie πŸ’–

okay so real talk, this is the manual page for pgagroal_databases.conf(5), from the File Formats Manual section. It's the glow-up rules file for pgagroal, and we're gonna go through every single bit of it together, no skips, no gatekeeping. 🫢


✨ NAME ✨

pgagroal_databases.conf β€” the limits file for databases, users, or literally both, for pgagroal πŸ’…


🌸 DESCRIPTION 🌸

So the pgagroal_databases.conf configuration file is where you define limits for a database, or a user, or both at the same time. It also does database aliases, which is lowkey iconic because it lets clients connect using alternative names for databases you've already configured. main character energy fr fr. πŸ‘‘


πŸŽ€ FORMAT πŸŽ€

Here's the tea on each field, bestie:

  • DATABASE β€” tells you which database the rule is for. You can put a specific name, or all for, you guessed it, all the databases. It can also include aliases, formatted like this: database_name=alias1,alias2,alias3 ✨
  • USER β€” the user for the rule. Either a specific name or all for all users.
  • MAX_SIZE β€” the maximum pool size for the entry. all for all connections.
  • INITIAL_SIZE β€” the initial pool size for the entry. Default is 0. Heads up, this one requires a pgagroal_users.conf configuration. πŸ‘€
  • MIN_SIZE β€” the minimum pool size for the entry. Default is 0. Also requires a pgagroal_users.conf configuration.

πŸ¦‹ DATABASE ALIASES πŸ¦‹

Database aliases let clients connect using alternative names for a configured database. It's giving useful for application migrations, multi-tenancy, or just handing out names that are actually user-friendly. so cute. πŸŽ€

Aliases go in the DATABASE field, formatted exactly like: database_name=alias1,alias2,alias3

🌈 ALIAS RULES (read these, bestie, don't skip) 🌈

  • Maximum 8 aliases per database
  • Aliases must be globally unique across all database entries
  • Alias names cannot conflict with any real database name
  • Database names cannot conflict with any alias name
  • The special database name "all" cannot have aliases
  • Empty alias names are not allowed

When a client connects using an alias, pgagroal transparently maps it to the real database name for all backend operations. no cap, it just handles it for you. ✨


πŸ”₯ EXAMPLE πŸ”₯

          #
          # DATABASE [=alias, alias, ...]     USER         MAX_SIZE  INITIAL_SIZE  MIN_SIZE
          #
          all                                  all            all
          production_db=prod,main              myuser         10       5            2
          development_db=dev,test,qa           devuser        5        2            1
          legacy_db                            legacyuser     8        3            1

So in this example:

  • Clients can connect to "production_db", "prod", or "main" β€” all of them use the same backend database πŸ’…
  • The development database has three aliases: "dev", "test", and "qa" πŸ¦‹
  • The legacy database has no aliases and uses the standard format. classic, we respect it.

😭 REPORTING BUGS 😭

pgagroal is maintained on GitHub at <https://github.com/pgagroal/pgagroal>


pgagroal is licensed under the 3-clause BSD License.


πŸ‘‘ SEE ALSO πŸ‘‘

pgagroal.conf(5), pgagroal_hba.conf(5), pgagroal_vault.conf(5), pgagroal(1), pgagroal-cli(1), pgagroal-admin(1), pgagroal-vault(1)


ok that's literally the whole page, you ate that πŸ’… go configure something gorgeous, bestie 🫢

pgagroal_databases.conf(5) β€” that's the footer, that's the whole vibe, and it's the file formats manual so you know it's official. slay, periodt, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from