Skip to content

Commit 43e07bf

Browse files
Add explanation of permission denied for schema repack
1 parent b01ef3e commit 43e07bf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,20 @@ A typical question people asks when they first try to use this extension is: Is
287287

288288
The answer to that is that it is actually both. [pg_repack/lib](https://github.com/reorg/pg_repack/tree/master/lib) holds the code for the extension, including the schema and SQL artifacts it creates, and the C library implementing the code of several of those functions. On the other hand, [pg_repack/bin](https://github.com/reorg/pg_repack/tree/master/bin) keeps the code for the client application, which knows how to interact with the programmability artifacts created by the extension. This client application aims to ease the complexity of interacting with the different interfaces surfaced by the server-side extension, by means of offering the user some command-line options which are easier to understand. The client application without the extension created on the database it is pointed to, is useless. The server-side extension on its own would be fully functional, but would require the user to understand a complicated interaction pattern consisting on executing queries to retrieve data that is used as input to functions implemented by the extension.
289289

290+
### Permission denied for schema repack
291+
292+
As of now, because of the way in which we grant permissions to the repack schema created by this extension, it is only supported to run pg_repack functionality from the context of `azure_pg_admin`.
293+
294+
You may notice that if the owner of a table tries to run pg_repack, they will end up receiving an error like the following:
295+
296+
```
297+
NOTICE: Setting up workers.conns
298+
ERROR: pg_repack failed with error: ERROR: permission denied for schema repack
299+
LINE 1: select repack.version(), repack.version_sql()
300+
```
301+
302+
To avoid that error, make sure you run pg_repack from the context of `azure_pg_admin`.
303+
290304
### pg_stat_statements
291305

292306
The [pg_stat_statements extension](https://www.postgresql.org/docs/current/pgstatstatements.html) gives you a view of all the queries that have run on your database. That is useful to get an understanding of what your query workload performance looks like on a production system.

0 commit comments

Comments
 (0)