Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add more details to the README. #3

Merged
merged 1 commit into from

2 participants

@franckverrot

Hi Dimitri,

First of all, thanks a lot for this extension, it's pure awesomeness.

I'm very inexperienced WRT postgresql's configuration and I just wanted to add some details for people like myself.

In any case... thanks!

@dimitri
Owner

Please edit postgresql-server-dev-9.1 so that it reads postgresql-server-dev-all, then I'll happily commit your proposed change! Thanks.

@franckverrot

Hi @dimitri, branch updated!

Thanks so much again!

@dimitri dimitri merged commit 9a8a089 into from
@dimitri
Owner

Thanks for your contribution!

@fdr fdr referenced this pull request from a commit in fdr/pgextwlist
@fdr fdr Fix an ALTER EXTENSION UPDATE crash
Caused by using a NULL snapshot.  Annotated stack trace in a debug build
is as follows:

    #0  0x00007fee33fcea8a in heap_hot_search_buffer (tid=0x7fee3494e914,
        relation=0x7fee33e95f80, buffer=8011, snapshot=0x0,
                                              ^^^^^^^^^^^^^ Problem
        heapTuple=0x7fee3494e910, all_dead=0x7fffa8f07842 "\001\001",
        first_call=1 '\001') at heapam.c:1735
    #1  0x00007fee33fea959 in index_fetch_heap (scan=0x7fee3494e8c0)
        at indexam.c:529
    #2  0x00007fee33feabcb in index_getnext (scan=0x7fee3494e8c0,
        direction=ForwardScanDirection) at indexam.c:612
    #3  0x00007fee33fe91e3 in systable_getnext (sysscan=0x7fee3494edc8)
        at genam.c:390
    #4  0x00007fec18156708 in get_extension_current_version (
        extname=extname@entry=0x7fee34942210 "postgis") at utils.c:192
    #5  0x00007fec18157349 in extwlist_ProcessUtility (parsetree=0x7fee34942230,
        queryString=0x7fee349417f8 "alter extension  postgis update;",
        context=PROCESS_UTILITY_TOPLEVEL, params=0x0, dest=0x7fee349425b8,
        completionTag=0x7fffa8f07ce0 "") at pgextwlist.c:285
    #6  0x00007fee342d0da2 in ProcessUtility (parsetree=0x7fee34942230,
        queryString=0x7fee349417f8 "alter extension  postgis update;",
        context=PROCESS_UTILITY_TOPLEVEL, params=0x0, dest=0x7fee349425b8,
        completionTag=0x7fffa8f07ce0 "") at utility.c:305
    #7  0x00007fee342cfd75 in PortalRunUtility (portal=0x7fee3494c478,
        utilityStmt=0x7fee34942230, isTopLevel=1 '\001', dest=0x7fee349425b8,
        completionTag=0x7fffa8f07ce0 "") at pquery.c:1187
    #8  0x00007fee342cff69 in PortalRunMulti (portal=0x7fee3494c478,
        isTopLevel=1 '\001', dest=0x7fee349425b8, altdest=0x7fee349425b8,
        completionTag=0x7fffa8f07ce0 "") at pquery.c:1318
    #9  0x00007fee342cf422 in PortalRun (portal=0x7fee3494c478,
        count=9223372036854775807, isTopLevel=1 '\001', dest=0x7fee349425b8,
        altdest=0x7fee349425b8, completionTag=0x7fffa8f07ce0 "") at pquery.c:816
    #10 0x00007fee342c8962 in exec_simple_query (
        query_string=0x7fee349417f8 "alter extension  postgis update;")
        at postgres.c:1075
    #11 0x00007fee342cd370 in PostgresMain (argc=1, argv=0x7fee349298a8,
        dbname=0x7fee34929708 "REDACTED",
        username=0x7fee349296e0 "REDACTED") at postgres.c:4067
    #12 0x00007fee34262868 in BackendRun (port=0x7fee3496ebf0)
        at postmaster.c:4049
    #13 0x00007fee34261e88 in BackendStartup (port=0x7fee3496ebf0)
        at postmaster.c:3723
    #14 0x00007fee3425e420 in ServerLoop () at postmaster.c:1613
    #15 0x00007fee3425da72 in PostmasterMain (argc=5, argv=0x7fee34928390)
        at postmaster.c:1274
    #16 0x00007fee341bfec6 in main (argc=5, argv=0x7fee34928390) at main.c:227
e315c2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 23, 2012
  1. @franckverrot
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 4 deletions.
  1. +14 −4 README.md
View
18 README.md
@@ -12,11 +12,21 @@ You should have received that as a debian package or equivalent:
apt-get install postgresql-9.1-extension-whitelist
-If that's not the case, install the server development packages then:
+If that's not the case:
+
+1. install the server development packages (on Ubuntu, this would look like `apt-get install postgresql-server-dev-all`)
+2. then:
make
sudo make install
+This will generate a `pgextwlist.so` shared library that you will have to
+install in
+
+ `pg_config --libdir`/plugins
+
+so that your backend loads it automatically.
+
## Setup
You need to define the list of extensions that are whitelisted, the user
@@ -39,7 +49,7 @@ that performs the extension installing, and the error behavior.
That's quite simple:
- $ edit postgresql.conf, custom_variable_classes and extwlist.extensions
+ $ edit postgresql.conf to add local_preload_libraries, custom_variable_classes and extwlist.extensions
dim=# show extwlist.extensions;
show extwlist.extensions;
@@ -47,13 +57,13 @@ That's quite simple:
---------------------
hstore,cube
(1 row)
-
+
dim=# create extension foo;
create extension foo;
ERROR: extension "foo" is not whitelisted
DETAIL: Installing the extension "foo" failed, because it is not on the whitelist of user-installable extensions.
HINT: Your system administrator has allowed users to install certain extensions. See: SHOW extwlist.extensions;
-
+
dim=# create extension hstore;
create extension hstore;
WARNING: => is deprecated as an operator name
Something went wrong with that request. Please try again.