Re: [GENERAL] GIN Trigram Index Size

2015-09-09 Thread Jeff Janes
On Wed, Sep 9, 2015 at 2:54 PM, Christian Ramseyer wrote: > I have read some discussions about pending list bloat issues, but there > it was suggested that vacuuming the table should reclaim the space, and > this does not seem to the case. The only way I found to reduce the size > is by doing a

Re: [GENERAL] Bugs with like_option in CREATE TABLE

2015-09-09 Thread Melvin Davidson
*>1. INCLUDING CONSTRAINTS does not bring over the Foreign Keys* >Not a bug since the documentation states that the only additional constraints that are brought over are check constraints.​ Not Null constraints are always brought >over. Hmmm, The document would be a lot clearly if it simply stat

Re: [GENERAL] Bugs with like_option in CREATE TABLE

2015-09-09 Thread David G. Johnston
On Wed, Sep 9, 2015 at 7:51 PM, Melvin Davidson wrote: > > > > *O/S = Windows 10PostgreSQL 9.2.10, compiled by Visual C++ build 1600, > 32-bit* > http://www.postgresql.org/docs/9.1/interactive/sql-createtable.html > > > and like_option is: > > { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS |

[GENERAL] Bugs with like_option in CREATE TABLE

2015-09-09 Thread Melvin Davidson
*O/S = Windows 10PostgreSQL 9.2.10, compiled by Visual C++ build 1600, 32-bit* http://www.postgresql.org/docs/9.1/interactive/sql-createtable.html and like_option is: { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS | INDEXES | STORAGE | COMMENTS | ALL } *1. INCLUDING CONSTRAINTS does not br

Re: [GENERAL] Any thoughts on a better approach to this query?

2015-09-09 Thread David G. Johnston
On Sat, Sep 5, 2015 at 8:36 AM, Marc Mamin wrote: > >array_not_nulls(array_agg(case when type='A' then link end ))as ar_a, >array_not_nulls(array_agg(case when type='B' then link end ))as ar_b, >array_not_nulls(array_agg(case when type NOT IN ('A', 'B') then link > end)) as ar_others

Re: [GENERAL] log_statement = 'mod' does not log all data modifying statements

2015-09-09 Thread Michael Paquier
On Wed, Sep 9, 2015 at 11:24 PM, Igor Neyman wrote: > Could you please provide reference to pg_audit? Should be here: http://pgaudit.org/ https://github.com/pgaudit/pgaudit -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

[GENERAL] psql meta-command string interpolation differs from SQL

2015-09-09 Thread David G. Johnston
Mostly looking for affirmation though it was somewhat surprising that I had no recollection of this dynamic even though I've been a fairly avid reader of the documentation. Executing the following in psql: \set name_regexp '^\S+' CREATE TABLE testtbl ( textid NOT NULL PRIMARY KEY CHECK (textid ~

[GENERAL] GIN Trigram Index Size

2015-09-09 Thread Christian Ramseyer
Hi Some weeks ago I got some advice here on how to build a trigram index. Now, I have implemented this in our rather large database, which looks like this: We have one table of log events per month, used as partitions via "logs": public | logs | table| postgres public |

Re: [GENERAL] clone_schema function

2015-09-09 Thread Melvin Davidson
Thanks Igor, hmm, apparently the "INCLUDING CONSTRAINTS' option of "CREATE TABLE' has a glitch and only includes the primary key. I also noticed that INCLUDING ALL generates an error, so I'll have to report that also. I'll go eat some crow and work on a fix to add all constraints in the meantime.

Re: [GENERAL] clone_schema function

2015-09-09 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Melvin Davidson Sent: Wednesday, September 09, 2015 12:31 PM To: pgsql-general@postgresql.org Subject: [GENERAL] clone_schema function I noted there was an inquiry as to how to copy or clone_schem

Re: [GENERAL] Buffers: shared hit/read to shared_buffers dependence

2015-09-09 Thread Guillaume Lelarge
2015-09-09 17:06 GMT+02:00 Pavel Suderevsky : > Laurenz, Merlin, > > Thanks a lot for your explanations. > > >Even if postgres does not cache the table, the o/s will probably > > still cache it assuming it has the memory to do so. > > Could you please clarify, do I understand right that there are

Re: [GENERAL] log_statement = 'mod' does not log all data modifying statements

2015-09-09 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Stephen Frost Sent: Wednesday, September 09, 2015 10:17 AM To: Bruce Momjian Cc: Jack Christensen ; pgsql-general@postgresql.org Subject: Re: [GENERAL] log_statement = 'm

Re: [GENERAL] Buffers: shared hit/read to shared_buffers dependence

2015-09-09 Thread Pavel Suderevsky
Laurenz, Merlin, Thanks a lot for your explanations. >Even if postgres does not cache the table, the o/s will probably > still cache it assuming it has the memory to do so. Could you please clarify, do I understand right that there are no way to determine with 'explain' whether postgres applies

[GENERAL] avoid lock conflict between SELECT and TRUNCATE

2015-09-09 Thread Florin Andrei
Once in a while, I have a report running a complex query such as this: BEGIN;declare "SQL_CUR04919850" cursor with hold for SELECT "auths_with_trans"."user_id" AS "user_id (auths_with_trans)", MAX("auths_with_trans"."user_created") AS "TEMP(attr:user_created:ok)(2099950671)(0)", MIN("au

[GENERAL] clone_schema function

2015-09-09 Thread Melvin Davidson
I noted there was an inquiry as to how to copy or clone_schema an entire schema. The standard method for doing that is to 1. pg_dump the schema in plain format 2. edit the dump file and change all occurrences of the schema name 3. reload the dump into the new schema. The attached function is an al

Re: [GENERAL] jsonb value retrieval performance

2015-09-09 Thread Teodor Sigaev
does it read in the whole jsonb tree structure in memory and get to v1 or it has some optimization so only get v1 instead of reading in the whole structure. it reads, untoasts and uncompresses whole value and then executes search. An idea to fix that is a reading jsonb value by only needed c

Re: [GENERAL] log_statement = 'mod' does not log all data modifying statements

2015-09-09 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: > On Fri, Jun 12, 2015 at 01:54:30PM -0500, Jack Christensen wrote: > > I was recently surprised by changes that were not logged by > > log_statement = 'mod'. After changing log_statement to 'all', I > > found that the changes were occurring in a writable C

Re: [GENERAL] log_statement = 'mod' does not log all data modifying statements

2015-09-09 Thread Bruce Momjian
On Fri, Jun 12, 2015 at 01:54:30PM -0500, Jack Christensen wrote: > I was recently surprised by changes that were not logged by > log_statement = 'mod'. After changing log_statement to 'all', I > found that the changes were occurring in a writable CTE. > > Is there a way to log all statements that

Re: [GENERAL] pg_basebackup problem for Streaming replication

2015-09-09 Thread Sachin Srivastava
Dear All, Kindly suggest to me why this problem is coming. Regards, Sachin On Thu, Sep 3, 2015 at 12:09 PM, Sachin Srivastava wrote: > Dear Experts, > > > One problem, I am facing that when I am using *pg_basebackup* (on Standby > Server) it’s copying only some files and directories not all li

Re: [GENERAL] bdr admin role

2015-09-09 Thread Ray Stell
On 9/9/15 1:43 AM, Craig Ringer wrote: $ git rev-parse --short HEAD 6a60690 $ git branch * bdr-pg/REL9_4_STABLE OK, that's PostgreSQL. What about the BDR extension its self? SELECT bdr.bdr_version() will show you if you're starting up OK, otherwise again the git rev please. bdrdemo=# SELECT