Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-12-24 Thread Thomas Munro
On Fri, Dec 25, 2015 at 8:50 AM, Masahiko Sawada wrote: > On Wed, Dec 23, 2015 at 8:45 AM, Thomas Munro > wrote: >> On Wed, Dec 23, 2015 at 3:50 PM, Thomas Munro >> wrote: >>> If you got rid of

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2015-12-24 Thread Kyotaro HORIGUCHI
Hello, At Thu, 24 Dec 2015 07:40:19 +0100 (CET), Fabien COELHO wrote in > > Hello Michaƫl, > > >> If I read you correctly, I should cut it out into a new file and > >> include it. Is it correct? > > > > Not really, I meant to see

Re: [HACKERS] Combining Aggregates

2015-12-24 Thread Robert Haas
On Mon, Dec 21, 2015 at 4:53 PM, David Rowley wrote: > On 22 December 2015 at 01:30, Robert Haas wrote: >> Can we use Tom's expanded-object stuff instead of introducing >> aggserialfn and aggdeserialfn? In other words, if you have a >>

Re: [HACKERS] missing "SPI_finish" that isn't missing

2015-12-24 Thread Tom Lane
Chapman Flack writes: > I probably just need to learn the right coding pattern for this. > What is it? You can't just ignore a thrown error like that. What you'd have to do to make this coding pattern work is to set up a subtransaction, and either commit it in the success

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-12-24 Thread Corey Huinker
On Wed, Dec 23, 2015 at 3:08 PM, Jim Nasby wrote: > On 12/23/15 12:15 PM, Corey Huinker wrote: > >> That's fair. I'm still at a loss for how to show that the fetch size was >> respected by the remote server, suggestions welcome! >> > > A combination of repeat() and

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2015-12-24 Thread Robert Haas
On Wed, Dec 23, 2015 at 1:16 AM, Amit Kapila wrote: > On Tue, Dec 22, 2015 at 10:43 PM, Robert Haas wrote: >> >> On Mon, Dec 21, 2015 at 1:27 AM, Amit Kapila >> wrote: >> > On Fri, Dec 18, 2015 at 9:58 PM, Robert Haas

Re: [HACKERS] BRIN cost estimate

2015-12-24 Thread Emre Hasegeli
> The patch is attached. Now, it is actually attached. brin-correlation-v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Comment typo in pg_dump.h

2015-12-24 Thread Amit Langote
On 2015/12/25 0:44, Tom Lane wrote: > Amit Langote writes: >> Attached fixes the following comment typo (copy-pasto): >> -Oid toast_oid; /* for restore toast frozen xid */ >> +Oid toast_oid; /* for restore toast table oid */ > >

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-12-24 Thread Kyotaro HORIGUCHI
Hello, At Thu, 24 Dec 2015 18:31:42 -0500, Corey Huinker wrote in

[HACKERS] MergeAttributes type (mod) conflict error detail

2015-12-24 Thread Amit Langote
I wonder if the following error detail text could say more than it does currently for the following rather artificial example case: CREATE TABLE p1(a char(3)); CREATE TABLE p2(a char(2)); CREATE TABLE c(d int) INHERITS (p1, p2); NOTICE: merging multiple inherited definitions of column "a"

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-12-24 Thread Masahiko Sawada
On Wed, Dec 23, 2015 at 8:45 AM, Thomas Munro wrote: > On Wed, Dec 23, 2015 at 3:50 PM, Thomas Munro > wrote: >> On Fri, Dec 18, 2015 at 7:38 AM, Masahiko Sawada >> wrote: >>

[HACKERS] ALTER ROLE SET/RESET for multiple options

2015-12-24 Thread Masahiko Sawada
Hi all, ALTER ROLE SET/RESET can set/reset only one GUC parameter per one SQL today. So when we need to set/reset multiple GUC parameter to user, it would be burdensome work. I'd like propose feature makes ALTER ROLE SET/RESET can set/reset multiple options like ALTER TABLE. ALTER USER is as

Re: [HACKERS] Spurious standby query cancellations

2015-12-24 Thread Jeff Janes
On Wed, Dec 23, 2015 at 9:40 PM, Jeff Janes wrote: > On Wed, Sep 23, 2015 at 11:33 PM, Jeff Janes wrote: >> >> On further thought, neither do I. The attached patch inverts >> ResolveRecoveryConflictWithLock to be called back from the lmgr code so that

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Gavin Flower
On 25/12/15 01:45, Michael Paquier wrote: [...] And the CF is no closed. Here is the final score: Committed: 30. Moved to next CF: 42. Rejected: 9. Returned with Feedback: 22. Total: 103. Regards, You didn't say how may regards... [More seriously] Many thanks to you, and the other Postgres

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Tomas Vondra
On 12/24/2015 04:18 PM, Tom Lane wrote: Michael Paquier writes: And the CF is no closed. Here is the final score: Committed: 30. Moved to next CF: 42. Rejected: 9. Returned with Feedback: 22. Total: 103. Many thanks to Michael for doing the CF management work

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Alexander Korotkov
On Thu, Dec 24, 2015 at 6:18 PM, Tom Lane wrote: > Michael Paquier writes: > > And the CF is no closed. Here is the final score: > > Committed: 30. > > Moved to next CF: 42. > > Rejected: 9. > > Returned with Feedback: 22. > > Total: 103. > > Many

Re: [HACKERS] WIP: bloom filter in Hash Joins with batches

2015-12-24 Thread Tomas Vondra
On 12/24/2015 02:51 PM, Simon Riggs wrote: On 17 December 2015 at 16:00, Tomas Vondra > wrote: On 12/17/2015 11:44 AM, Simon Riggs wrote: My understanding is that the bloom filter would be ineffective in

[HACKERS] missing "SPI_finish" that isn't missing

2015-12-24 Thread Chapman Flack
I probably just need to learn the right coding pattern for this. What is it? What I want this code to do: a) If there is a table 'mytable', set theSavedStuff to a pstrdup'd in TopMemoryContext copy of column s from one row if present. b) In case of an error because there is no table

Re: [HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-24 Thread Alexander Korotkov
Hi, Christophe! On Thu, Dec 24, 2015 at 6:28 PM, Fornaroli Christophe wrote: > This code uses this upper bound for the similarity: ntrue / (nkeys - > ntrue). But if there is ntrue trigrams in common, we know that the indexed > string is at least ntrue trigrams long. We can

Re: [HACKERS] Remove Windows crash dump support?

2015-12-24 Thread Dave Page
On Thu, Dec 24, 2015 at 2:14 AM, Craig Ringer wrote: > On 22 December 2015 at 23:48, Alex Ignatov wrote: > >> >> I think that you can debug crash dump since windbg exists. > > > Nobody in their right mind uses windbg though. Visual Studio is

Re: [HACKERS] Patch: ResourceOwner optimization for tables with many partitions

2015-12-24 Thread Aleksander Alekseev
Oops, wrong patches - here are correct ones.diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c index 0e7acbf..3330c8d 100644 --- a/src/backend/utils/resowner/resowner.c +++ b/src/backend/utils/resowner/resowner.c @@ -29,6 +29,156 @@ #include

[HACKERS] Comment typo in pg_dump.h

2015-12-24 Thread Amit Langote
Attached fixes the following comment typo (copy-pasto): -Oid toast_oid; /* for restore toast frozen xid */ +Oid toast_oid; /* for restore toast table oid */ Thanks, Amit diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 3c64a82..9c63abd

Re: [HACKERS] Patch: ResourceOwner optimization for tables with many partitions

2015-12-24 Thread Aleksander Alekseev
I believe I fixed all flaws mentioned so far (see attachment). Also I did a new benchmark to make sure that new patch makes PostgreSQL work faster and doesn't cause performance degradation in some cases. "usual pgbench" row corresponds to `pgbench -j 8 -c 8 -T 30 pgbench` performed on a 4-core

Re: [HACKERS] BRIN cost estimate

2015-12-24 Thread Emre Hasegeli
> Somebody wrote to me a few days ago that the BRIN cost estimation is > rather poor. One immediately obvious issue which I think is easily > fixed is the correlation estimate, which is currently hardcoded to 1. > > Since a BRIN scan always entails a scan of the relation in physical > order, it's

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2015-12-24 Thread Ildus Kurbangaliev
On Tue, 15 Dec 2015 13:56:30 -0500 Robert Haas wrote: > On Sun, Dec 13, 2015 at 6:35 AM, and...@anarazel.de > wrote: > > On 2015-12-12 21:15:52 -0500, Robert Haas wrote: > >> On Sat, Dec 12, 2015 at 1:17 PM, and...@anarazel.de > >>

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-12-24 Thread Ashutosh Bapat
On Thu, Dec 24, 2015 at 8:32 AM, Michael Paquier wrote: > On Mon, Nov 9, 2015 at 8:55 PM, Ashutosh Bapat > wrote: > > > > > > On Sat, Nov 7, 2015 at 12:07 AM, Robert Haas > wrote: > >> > >> On Wed, Aug 12, 2015

Re: [HACKERS] WIP: bloom filter in Hash Joins with batches

2015-12-24 Thread Aleksander Alekseev
Hello, Tomas. Great idea! Did you consider to cache bloom filter or at least part(s) of it somehow? I think this way we could gain some more TPS. This of course assuming that creating a bloom filter is really a bottleneck here, which would be nice be investigated first. Best regards, Aleksander

Re: [HACKERS] Review: GiST support for UUIDs

2015-12-24 Thread Ildus Kurbangaliev
On Wed, 23 Dec 2015 16:36:23 -0800 Paul Jungwirth wrote: > On 12/23/2015 08:10 AM, Ildus Kurbangaliev wrote: > > There is a more improved version of the patch. Main idea is to > > present uuid as two uint64 values, and make comparisons and penalty > > calculation

Re: [HACKERS] WIP: bloom filter in Hash Joins with batches

2015-12-24 Thread Simon Riggs
On 17 December 2015 at 16:00, Tomas Vondra wrote: > On 12/17/2015 11:44 AM, Simon Riggs wrote: > >> >> My understanding is that the bloom filter would be ineffective in any of >> these cases >> * Hash table is too small >> > > Yes, although it depends what you mean

Re: [HACKERS] [PROPOSAL] Backup and recovery of pg_statistic

2015-12-24 Thread Dmitry Ivanov
> There's still the problem that it won't work across a major version > upgrade that makes any change whatsoever to the rowtype of pg_statistic. I'm sorry if my previous explanation was poor, this time I am going to be detailed. Suppose you want to upgrade from 9.4 to 9.6. In that case you

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-12-24 Thread Michael Paquier
On Thu, Dec 24, 2015 at 7:03 PM, Ashutosh Bapat wrote: > On Thu, Dec 24, 2015 at 8:32 AM, Michael Paquier >> Ashutosh, others, this thread has been stalling for more than 1 month >> and a half. There is a new patch that still applies

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Michael Paquier
On Thu, Dec 24, 2015 at 12:09 PM, Michael Paquier wrote: > On Tue, Dec 22, 2015 at 10:45 PM, Michael Paquier > wrote: >> On Tue, Dec 22, 2015 at 4:04 PM, Michael Paquier >> wrote: >>> OK, if those don't get

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Tom Lane
Michael Paquier writes: > And the CF is no closed. Here is the final score: > Committed: 30. > Moved to next CF: 42. > Rejected: 9. > Returned with Feedback: 22. > Total: 103. Many thanks to Michael for doing the CF management work this time!

Re: [HACKERS] Comment typo in pg_dump.h

2015-12-24 Thread Tom Lane
Amit Langote writes: > Attached fixes the following comment typo (copy-pasto): > -Oid toast_oid; /* for restore toast frozen xid */ > +Oid toast_oid; /* for restore toast table oid */ That comment needs more help than just that

Re: [HACKERS] Typo in pg_rewind.sgml

2015-12-24 Thread Tom Lane
Michael Paquier writes: > I just bumped into the following typo that has been introduced by e50cda7: Pushed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] Row level security (RLS) for updatable views

2015-12-24 Thread Caleb Meredith
There should be a way to do separate read/write security barriers for updatable views. I'll start by addressing the problem, state some potential solutions with the current software, and finally end with 2 proposals to solve the problem in the best way possible. ## Problem I want the user to see

[HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-24 Thread Fornaroli Christophe
Hi, I think that we can improve the gin index scan performance for similarity search defined in the pg_trgm extension. The similarity function is (for the default case where DIVUNION is defined in the code): count / (len1 + len2 - count) >= trgm_limit where len1 is the number of