Re: [HACKERS] Getting sorted data from foreign server

2015-10-21 Thread Ashutosh Bapat
Here's patch with the regression fixed. On Wed, Oct 21, 2015 at 2:53 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > > On Fri, Oct 16, 2015 at 11:33 PM, Robert Haas > wrote: > >> On Thu, Oct 15, 2015 at 6:28 AM, Ashutosh Bapat >>

Re: [HACKERS] checkpointer continuous flushing

2015-10-21 Thread Andres Freund
On 2015-10-21 07:49:23 +0200, Fabien COELHO wrote: > > Hello Andres, > > >>>In my performance testing it showed that calling PerformFileFlush() only > >>>at segment boundaries and in CheckpointWriteDelay() can lead to rather > >>>spikey IO - not that surprisingly. The sync in

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

2015-10-21 Thread Masahiko Sawada
On Tue, Oct 20, 2015 at 8:10 PM, Beena Emerson wrote: > > On Mon, Oct 19, 2015 at 8:47 PM, Masahiko Sawada > wrote: >> >> >> Hi, >> >> Attached patch is a rough patch which supports multi sync replication >> by another approach I sent before. >> >>

Re: [HACKERS] [PATCH v3] GSSAPI encryption support

2015-10-21 Thread Robbie Harwood
Michael Paquier writes: > Robbie, > > +#ifdef ENABLE_GSS > + if (pggss_encrypt(conn) < 0) > + return EOF; > +#endif > > @@ -1528,10 +1541,20 @@ socket_putmessage(char msgtype, const char *s, > size_t len) > if (internal_putbytes(s, len)) >

[HACKERS] Suporting multiple recursive table reads

2015-10-21 Thread Wesley Massuda
I am trying to patch postgres to accept this query. A recursive query referencing the recursive table twice. By removing some checks it accepts the query and generates a plan. ### Query create table base(k1,k2,k3) as (values (1,null,null),(2,null,null),(3,1,2)); with recursive x(k1,k2,k3) as (

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-10-21 Thread Alvaro Herrera
Heikki Linnakangas wrote: > Thanks. For comparison, I wrote a patch to implement what I had in mind. > > When a WAL-skipping COPY begins, we add an entry for that relation in a > "pending-fsyncs" hash table. Whenever we perform any action on a heap that > would normally be WAL-logged, we check

Re: [HACKERS] [PATCH v3] GSSAPI encryption support

2015-10-21 Thread Robbie Harwood
Michael Paquier writes: > On Tue, Oct 20, 2015 at 3:01 AM, Robbie Harwood wrote: >> Stephen Frost writes: >>> psql: lost synchronization with server: got message type "S", length 22 >> >> which unfortunately could be a great many things. I've said

[HACKERS] Change behavior of (m)xid_age

2015-10-21 Thread Jim Nasby
Currently, xid_age() returns INT_MAX for a permanent xid. The comment in the function that 'Permanent XIDs are always infinitely old' may be technically correct, but returning INT_MAX is a useless behavior because it actually makes it look like that XID is in immediate wraparound danger. I

[HACKERS] Freezing without cleanup lock

2015-10-21 Thread Jim Nasby
While warning a client that just did a Slony-based version upgrade to make sure to freeze the new database, it occurred to me that it should be safe to freeze without the cleanup lock. This is interesting because it would allow a scan_all vacuum to do it's job without blocking on the cleanup

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Euler Taveira
On 20-10-2015 08:28, Bernd Helmle wrote: The 2nd assignment to slot_name looks unnecessary? Yes, it is. Seems to be an oversight. Patch attached. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

[HACKERS] Re: [BUGS] BUG #13694: Row Level Security by-passed with CREATEUSER permission

2015-10-21 Thread Joe Conway
On 10/21/2015 12:46 PM, Tom Lane wrote: > Attached patch rips out CREATEUSER and NOCREATEUSER options lock, stock, > and barrel. Looks good to me. > Another possibility is to change them to actually mean CREATEROLE and > NOCREATEROLE. I think probably a clean break is better though. I think

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Alvaro Herrera
Euler Taveira wrote: > It seems that the 2nd assignment was an oversight. Spotted by Bernd > Helmle. I think the first assignment is also pointless -- I mean can't we just use MyReplicationSlot->data.name in both places where slot_name is used? In the same routine, it seems wasteful to be doing

Re: [HACKERS] Freezing without cleanup lock

2015-10-21 Thread Tom Lane
Jim Nasby writes: > While warning a client that just did a Slony-based version upgrade to > make sure to freeze the new database, it occurred to me that it should > be safe to freeze without the cleanup lock. What's your argument for that being safe?

Re: [HACKERS] Freeze avoidance of very large table.

2015-10-21 Thread Alvaro Herrera
Jim Nasby wrote: > On 10/21/15 8:11 AM, Andres Freund wrote: > >Meh. Adding complexity definitely needs to be weighed against the > >benefits. As pointed out e.g. by all the multixact issues you mentioned > >upthread. In this case your argument for changing the name doesn't seem > >to hold much

Re: [HACKERS] [BUGS] BUG #13694: Row Level Security by-passed with CREATEUSER permission

2015-10-21 Thread Tom Lane
Joe Conway writes: > On 10/21/2015 11:26 AM, Andres Freund wrote: >> On 2015-10-21 11:17:44 -0700, Tom Lane wrote: >>> I wonder if it's time yet to remove those keywords. We've had the >>> SUPERUSER spelling since 8.1, and this report should remind us that >>> people get

Re: [HACKERS] Freezing without cleanup lock

2015-10-21 Thread Andres Freund
On October 21, 2015 9:47:45 PM GMT+02:00, Tom Lane wrote: >Jim Nasby writes: >> While warning a client that just did a Slony-based version upgrade to > >> make sure to freeze the new database, it occurred to me that it >should >> be safe to freeze

Re: [HACKERS] Freezing without cleanup lock

2015-10-21 Thread Alvaro Herrera
Jim Nasby wrote: > While warning a client that just did a Slony-based version upgrade to make > sure to freeze the new database, it occurred to me that it should be safe to > freeze without the cleanup lock. This is interesting because it would allow > a scan_all vacuum to do it's job without

Re: [HACKERS] pg_recvlogical fixes

2015-10-21 Thread Andres Freund
On 2015-10-21 11:52:31 -0300, Euler Taveira wrote: > While testing wal2json, I faced some problems with pg_recvlogical. Attached > is a serie of patches that can improve pg_recvlogical. Patches #2 and #3 are > bugfixes (and should be applied to 9.5 too). Patch #1 is not mandatory to > 9.5. > #1:

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Andres Freund
On 2015-10-21 17:21:25 -0300, Alvaro Herrera wrote: > > It seems that the 2nd assignment was an oversight. Spotted by Bernd > > Helmle. Yea, that's obviously redudant. Will remove. > I think the first assignment is also pointless -- I mean can't we just > use MyReplicationSlot->data.name in both

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-10-21 17:21:25 -0300, Alvaro Herrera wrote: > > I think the first assignment is also pointless -- I mean can't we just > > use MyReplicationSlot->data.name in both places where slot_name is used? > > Makes the lines a bit long.

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Alvaro Herrera
Andres Freund wrote: > That seems fairly insignificant. For one this is a rather infrequent and > expensive operation, for another every decent compiler can optimize > those away. Note that those duplicate strlen() calls are there in a lot > of places in walsender.c diff --git

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Andres Freund
On 2015-10-21 19:36:16 -0300, Alvaro Herrera wrote: > diff --git a/src/backend/replication/walsender.c > b/src/backend/replication/walsender.c > index c6043cd..5487cc0 100644 > --- a/src/backend/replication/walsender.c > +++ b/src/backend/replication/walsender.c > @@ -762,10 +762,10 @@

Re: [HACKERS] bugs and bug tracking

2015-10-21 Thread Thomas Munro
On Thu, Oct 22, 2015 at 2:04 AM, Nathan Wagner wrote: > https://granicus.if.org/pgbugs/ for anyone who hasn't and wants to take a > look. FYI There seems to be an encoding problem somewhere. "Đặng Minh Dũng" is showing up as "Đặng Minh DÅ©ng" on this page:

Re: [HACKERS] Duplicated assignment of slot_name in walsender.c

2015-10-21 Thread Tom Lane
Alvaro Herrera writes: > Andres Freund wrote: >> for another every decent compiler can optimize those away. Note that >> those duplicate strlen() calls are there in a lot of places in >> walsender.c > It can? Tom has repeatedly argue the opposite, in the past. I'm

Re: [HACKERS] September 2015 Commitfest

2015-10-21 Thread Michael Paquier
On Thu, Sep 3, 2015 at 10:06 PM, Andres Freund wrote: > To review (copying Heikki's message): > > 1. Pick a patch from the list at: > > https://commitfest.postgresql.org/6/ > > 2. Review it. Test it. Try to break it. Do we want the feature? Any > weird interactions in

Re: [HACKERS] WIP: Rework access method interface

2015-10-21 Thread Michael Paquier
On Thu, Oct 22, 2015 at 8:37 AM, Petr Jelinek wrote: > BTW I think this is ready for committer, except for the need to check docs > by native speaker. If so, could you update the entry of this patch accordingly? https://commitfest.postgresql.org/6/353/ -- Michael -- Sent via pgsql-hackers

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-10-21 Thread Jeff Janes
On Tue, Oct 20, 2015 at 7:02 AM, Robert Haas wrote: > On Sun, Oct 18, 2015 at 5:23 PM, Jeff Janes wrote: > > I'm planning on adding a todo item to have COPY FREEZE set > PD_ALL_VISIBLE. > > Or is there some reason this can't be done? > > > > Since

Re: [HACKERS] Freeze avoidance of very large table.

2015-10-21 Thread Jim Nasby
On 10/21/15 8:11 AM, Andres Freund wrote: Meh. Adding complexity definitely needs to be weighed against the benefits. As pointed out e.g. by all the multixact issues you mentioned upthread. In this case your argument for changing the name doesn't seem to hold much water. ISTM

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-10-21 Thread Michael Paquier
On Wed, Oct 21, 2015 at 11:53 PM, Alvaro Herrera wrote: > Heikki Linnakangas wrote: > >> Thanks. For comparison, I wrote a patch to implement what I had in mind. >> >> When a WAL-skipping COPY begins, we add an entry for that relation in a >> "pending-fsyncs" hash table.

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-10-21 Thread Thomas Munro
Here is a new version merging the recent CREATE EXTENSION ... VERSION patch from master. (Apologies for sending so many versions. tab-complete.c keeps moving and I want to keep a version that applies on top of master out there, for anyone interested in looking at this. As long as no one objects

Re: [HACKERS] On columnar storage (2)

2015-10-21 Thread Haribabu Kommi
On Tue, Sep 1, 2015 at 8:53 AM, Alvaro Herrera wrote: > As discussed in > https://www.postgresql.org/message-id/20150611230316.gm133...@postgresql.org > we've been working on implementing columnar storage for Postgres. > Here's some initial code to show our general idea,

[HACKERS] pg_recvlogical fixes

2015-10-21 Thread Euler Taveira
Hi, While testing wal2json, I faced some problems with pg_recvlogical. Attached is a serie of patches that can improve pg_recvlogical. Patches #2 and #3 are bugfixes (and should be applied to 9.5 too). Patch #1 is not mandatory to 9.5. Short description: #1: add a bunch of checks to

Re: [HACKERS] WIP: Rework access method interface

2015-10-21 Thread Petr Jelinek
On 2015-10-12 14:32, Alexander Korotkov wrote: Also, it was planned that documentation changes would be reviewed by native english speaker. BTW I think this is ready for committer, except for the need to check docs by native speaker. -- Petr Jelinek

Re: [HACKERS] WIP: Rework access method interface

2015-10-21 Thread Tom Lane
Petr Jelinek writes: > On 2015-10-12 14:32, Alexander Korotkov wrote: >> Also, it was planned that documentation changes would be reviewed by >> native english speaker. > BTW I think this is ready for committer, except for the need to check > docs by native speaker. I'm

Re: [HACKERS] a raft of parallelism-related bug fixes

2015-10-21 Thread Amit Kapila
On Tue, Oct 20, 2015 at 8:16 PM, Robert Haas wrote: > > On Sat, Oct 17, 2015 at 6:17 PM, Robert Haas wrote: > > It's good to have your perspective on how this can be improved, and > > I'm definitely willing to write more documentation. Any lack in

Re: [HACKERS] a raft of parallelism-related bug fixes

2015-10-21 Thread Amit Langote
On Wednesday, 21 October 2015, Amit Kapila wrote: > On Tue, Oct 20, 2015 at 8:16 PM, Robert Haas > wrote: > > > > On Sat, Oct 17, 2015 at 6:17 PM, Robert Haas

Re: [HACKERS] bugs and bug tracking

2015-10-21 Thread Nathan Wagner
On Tue, Oct 20, 2015 at 10:39:55AM -0700, Joshua D. Drake wrote: > So where are we at on this? Well, I can't speak to where we are, but my system is up, running, and seems to work well, It even attracts a few visitors. I have been meaning to write a triage interface, but I have been stuck doing

Re: [HACKERS] Freeze avoidance of very large table.

2015-10-21 Thread Andres Freund
On 2015-10-20 20:35:31 -0400, Simon Riggs wrote: > On 9 October 2015 at 15:20, Robert Haas wrote: > > > On Thu, Oct 8, 2015 at 1:52 PM, Andres Freund wrote: > > > I don't see the problem? I mean catversion will reliably tell you which > > format the vm

Re: [HACKERS] [PATCH v3] GSSAPI encryption support

2015-10-21 Thread Michael Paquier
On Tue, Oct 20, 2015 at 3:01 AM, Robbie Harwood wrote: > Stephen Frost writes: >> psql: lost synchronization with server: got message type "S", length 22 > > which unfortunately could be a great many things. I've said this a > couple times now, but I really do need more

Re: [HACKERS] Getting sorted data from foreign server

2015-10-21 Thread Ashutosh Bapat
On Fri, Oct 16, 2015 at 11:33 PM, Robert Haas wrote: > On Thu, Oct 15, 2015 at 6:28 AM, Ashutosh Bapat > wrote: > > Attached is the patch which takes care of above comments. > > I spent some time on this patch today. But it's still not

[HACKERS] Patch (2): Implement failover on libpq connect level.

2015-10-21 Thread Victor Wagner
On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote: > > Attached patch which implements client library failover and > loadbalancing as was described in the proposal > <20150818041850.ga5...@wagner.pp.ru>. > I'm sending imporoved verison of patch. As Olexander Shulgin noted, previous version

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-21 Thread Artur Zakirov
21.10.2015 01:37, Jim Nasby пишет: On 10/20/15 9:00 AM, Artur Zakirov wrote: Internal representation of the dictionary in the PostgreSQL doesn't impose too strict limits on the number of affix rules. There are a flagval array, which size must be increased from 256 to 65000. Is that per

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-21 Thread Etsuro Fujita
On 2015/10/21 13:34, Kouhei Kaigai wrote: On 2015/10/20 13:11, Etsuro Fujita wrote: On 2015/10/20 5:34, Robert Haas wrote: No. You just need to populate fdw_recheck_quals correctly, same as for the scan case. As I said yesterday, that opinion of me is completely wrong. Sorry for the

Re: [HACKERS] [Proposal] Table partition + join pushdown

2015-10-21 Thread Taiki Kondo
Hello, KaiGai-san and Horiguchi-san. I created v2 patch. Please find attached. I believe this patch will fix the most of issues mentioned by Horiguchi-san except naming. In this v2 patch, scan node which is originally inner relation of Join node must be SeqScan (or SampleScan). This limitation

Re: [HACKERS] [PATCH v3] GSSAPI encryption support

2015-10-21 Thread Michael Paquier
Robbie, On Wed, Oct 21, 2015 at 3:54 PM, Michael Paquier wrote: > On Tue, Oct 20, 2015 at 3:01 AM, Robbie Harwood wrote: >> Stephen Frost writes: >>> psql: lost synchronization with server: got message type "S", length 22 >> >> which unfortunately