[GENERAL] EINTR causes panic (data dir on btrfs)

2015-02-12 Thread Gustavo Lopes
Every few weeks, I'm getting a error like this: 2015-02-11 15:31:00 CET PANIC: could not write to log file 00010007007D at offset 1335296, length 8192: Interrupted system call 2015-02-11 15:31:00 CET STATEMENT: COMMIT 2015-02-11 15:31:17 CET LOG: server process (PID 8390) was

[GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Saimon Lim
Hi I want to hide my own stored procedures' bodies from the specific user. As far as I know, procedure's body is visible in the pg_catalog.pg_proc table. So, I did the following: REVOKE ALL ON pg_catalog.pg_proc FROM PUBLIC; And after it, when user tries: SELECT * from pg_proc; The following

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Saimon Lim
For clarification - I run the commands using psql program. 2015-02-11 12:54 GMT+03:00 Saimon Lim aimon.s...@gmail.com: Hi I want to hide my own stored procedures' bodies from the specific user. As far as I know, procedure's body is visible in the pg_catalog.pg_proc table. So, I did the

[GENERAL] Issue dumping schema using readonly user

2015-02-12 Thread Daniel LaMotte
Here’s the situation: % psql --version psql (PostgreSQL) 9.3.5 % postgres --version postgres (PostgreSQL) 9.3.5 % psql mydatabase create table mytable_is_readonly (id uuid primary key, text text not null); create table mytable_is_not_readonly (id uuid primary key, text

[GENERAL] segmentation fault postgres 9.3.5 core dump perlu related ?

2015-02-12 Thread Day, David
Update/Information sharing on my pursuit of segmentation faults FreeBSD 10.0-RELEASE-p12 amd64 Postgres version 9.3.5 Below are three postgres core files generated from two different machine ( Georgia and Alabama ) on Feb 11. These cores would not be caused from an environment update issue

Re: [GENERAL] Issue dumping schema using readonly user

2015-02-12 Thread Adrian Klaver
On 02/11/2015 01:47 PM, Daniel LaMotte wrote: Here’s the situation: | % psql --version psql (PostgreSQL) 9.3.5 % postgres --version postgres (PostgreSQL) 9.3.5 % psql mydatabase create table mytable_is_readonly (id uuid primary key, text text not null); create

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Merlin Moncure
On Thu, Feb 12, 2015 at 2:53 AM, Saimon Lim aimon.s...@gmail.com wrote: For clarification - I run the commands using psql program. 2015-02-11 12:54 GMT+03:00 Saimon Lim aimon.s...@gmail.com: Hi I want to hide my own stored procedures' bodies from the specific user. As far as I know,

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread John R Pierce
On 2/11/2015 1:54 AM, Saimon Lim wrote: I want to hide my own stored procedures' bodies from the specific user. As far as I know, procedure's body is visible in the pg_catalog.pg_proc table. only good way I know of to do that is to write the procedures in C so they are binary .so/.dll files.

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Pavel Stehule
Hi It is currently impossible on unpatched postgres. I am selling a patch to postgres that does a obfuscation of procedure body Regards Pavel Stehule 2015-02-11 10:54 GMT+01:00 Saimon Lim aimon.s...@gmail.com: Hi I want to hide my own stored procedures' bodies from the specific user. As

[GENERAL] What's a reasonable maximum number for table partitions?

2015-02-12 Thread Tim Uckun
The documentation says having too many partitions will end up being unproductive as it will cause the optimizer to examine all the tables for query planning. So I am wondering what's a reasonable upper limit? If I was to partition a table by day I would have 365 tables per year. Is that too

[GENERAL] EINTR causes panic (data dir on btrfs)

2015-02-12 Thread Gustavo Lopes
Every few weeks, I'm getting a error like this: 2015-02-11 15:31:00 CET PANIC: could not write to log file 00010007007D at offset 1335296, length 8192: Interrupted system call 2015-02-11 15:31:00 CET STATEMENT: COMMIT 2015-02-11 15:31:17 CET LOG: server process (PID 8390) was

[GENERAL] postgresql jsonb processing with c api

2015-02-12 Thread Igor Stassiy
Hi, I am developing a postgres extension. The extension gets json data as a string from external source and is supposed to be able to store this string in a Jsonb type. I am working with C API for postgres-9.4 installed from ubuntu trusty main repo. I would like to use a function that converts

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Alexey Bashtanov
Hello, Saimon, I propose the following (ugly) solution. -- /*as some privileged user: */ begin; create table hidden_function_foo as select $code$ create function pg_temp.foo(p_input text) returns text as $$ select /*nodoby knows we are using md5*/md5('the_salt_nobody_can_see'

[GENERAL] checking if jsonb was detoasted and releasing memory

2015-02-12 Thread Igor Stassiy
Let us say that the datum of type Datum contains a Jsonb* type. Then after the call Jsonb *jb = DatumGetJsonb(datum); the jb might point to a palloc'ed structure, in case detoasting took place. So the question is if this is the right way to free up the memory after checking that the jb was

Re: [GENERAL] Hardware requirements for a PostGIS server

2015-02-12 Thread Alban Hertroys
On 12 February 2015 at 00:38, Mathieu Basille basille@ase-research.org wrote: Platform Linux is the platform of choice: * Easier administration (install/configuration/upgrade), which is also true for addons/dependencies (starting with PostGIS, but also GEOS, GDAL, PL/R); *

[GENERAL] 9.5 RLS 'check policy' function arguments

2015-02-12 Thread Ted Toth
I'm contemplating writing a function for use with the CHECK POLICY statement. Where can I find documentation describing the arguments that will be passed to the function? Ted -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] checking if jsonb was detoasted and releasing memory

2015-02-12 Thread Tom Lane
Igor Stassiy istas...@gmail.com writes: Let us say that the datum of type Datum contains a Jsonb* type. Then after the call Jsonb *jb = DatumGetJsonb(datum); the jb might point to a palloc'ed structure, in case detoasting took place. So the question is if this is the right way to free up

[GENERAL] infinite recursion detected in rules for relation

2015-02-12 Thread pinker
I wanted to set a rule: CREATE RULE _RETURN ASON SELECT * from backend.testDO INSTEAD SELECT * FROM backend.test WHERE who='Me'; When I'm trying to do anything on the table I get following error: ERROR: infinite recursion detected in rules for relation backend.test** Błąd

Re: [GENERAL] infinite recursion detected in rules for relation

2015-02-12 Thread John McKown
On Thu, Feb 12, 2015 at 10:48 AM, pinker pin...@onet.eu wrote: I wanted to set a rule: CREATE RULE _RETURN AS ON SELECT * from backend.test DO INSTEAD SELECT * FROM backend.test WHERE who='Me'; When I'm trying to do anything on the table I get following error: ERROR:

Re: [GENERAL] infinite recursion detected in rules for relation

2015-02-12 Thread David G Johnston
pinker wrote I wanted to set a rule: pre CREATE RULE _RETURN AS ON SELECT * from backend.test DO INSTEAD SELECT * FROM backend.test WHERE who='Me'; /pre When I'm trying to do anything on the table I get following error: pre ERROR: infinite recursion detected in rules for