Skip to content

Commit fdad611

Browse files
committed
chasnges
1 parent 26a5b25 commit fdad611

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

articles/postgresql/flexible-server/concepts-extensions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,18 @@ You can now enable pg_hint_plan your Postgres database. Connect to the database
543543
CREATE EXTENSION pg_hint_plan ;
544544
```
545545

546+
## pg_buffercache
547+
548+
`Pg_buffercache` can be used to study the contents of *shared_buffers* . Using [this extension](https://www.postgresql.org/docs/current/pgbuffercache.html) you can tell if a particular relation is cached or not(in *shared_buffers*) . This extension can help you in troubleshooting performance issues (caching related performance issues)
549+
550+
This is part of contrib and it is very easy to install this extension.
551+
552+
```sql
553+
CREATE EXTENSION pg_buffercache;
554+
```
555+
556+
557+
546558

547559
## Next steps
548560

articles/postgresql/flexible-server/concepts-security.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,25 @@ When you're running Azure Database for PostgreSQL - Flexible Server, you have tw
4949
Best way to manage PostgreSQL database access permissions at scale is using the concept of [roles](https://www.postgresql.org/docs/current/user-manag.html). A role can be either a database user or a group of database users, moreover roles can own the database objects and assign privileges on those objects to other roles to control who has access to which objects. It is also possible to grant membership in a role to another role, thus allowing the member role to use privileges assigned to another role.
5050
PostgreSQL lets you grant permissions directly to the database users. As a good security practice, it can be recommended that you create roles with specific sets of permissions based on minimum application and access requirements and then assign the appropriate roles to each user. The roles should be used to enforce a *least privilege model* for accessing database objects.
5151

52-
While you're creating the Azure Database for PostgreSQL server, you provide credentials for an **administrator role**. This administrator role can be used to create more [PostgreSQL roles](https://www.postgresql.org/docs/current/user-manag.html). The administrator role should never be used by the application.
52+
The Azure Database for PostgreSQL server is created with the 3 default roles defined. You can see these roles by running the command:
53+
```sql
54+
SELECT rolname FROM pg_roles;
55+
```
56+
* azure_pg_admin.
57+
* azuresu.
58+
* administrator role.
5359

60+
While you're creating the Azure Database for PostgreSQL server, you provide credentials for an **administrator role**. This administrator role can be used to create more [PostgreSQL roles](https://www.postgresql.org/docs/current/user-manag.html).
5461
For example, below we can create an example role called *demouser*,
5562

5663
```SQL
5764
postgres=> create role demouser with password 'password123';
5865
```
66+
The **administrator role** should never be used by the application.
67+
68+
In cloud-based PaaS environments access to a PostgreSQL superuser account is restricted to control plane operations only by cloud operators. Therefore, the **azure_pg_admin** account is added to the database as a pseudo-superuser account. Your administrator role is a member of the **azure_pg_admin** role.
69+
However, the server admin account is not part of the **azuresu** role, which has superuser privileges and is used to perform control pane operations. Since this service is a managed PaaS service, only Microsoft is part of the superuser role.
70+
5971

6072
You can periodically audit the list of roles in your server. For example, you can connect using `psql` client and query the `pg_roles` table which lists all the roles along with privileges such as create additional roles, create databases, replication etc.
6173

@@ -78,6 +90,9 @@ rolbypassrls | f
7890
rolconfig |
7991
oid | 24827
8092

93+
94+
95+
8196
```
8297

8398
[Audit logging](concepts-audit.md) is also available with Flexible Server to track activity in your databases.

0 commit comments

Comments
 (0)