Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread David Johnston
Tom Lane-2 wrote Unfortunately, while testing it I noticed that there's a potentially fatal backwards-compatibility problem, namely that the COPY n status gets printed on stdout, which is the same place that COPY OUT data is going. While this isn't such a big problem for interactive use,

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread Pavel Stehule
2014-03-12 7:10 GMT+01:00 David Johnston pol...@yahoo.com: Tom Lane-2 wrote Unfortunately, while testing it I noticed that there's a potentially fatal backwards-compatibility problem, namely that the COPY n status gets printed on stdout, which is the same place that COPY OUT data is

Re: contrib/cache_scan (Re: [HACKERS] What's needed for cache-only table scan?)

2014-03-12 Thread Kouhei Kaigai
Thanks for your efforts! Head patched Diff Select - 500K772ms2659ms-200% Insert - 400K 3429ms 1948ms 43% (I am not sure how it improved in this case) delete - 200K

Re: contrib/cache_scan (Re: [HACKERS] What's needed for cache-only table scan?)

2014-03-12 Thread Haribabu Kommi
On Wed, Mar 12, 2014 at 5:26 PM, Kouhei Kaigai kai...@ak.jp.nec.com wrote: Thanks for your efforts! Head patched Diff Select - 500K772ms2659ms-200% Insert - 400K 3429ms 1948ms 43%

Re: [HACKERS] issue log message to suggest VACUUM FULL if a table is nearly empty

2014-03-12 Thread Haribabu Kommi
On Tue, Mar 11, 2014 at 2:59 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 1:13 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Mon, Mar 10, 2014 at 4:24 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Mar 10, 2014 at 5:58 AM, Wang, Jing

Re: [HACKERS] Patch: show relation and tuple infos of a lock to acquire

2014-03-12 Thread Amit Kapila
On Tue, Mar 11, 2014 at 2:32 PM, Christian Kruse christ...@2ndquadrant.com wrote: On 11/03/14 13:23, Amit Kapila wrote: Could you please once check (if you are comfortable doing so) wherever this patch is passing tuple, whether it is okay to pass it based on visibility rules, else I will

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Magnus Hagander
On Mar 12, 2014 1:46 AM, Josh Berkus j...@agliodbs.com wrote: On 03/11/2014 06:57 AM, Tom Lane wrote: Mind you, I wouldn't be unhappy to see it go away; it's a kluge and always has been. I'm just expecting lots of push-back if we try. And it's kind of hard to resist push-back when you

Re: [HACKERS] The case against multixact GUCs

2014-03-12 Thread Albe Laurenz
Josh Berkus wrote: What makes these GUCs worse is that nobody knows how to set them; nobody on this list and nobody in the field. Heck, I doubt 1 in 1000 of our users (or 1 in 10 people on this list) know what a multixact *is*. I won't contend your first statement, but multixacts are

Re: [HACKERS] Torn page hazard in ginRedoUpdateMetapage()

2014-03-12 Thread Heikki Linnakangas
On 03/10/2014 09:44 PM, Robert Haas wrote: On Mon, Apr 30, 2012 at 1:34 PM, Noah Misch n...@leadboat.com wrote: When GIN changes a metapage, we WAL-log its ex-header content and never use a backup block. This reduces WAL volume since the vast majority of the metapage is unused. However,

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-12 Thread MauMau
From: Alvaro Herrera alvhe...@2ndquadrant.com MauMau escribió: Do you know how I can reply to an email which was deleted locally? I thought I could download an old mail by clicking raw link and import it to the mailer. However, it requires username/password input, and it seems to be different

Re: [HACKERS] Is SPI safe to use in multi-threaded PL/Java?

2014-03-12 Thread MauMau
From: Tom Lane t...@sss.pgh.pa.us That, more or less. There is exactly zero provision in the Postgres code for multiple threads to exist inside a backend process. It's possible that PL/Java manages to completely insulate the Java world from the C world, so that the C code never sees more than

Re: [HACKERS] Torn page hazard in ginRedoUpdateMetapage()

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 4:23 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: The attached patch doesn't apply any more, but it looks like this issue still exists. Fixed. Did you forget to push? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Torn page hazard in ginRedoUpdateMetapage()

2014-03-12 Thread Heikki Linnakangas
On 03/12/2014 02:05 PM, Robert Haas wrote: On Wed, Mar 12, 2014 at 4:23 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: The attached patch doesn't apply any more, but it looks like this issue still exists. Fixed. Did you forget to push? Yep. Pushed now. - Heikki -- Sent via

Re: [HACKERS] [PATCH] Store Extension Options

2014-03-12 Thread Fabrízio de Royes Mello
On Tue, Mar 11, 2014 at 8:42 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 18:33, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: -1 to *requiring* validation for table-level options for exactly the same reasons we no longer validate custom

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Alvaro Herrera
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 03/11/2014 09:37 PM, Tom Lane wrote: In particular, I'd like to see an exclusion that prevents local users from having the same name as any global user, so that we don't have ambiguity in GRANT and similar commands. This

[HACKERS] git-review: linking commits to review discussion in git

2014-03-12 Thread Murtuza Mukadam
From: Murtuza Mukadam murtuza.i.muka...@gmail.com Date: Sat, Mar 8, 2014 at 1:56 PM Subject: Re: [HACKERS] git-review: linking commits to review discussion in git To: Heikki Linnakangas hlinnakan...@vmware.com Cc: pgsql-hackers@postgresql.org Hi Heikki We have linked git commits and reviews in

[HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Julien Tachoires
Hi, A customer has reported us a strange behaviour regarding a rowtype column with a domain subfield: test=# CREATE DOMAIN my_int_not_null_1 AS INTEGER DEFAULT 1 NOT NULL; CREATE DOMAIN test=# CREATE TYPE my_int_rowtype AS ( test(# f1 INTEGER, test(# f2 my_int_not_null_1 test(# );

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12 Březen 2014, 0:41, Peter Geoghegan wrote: On Tue, Mar 11, 2014 at 3:58 PM, Tomas Vondra t...@fuzzy.cz wrote: ERROR: index row size 1416 exceeds maximum 1352 for index gin_idx All index AMs have similar restrictions. Yes, I know and I have no problem with restrictions in general. You

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Andres Freund
On 2014-03-12 10:03:42 -0300, Alvaro Herrera wrote: Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 03/11/2014 09:37 PM, Tom Lane wrote: In particular, I'd like to see an exclusion that prevents local users from having the same name as any global user, so that we don't

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12 Březen 2014, 0:51, Peter Geoghegan wrote: On Tue, Mar 11, 2014 at 4:41 PM, Peter Geoghegan p...@heroku.com wrote: I think that in practice the general recommendation will be that when indexing at the top level, use jsonb_hash_ops. When indexing nested items, use the more flexible

[HACKERS] Postgresql XML parsing

2014-03-12 Thread Ashoke
Hi, I am working on adding a functionality to PostgreSQL. I need to parse the XML format query plan (produced by PostgreSQL v9.3) and save it in a simple data structure (say C structure). I was wondering if PostgreSQL already had any parsing functions implemented that I can use to do the XML

Re: [HACKERS] Postgresql XML parsing

2014-03-12 Thread Andrew Dunstan
On 03/12/2014 09:36 AM, Ashoke wrote: Hi, I am working on adding a functionality to PostgreSQL. I need to parse the XML format query plan (produced by PostgreSQL v9.3) and save it in a simple data structure (say C structure). I was wondering if PostgreSQL already had any parsing

[HACKERS] pgstat wait timeout (RE: contrib/cache_scan)

2014-03-12 Thread Kouhei Kaigai
It is another topic from the main thread, I noticed the following message under the test cases that takes heavy INSERT workload; provided by Haribabu. [kaigai@iwashi ~]$ createdb mytest [kaigai@iwashi ~]$ psql -af ~/cache_scan.sql mytest \timing Timing is on. --cache scan select 5 million create

Re: [HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Tom Lane
Julien Tachoires julien.tachoi...@dalibo.com writes: A customer has reported us a strange behaviour regarding a rowtype column with a domain subfield: Rowtypes in general do not support defaults for component fields. Is build_column_default() the right place to handle that case ? It's

Re: [HACKERS] pgstat wait timeout (RE: contrib/cache_scan)

2014-03-12 Thread Tom Lane
Kouhei Kaigai kai...@ak.jp.nec.com writes: WARNING: pgstat wait timeout WARNING: pgstat wait timeout WARNING: pgstat wait timeout WARNING: pgstat wait timeout Once I got above messages, write performance is dramatically degraded, even though I didn't take detailed investigation. I

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Tom Lane
Jaime Casanova ja...@2ndquadrant.com writes: On Tue, Mar 11, 2014 at 10:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: But not sure how to define a unique index that allows (joe, db1) to coexist with (joe, db2) but not with (joe, 0). and why you want that restriction? So that if I say GRANT

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: Yeah, what we really need is encapsulated per-DB users and local superusers. I think every agrees that this is the goal, but nobody wants to put in the work to implement a generalized solution. Encapsulated would probably be the doable part. But

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Magnus Hagander
On Wed, Mar 12, 2014 at 3:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: Yeah, what we really need is encapsulated per-DB users and local superusers. I think every agrees that this is the goal, but nobody wants to put in the work to implement a

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: On Wed, Mar 12, 2014 at 3:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: I share your doubts as to how useful such a concept actually is, but it'd work if we had real local users. It can also do interesting things like ALTER SYSTEM, replication,

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Mar 12, 2014 at 3:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: A local user with the superuser privilege would not be able to log into another database, because superuser doesn't give you any extra privilege until you've logged in. Yeah, as

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Magnus Hagander mag...@hagander.net writes: You could COPY over the hba file or sometihng like that :) Or just pg_read_binary_file() on the files in another database, which is accessible through SQL as well. More directly, he could alter pg_authid

Re: [HACKERS] pgstat wait timeout (RE: contrib/cache_scan)

2014-03-12 Thread Tomas Vondra
On 12 Březen 2014, 14:54, Kouhei Kaigai wrote: It is another topic from the main thread, I noticed the following message under the test cases that takes heavy INSERT workload; provided by Haribabu. [kaigai@iwashi ~]$ createdb mytest [kaigai@iwashi ~]$ psql -af ~/cache_scan.sql mytest

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread Tom Lane
Rajeev rastogi rajeev.rast...@huawei.com writes: On 11 March 2014 19:52, Tom Lane wrote: After sleeping on it, I'm inclined to think we should continue to not print status for COPY TO STDOUT. Aside from the risk of breaking scripts, there's a decent analogy to be made to SELECT: we don't

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Heikki Linnakangas
On 02/26/2014 11:25 PM, Alexander Korotkov wrote: On Thu, Feb 27, 2014 at 1:07 AM, Alexander Korotkov aekorot...@gmail.comwrote: On Thu, Feb 20, 2014 at 1:48 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 02/09/2014 12:11 PM, Alexander Korotkov wrote: I've rebased catalog

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread Tom Lane
David Johnston pol...@yahoo.com writes: Tom Lane-2 wrote 1. Treat this as a non-backwards-compatible change, and document that people have to use -q if they don't want the COPY tag in the output. I'm not sure this is acceptable. I've mostly used copy to with files and so wouldn't mind if

Re: [HACKERS] The case against multixact GUCs

2014-03-12 Thread Robert Haas
On Tue, Mar 11, 2014 at 3:14 PM, Josh Berkus j...@agliodbs.com wrote: In the 9.3.3 updates, we added three new GUCs to control multixact freezing. This was an unprecented move in my memory -- I can't recall ever adding a GUC to a minor release which wasn't backwards compatibility for a

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Heikki Linnakangas
On 03/12/2014 12:09 AM, Tomas Vondra wrote: Hi all, a quick question that just occured to me - do you plan to tweak the cost estimation fot GIN indexes, in this patch? IMHO it would be appropriate, given the improvements and gains, but it seems to me gincostestimate() was not touched by this

Re: [HACKERS] pgstat wait timeout (RE: contrib/cache_scan)

2014-03-12 Thread Jeff Janes
On Wed, Mar 12, 2014 at 7:42 AM, Tom Lane t...@sss.pgh.pa.us wrote: Kouhei Kaigai kai...@ak.jp.nec.com writes: WARNING: pgstat wait timeout WARNING: pgstat wait timeout WARNING: pgstat wait timeout WARNING: pgstat wait timeout Once I got above messages, write performance is

Re: [HACKERS] The case against multixact GUCs

2014-03-12 Thread Heikki Linnakangas
On 03/12/2014 06:26 PM, Robert Haas wrote: On Tue, Mar 11, 2014 at 3:14 PM, Josh Berkus j...@agliodbs.com wrote: In the 9.3.3 updates, we added three new GUCs to control multixact freezing. This was an unprecented move in my memory -- I can't recall ever adding a GUC to a minor release which

Re: [HACKERS] pgstat wait timeout (RE: contrib/cache_scan)

2014-03-12 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: On Wed, Mar 12, 2014 at 7:42 AM, Tom Lane t...@sss.pgh.pa.us wrote: We've seen sporadic reports of that sort of behavior for years, but no developer has ever been able to reproduce it reliably. Now that you've got a reproducible case, do you want to

Re: [HACKERS] The case against multixact GUCs

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 12:45 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 03/12/2014 06:26 PM, Robert Haas wrote: On Tue, Mar 11, 2014 at 3:14 PM, Josh Berkus j...@agliodbs.com wrote: In the 9.3.3 updates, we added three new GUCs to control multixact freezing. This was an

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Alexander Korotkov
On Wed, Mar 12, 2014 at 8:29 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 03/12/2014 12:09 AM, Tomas Vondra wrote: Hi all, a quick question that just occured to me - do you plan to tweak the cost estimation fot GIN indexes, in this patch? IMHO it would be appropriate, given

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 12:09 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Johnston pol...@yahoo.com writes: Tom Lane-2 wrote 1. Treat this as a non-backwards-compatible change, and document that people have to use -q if they don't want the COPY tag in the output. I'm not sure this is

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Alexander Korotkov
On Wed, Mar 12, 2014 at 8:02 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 02/26/2014 11:25 PM, Alexander Korotkov wrote: On Thu, Feb 27, 2014 at 1:07 AM, Alexander Korotkov aekorot...@gmail.com wrote: On Thu, Feb 20, 2014 at 1:48 PM, Heikki Linnakangas

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 1:52 PM, Alexander Korotkov aekorot...@gmail.com wrote: * This patch added a triConsistent function for array and tsvector opclasses. Were you planning to submit a patch to do that for the rest of the opclasses, like pg_trgm? (it's getting awfully late for that...)

Re: [HACKERS] logical decoding documentation?

2014-03-12 Thread Robert Haas
On Tue, Mar 11, 2014 at 4:16 PM, Andres Freund and...@2ndquadrant.com wrote: Could you perhaps commit the attached patch fixing the issues you mentioned? I committed this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:22 AM, Magnus Hagander wrote: On Mar 12, 2014 1:46 AM, Josh Berkus j...@agliodbs.com wrote: Yeah, what we really need is encapsulated per-DB users and local superusers. I think every agrees that this is the goal, but nobody wants to put in the work to implement a generalized

Re: [HACKERS] GIN improvements part2: fast scan

2014-03-12 Thread Heikki Linnakangas
On 03/12/2014 07:42 PM, Alexander Korotkov wrote: Preparation we do in startScanKey requires knowledge of estimate size of posting lists/trees. We do this estimate by traversal to leaf pages. I think gincostestimate is expected to be way more cheap. So, we probably need so more rough estimate

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Andrew Dunstan
On 03/12/2014 02:09 PM, Josh Berkus wrote: On 03/12/2014 12:22 AM, Magnus Hagander wrote: On Mar 12, 2014 1:46 AM, Josh Berkus j...@agliodbs.com wrote: Yeah, what we really need is encapsulated per-DB users and local superusers. I think every agrees that this is the goal, but nobody wants to

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-03-12 Thread Alvaro Herrera
MauMau escribió: The raw link only gave the mail in text format. I hoped to import the mail into Windows Mail on Windows Vista, but I couldn't. You might need to run a conversion process by which you transform the raw file (in mbox format) into EML format or whatever it is that Windows Mail

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Stephen Frost
* Josh Berkus (j...@agliodbs.com) wrote: Local superusers (maybe this concept needs another name) would be able to do the following things in a *single* database: 1 change permissions for other users on that database and its objects What about bypass permissions, ala what superuser does

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-03-12 Thread Fujii Masao
On Tue, Feb 25, 2014 at 1:03 PM, Rajeev rastogi rajeev.rast...@huawei.com wrote: On 04 February 2014 14:38, Myself wrote: On 4th February 2014, Christian kruse Wrote: On 04/02/14 12:38, Fujii Masao wrote: ISTM that the phrase Request queue is not used much around the lock. Using the

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Josh Berkus
On 03/12/2014 11:25 AM, Stephen Frost wrote: * Josh Berkus (j...@agliodbs.com) wrote: Local superusers (maybe this concept needs another name) would be able to do the following things in a *single* database: 1 change permissions for other users on that database and its objects What about

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2014-03-12 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Mar 12, 2014 at 12:09 PM, Tom Lane t...@sss.pgh.pa.us wrote: My inclination now (see later traffic) is to suppress the status report when the COPY destination is the same as pset.queryFout (ie, a simple test whether the FILE pointers are

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 03/12/2014 02:09 PM, Josh Berkus wrote: Well, if you really want my I want a pony list: Local superusers (maybe this concept needs another name) would be able to do the following things in a *single* database: 1 change permissions for other

[HACKERS] GSoC 2014

2014-03-12 Thread Ashutosh Dhundhara
Hello all, I am Ashutosh Dhundhara from Thapat University, Patiala-India presently pursuing Bachelors degree in Computer Science and Engineering. This year I wish to work for PostgreSQL under the flagship of GSoC 2014. So please help regarding this. I have a few questions : 1) Do I have to

Re: [HACKERS] GSoC 2014

2014-03-12 Thread Atri Sharma
On Wed, Mar 12, 2014 at 8:05 PM, Ashutosh Dhundhara ashutoshdhundh...@yahoo.com wrote: Hello all, I am Ashutosh Dhundhara from Thapat University, Patiala-India presently pursuing Bachelors degree in Computer Science and Engineering. This year I wish to work for PostgreSQL under the flagship

Re: [HACKERS] Patch: show relation and tuple infos of a lock to acquire

2014-03-12 Thread Robert Haas
On Tue, Mar 11, 2014 at 3:53 AM, Amit Kapila amit.kapil...@gmail.com wrote: Places where tuple info not available LOG: process 5788 still waiting for ShareLock on transaction 679 after 1014.000 ms CONTEXT: while attempting to operate in relation public.idx_t1 of database postgres The

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Oleg Bartunov
Also, GiST index is faster for create/update operations. I really hope we will improve jsonb indexing in the next one-two releases. For now I'd suggest people index expressional indexes to index just interesting keys or use GiST. On Wed, Mar 12, 2014 at 5:15 PM, Tomas Vondra t...@fuzzy.cz wrote:

[HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
All: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and realized there was something which had completely escaped me in the pre-commit discussion: select pg_drop_replication_slot('slot_1');

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Josh Berkus
On 03/12/2014 11:40 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 03/12/2014 02:09 PM, Josh Berkus wrote: Well, if you really want my I want a pony list: Local superusers (maybe this concept needs another name) would be able to do the following things in a *single*

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and realized there was something which had completely escaped me in the pre-commit

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Stephen Frost
* Josh Berkus (j...@agliodbs.com) wrote: On 03/12/2014 11:25 AM, Stephen Frost wrote: * Josh Berkus (j...@agliodbs.com) wrote: Local superusers (maybe this concept needs another name) would be able to do the following things in a *single* database: 1 change permissions for other users

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:03 PM, Andres Freund wrote: Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and realized there was something which

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
On 2014-03-12 15:18:04 -0400, Robert Haas wrote: On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's explanation of replication slots

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
On 2014-03-12 12:23:01 -0700, Josh Berkus wrote: On 03/12/2014 12:03 PM, Andres Freund wrote: Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's explanation of replication slots

Re: [HACKERS] Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease

2014-03-12 Thread Andres Freund
On 2014-03-07 17:54:32 +0200, Heikki Linnakangas wrote: So there are some unexplained differences there, but based on these results, I'm still OK with committing the patch. So, I am looking at this right now. I think there are some minor things I'd like to see addressed: 1) I think there

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 3:25 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-12 15:18:04 -0400, Robert Haas wrote: On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: I was just reading Michael's

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Peter Geoghegan
On Wed, Mar 12, 2014 at 6:20 AM, Tomas Vondra t...@fuzzy.cz wrote: I'm still not sure how would that look. Does that mean I'd have to create multiple GIN indexes - one for each possible key or something like that? Can you give an example? It could mean that you're obliged to create multiple

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Peter Geoghegan
On Wed, Mar 12, 2014 at 11:57 AM, Oleg Bartunov obartu...@gmail.com wrote: Also, GiST index is faster for create/update operations. I really hope we will improve jsonb indexing in the next one-two releases. For now I'd suggest people index expressional indexes to index just interesting keys

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:26 PM, Andres Freund wrote: On 2014-03-12 12:23:01 -0700, Josh Berkus wrote: On 03/12/2014 12:03 PM, Andres Freund wrote: It seems like there's no way for a DBA to drop slots from the master if it's rapidly running out of disk WAL space without doing a restart, and there's no

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:34 PM, Robert Haas wrote: Urgh. That error message looks susceptible to improvement. How about: replication slot %s cannot be dropped because it is currently in use I think that'd require duplicating some code between acquire and drop, but how about replication slot

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Oleg Bartunov
On Thu, Mar 13, 2014 at 12:10 AM, Peter Geoghegan p...@heroku.com wrote: On Wed, Mar 12, 2014 at 11:57 AM, Oleg Bartunov obartu...@gmail.com wrote: Also, GiST index is faster for create/update operations. I really hope we will improve jsonb indexing in the next one-two releases. For now I'd

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Andrew Dunstan
On 03/12/2014 04:10 PM, Peter Geoghegan wrote: On Wed, Mar 12, 2014 at 11:57 AM, Oleg Bartunov obartu...@gmail.com wrote: Also, GiST index is faster for create/update operations. I really hope we will improve jsonb indexing in the next one-two releases. For now I'd suggest people index

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Thom Brown
On 12 March 2014 19:00, Josh Berkus j...@agliodbs.com wrote: All: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and realized there was something which had completely escaped me in the

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Josh Berkus
Andrew, Peter: Just so I'm clear on the limits here, lemme make sure I understand this: a) GIN indexing is limited to ~~1500chars b) The value, which includes everything other than the top level set of keys, is one item as far as GIN is concerned. Therefore: we are limited to indexing JSON

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Peter Geoghegan
On Wed, Mar 12, 2014 at 1:37 PM, Andrew Dunstan and...@dunslane.net wrote: One major use case for using treeish data types in the first place is that you don't know when you're designing the database exactly what shape the data will be. If you don't know that, then how are you supposed to know

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Andrew Dunstan
On 03/12/2014 04:58 PM, Peter Geoghegan wrote: In any case, let's focus on what we have right now. I think that the indexing facilities proposed here are solid. In any case they do not preclude working on better indexing strategies as the need emerges. I quite agree, didn't mean to suggest

Re: [HACKERS] 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..

2014-03-12 Thread Rukh Meski
Hi, Here's an updated patch.  I had to push the LIMIT processing into ModifyTable to make the behaviour sane in parallel scenarios.  As usual, please ignore if you're busy with 9.4.  I will work on better docs and more tests from now on and am preparing to make a solid case for adding this.

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12.3.2014 20:40, Peter Geoghegan wrote: On Wed, Mar 12, 2014 at 6:20 AM, Tomas Vondra t...@fuzzy.cz wrote: I'm still not sure how would that look. Does that mean I'd have to create multiple GIN indexes - one for each possible key or something like that? Can you give an example? It could

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2014-03-12 Thread Heikki Linnakangas
On 03/04/2014 01:58 PM, Amit Kapila wrote: On Mon, Mar 3, 2014 at 7:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 02/16/2014 01:51 PM, Amit Kapila wrote: On Wed, Feb 5, 2014 at 5:29 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Thanks. I have to agree with Robert

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12.3.2014 21:58, Peter Geoghegan wrote: The use case you describe here doesn't sound like something similar to full text search. It sounds like something identical. I think this very depends on the definition of full text search. In any case, let's focus on what we have right now. I

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Peter Geoghegan
On Wed, Mar 12, 2014 at 2:30 PM, Tomas Vondra t...@fuzzy.cz wrote: I think that's unfounded assumption. Many users actually have very little control over the documents or queries - a nice example may be the mail archive, with headers stored in a hstore/jsonb. I have absolutely no control over

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12.3.2014 21:55, Josh Berkus wrote: Andrew, Peter: Just so I'm clear on the limits here, lemme make sure I understand this: a) GIN indexing is limited to ~~1500chars The exact message I get is this: ERROR: index row size 1944 exceeds maximum 1352 for index tmp_idx so it's 1352B. But

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Stephen Frost
* Tomas Vondra (t...@fuzzy.cz) wrote: So I think it's quite difficult to give simple and exact explanation in the docs, other than there are limits, but it's difficult to say when you hit them. Arrays have more-or-less the same issue... Thanks, Stephen signature.asc

Re: [HACKERS] jsonb and nested hstore

2014-03-12 Thread Tomas Vondra
On 12.3.2014 22:43, Peter Geoghegan wrote: On Wed, Mar 12, 2014 at 2:30 PM, Tomas Vondra t...@fuzzy.cz wrote: I think that's unfounded assumption. Many users actually have very little control over the documents or queries - a nice example may be the mail archive, with headers stored in a

Re: [HACKERS] 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..

2014-03-12 Thread Rukh Meski
Oops.  Of course shouldn't try and change how INSERT works.  Latest version attached. ♜ update_delete_order_by_limit_v2.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [PATCH] Store Extension Options

2014-03-12 Thread Robert Haas
On Mon, Mar 10, 2014 at 9:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I haven't touched pg_dump yet, but if this proposed design sits well with everyone, my intention is that the dump output will contain the pg_register_option_namespace() calls necessary so that a table definition

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 5:30 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Ok, great. Committed! Awesome. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Michael Paquier
On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown t...@linux.com wrote: On 12 March 2014 19:00, Josh Berkus j...@agliodbs.com wrote: All: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and

Re: [HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Michael Paquier
On Wed, Mar 12, 2014 at 11:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Julien Tachoires julien.tachoi...@dalibo.com writes: A customer has reported us a strange behaviour regarding a rowtype column with a domain subfield: Rowtypes in general do not support defaults for component fields. And

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-03-12 Thread Christian Kruse
Hi, On 13/03/14 03:27, Fujii Masao wrote: Committed! Thank you very much! Best regards, -- Christian Kruse http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services pgpkDoVMmXIL4.pgp Description: PGP signature

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 9:19 AM, Andres Freund and...@2ndquadrant.com wrote: Isn't this just a case of creating a suitable operator and an exclusion constraint? Defining the constraint in BKI might require extra infrastructure, but it should be possible. Except that we don't have the

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Thom Brown
On 12 March 2014 23:17, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown t...@linux.com wrote: On 12 March 2014 19:00, Josh Berkus j...@agliodbs.com wrote: All: I was just reading Michael's explanation of replication slots

[HACKERS] 9a57858f1103b89a5674f0d50c5fe1f756411df6

2014-03-12 Thread Robert Haas
On the pgsql-packagers list, there has been some (OT for that list) discussion of whether commit 9a57858f1103b89a5674f0d50c5fe1f756411df6 is sufficiently serious to justify yet another immediate minor release of 9.3.x. The relevant questions seem to be: 1. Is it really bad? 2. Does it affect a

Re: [HACKERS] Postgresql XML parsing

2014-03-12 Thread Kyotaro HORIGUCHI
Hello, On 03/12/2014 09:36 AM, Ashoke wrote: Hi, I am working on adding a functionality to PostgreSQL. I need to parse the XML format query plan (produced by PostgreSQL v9.3) and save it in a simple data structure (say C structure). I was wondering if ... The only XML parsing

Re: [HACKERS] [PATCH] Store Extension Options

2014-03-12 Thread Josh Berkus
On 03/12/2014 03:58 PM, Robert Haas wrote: I don't like the idea of using reloptions to let people attach arbitrary unvalidated settings to tables. I consider the way things work with GUCs to be a bug, not a feature, and definitely not something I want to propagate into every other area of

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 04:52 PM, Thom Brown wrote: On 12 March 2014 23:17, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown t...@linux.com wrote: I'm not clear on why would dropping an active replication slot would solve disk space problems related to WAL. I

Re: [HACKERS] db_user_namespace a temporary measure

2014-03-12 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Mar 12, 2014 at 9:19 AM, Andres Freund and...@2ndquadrant.com wrote: Except that we don't have the infrastructure to perform such checks (neither partial, nor expression indexes, no exclusion constraints) on system tables atm. So it's not a

  1   2   >