Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-27 Thread Michael Paquier
On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa wrote: > On 25/05/17 17:17, Michael Paquier wrote: >> Please find attached a patch to add support for channel binding for >> SCRAM, to mitigate MITM attacks using this protocol. Per RFC5802 >> (https://tools.ietf.org/html/rfc5802), servers

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-27 Thread Michael Paquier
On Fri, May 26, 2017 at 4:47 PM, Peter Eisentraut wrote: > On 5/26/17 14:16, Michael Paquier wrote: >> So, now that the last round of minor releases has happened and that >> some dust has settled on this patch, shouldn't there be a backpatch? >> If yes, do you need patches for all branches? This p

[HACKERS] execGrouping.c limit on work_mem

2017-05-27 Thread Jeff Janes
In BuildTupleHashTable /* Limit initial table size request to not more than work_mem */ nbuckets = Min(nbuckets, (long) ((work_mem * 1024L) / entrysize)); Is this a good idea? If the caller of this code has no respect for work_mem, they are still going to blow it out of the water. Now

[HACKERS] simplehash.h typo

2017-05-27 Thread Jeff Janes
/* round up size to the next power of 2, that's the bucketing works */ That should probably be "that's the **way** bucketing works". Or maybe it is an idiom I don't grok. Cheers, Jeff

Re: [HACKERS] Broken hint bits (freeze)

2017-05-27 Thread Michael Paquier
On Sat, May 27, 2017 at 12:56 PM, Andres Freund wrote: > On 2017-05-27 19:48:24 +0300, Vladimir Borodin wrote: >> Well, actually clean shutdown of master with exit code 0 from `pg_ctl >> stop -m fast` guarantees that all WAL has been replicated to standby. > > It does not. It makes it likely, but

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Erik Rijkers
On 2017-05-28 01:15, Mark Kirkwood wrote: Also, any idea which rows are different? If you want something out of the box that will do that for you see DBIx::Compare. I used to save the content-diffs too but in the end decided they were useless (to me, anyway). -- Sent via pgsql-hackers mail

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Erik Rijkers
On 2017-05-28 01:21, Mark Kirkwood wrote: Sorry - I see you have done this already. On 28/05/17 11:15, Mark Kirkwood wrote: Interesting - might be good to see your test script too (so we can better understand how you are deciding if the runs are successful or not). Yes, in pgbench_derail2.s

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Mark Kirkwood
Sorry - I see you have done this already. On 28/05/17 11:15, Mark Kirkwood wrote: Interesting - might be good to see your test script too (so we can better understand how you are deciding if the runs are successful or not). -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Mark Kirkwood
Interesting - might be good to see your test script too (so we can better understand how you are deciding if the runs are successful or not). Also, any idea which rows are different? If you want something out of the box that will do that for you see DBIx::Compare. regards Mark On 28/05/17

Re: [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-27 Thread Álvaro Hernández Tortosa
[cross-posting to pgjdbc] On 25/05/17 17:17, Michael Paquier wrote: Hi all, Please find attached a patch to add support for channel binding for SCRAM, to mitigate MITM attacks using this protocol. Per RFC5802 (https://tools.ietf.org/html/rfc5802), servers supporting channel binding need to ad

Re: [HACKERS] Surjective functional indexes

2017-05-27 Thread Peter Eisentraut
On 5/25/17 12:30, Konstantin Knizhnik wrote: > Functions like (info->>'name') are named "surjective" ni mathematics. A surjective function is one where each value in the output type can be obtained by some input value. That's not what you are after here. The behavior you are describing is a not-

Re: [HACKERS] Extra Vietnamese unaccent rules

2017-05-27 Thread Kha Nguyen
Does this mean that the python script has to be updated to be recursive too? > On 27 May 2017, at 0.48, Thomas Munro wrote: > > On Sat, May 27, 2017 at 9:09 AM, Kha Nguyen wrote: >> Could you explain to me what this line means: >> “ >> 1EA5;LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE;Ll;0;L;

Re: [HACKERS] Extra Vietnamese unaccent rules

2017-05-27 Thread Kha Nguyen
Could you explain to me what this line means: “ 1EA5;LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00E2 0301N;;;1EA4;;1EA4 “ If you could give me an example of adding a rule for “recursive” case, I can do the rest. I am not familiar with this unaccent format generation yet. Thanks Kh

Re: [HACKERS] Broken hint bits (freeze)

2017-05-27 Thread Vladimir Borodin
> 27 мая 2017 г., в 19:56, Andres Freund написал(а): > > On 2017-05-27 19:48:24 +0300, Vladimir Borodin wrote: >> Well, actually clean shutdown of master with exit code 0 from `pg_ctl >> stop -m fast` guarantees that all WAL has been replicated to standby. > > It does not. It makes it likely,

Re: [HACKERS] Broken hint bits (freeze)

2017-05-27 Thread Andres Freund
On 2017-05-27 19:48:24 +0300, Vladimir Borodin wrote: > Well, actually clean shutdown of master with exit code 0 from `pg_ctl > stop -m fast` guarantees that all WAL has been replicated to standby. It does not. It makes it likely, but the connection to the standby could be not up just then, you c

Re: [HACKERS] Broken hint bits (freeze)

2017-05-27 Thread Vladimir Borodin
> 26 мая 2017 г., в 21:39, Amit Kapila написал(а): > >> And LSN on replica is greater that LSN on master (838D/C4A0D280 > >> 8092/6A26DD08) >> How can this be possible? >> > > Yeah, I think this is quite suspicious. This seems to indicate that > not all WAL records are replicated before the

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Erik Rijkers
On 2017-05-27 17:11, Andres Freund wrote: On May 27, 2017 6:13:19 AM EDT, Simon Riggs wrote: On 27 May 2017 at 09:44, Erik Rijkers wrote: I am very curious at your results. We take your bug report on good faith, but we still haven't seen details of the problem or how to recreate it. Pleas

Re: [HACKERS] logical replication busy-waiting on a lock

2017-05-27 Thread Andres Freund
On May 27, 2017 9:48:22 AM EDT, Petr Jelinek wrote: >Actually, I guess it's the pid 47457 (COPY process) who is actually >running the xid 73322726. In that case that's the same thing Masahiko >Sawada reported [1]. Which basically is result of snapshot builder >waiting for transaction to finish,

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Andres Freund
On May 27, 2017 6:13:19 AM EDT, Simon Riggs wrote: >On 27 May 2017 at 09:44, Erik Rijkers wrote: > >> I am very curious at your results. > >We take your bug report on good faith, but we still haven't seen >details of the problem or how to recreate it. > >Please post some details. Thanks. ? --

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-05-27 Thread Thomas Munro
On Tue, May 23, 2017 at 10:42 PM, Mahi Gurram wrote: > Hello everyone, > > I'm building In-Memory index extension for Postgres, for which i'm trying to > use DSA. But ended with some issues, as it is not allowing me to create > DSA(Dynamic Shared Area) in _PG_init function. > > Please refer my_PG_

Re: [HACKERS] logical replication busy-waiting on a lock

2017-05-27 Thread Petr Jelinek
On 27/05/17 15:44, Petr Jelinek wrote: > On 27/05/17 01:25, Jeff Janes wrote: >> When I create a subscription in the disabled state, and then later doing >> "alter subscription sub enable;", on the master I sometimes get a tight >> loop of the deadlock detector: >> >> (log_lock_waits is on, of cour

Re: [HACKERS] logical replication busy-waiting on a lock

2017-05-27 Thread Petr Jelinek
On 27/05/17 01:25, Jeff Janes wrote: > When I create a subscription in the disabled state, and then later doing > "alter subscription sub enable;", on the master I sometimes get a tight > loop of the deadlock detector: > > (log_lock_waits is on, of course) > > deadlock_timeout is set to 1s, so I

Re: [HACKERS] ALTER SUBSCRIPTION ..SET PUBLICATION refresh is not throwing error.

2017-05-27 Thread Petr Jelinek
On 27/05/17 04:00, Euler Taveira wrote: > 2017-05-26 21:29 GMT-03:00 Petr Jelinek >: > > > Actually another possibility would be to remove the REFRESH keyword > completely and just have [ WITH (...) ] and have the refresh option > there, ie simpli

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Simon Riggs
On 27 May 2017 at 09:44, Erik Rijkers wrote: > I am very curious at your results. We take your bug report on good faith, but we still haven't seen details of the problem or how to recreate it. Please post some details. Thanks. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreS

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Erik Rijkers
On 2017-05-27 10:30, Erik Rijkers wrote: On 2017-05-27 01:35, Mark Kirkwood wrote: Here is what I have: instances.sh: testset.sh pgbench_derail2.sh pubsub.sh To be clear: ( Apart from that standalone call like ./pgbench_derail2.sh $scale $clients $duration $date_str ) I normally run

Re: [HACKERS] logical replication - still unstable after all these months

2017-05-27 Thread Erik Rijkers
On 2017-05-27 01:35, Mark Kirkwood wrote: On 26/05/17 20:09, Erik Rijkers wrote: The idea is simple enough: startup instance1 startup instance2 (on same machine) primary: init pgbench tables primary: add primary key to pgbench_history copy empty tables to replica by dump/restore primary: star