Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-10-03 Thread Amit Langote
On 2017/10/04 4:27, Robert Haas wrote: > On Tue, Oct 3, 2017 at 8:57 AM, Ashutosh Bapat > wrote: >>> Regarding nomenclature and my previous griping about wisdom, I was >>> wondering about just calling this a "partition join" like you have in >>> the regression

Re: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

2017-10-03 Thread Tom Lane
Badrul Chowdhury writes: > 1. Pgwire protocol v3.0 with negotiation is called v3.1. > 2. There are 2 patches for the change: a BE-specific patch that will be > backported and a FE-specific patch that is only for pg10 and above. TBH, anything that presupposes a backported

Re: [HACKERS] Warnings in objectaddress.c

2017-10-03 Thread Tom Lane
Robert Haas writes: > Perhaps we should apply some glorified version of this: > +if (list_length(object) < 2) > +elog(ERROR, "fail"); > However, I'm not 100% sure that would be sufficient to suppress these > warnings, because the compiler has got to be smart

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Michael Paquier
On Wed, Oct 4, 2017 at 10:37 AM, Robert Haas wrote: > On Tue, Oct 3, 2017 at 9:34 PM, Michael Paquier > wrote: >> +/* Write an unsigned integer field (anything written with UINT64_FORMAT) */ >> +#define WRITE_UINT64_FIELD(fldname) \ >> +

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-10-03 Thread Andres Freund
On 2017-10-03 19:53:41 -0400, Andrew Dunstan wrote: > On 09/27/2017 02:52 PM, Tom Lane wrote: > > Andrew Dunstan writes: > >> At this stage on reflection I agree it should be pulled :-( > > That seems to be the consensus, so I'll go make it happen. > > > >> I'm not

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 9:34 PM, Michael Paquier wrote: > +/* Write an unsigned integer field (anything written with UINT64_FORMAT) */ > +#define WRITE_UINT64_FIELD(fldname) \ > + appendStringInfo(str, " :" CppAsString(fldname) " " UINT64_FORMAT, \ > +

[HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

2017-10-03 Thread Badrul Chowdhury
Hello, Kindly review this patch that implements the proposal for pgwire protocol negotiation described in this thread. A big thanks to @Satyanarayana Narlapuram for his help and guidance in implementing the patch. Please note: 1. Pgwire protocol

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Michael Paquier
On Tue, Oct 3, 2017 at 11:55 PM, Robert Haas wrote: > It seems silly to me to throw away a perfectly good bit from the hash > value just because of some risk of minor user confusion. I do like > Michael's suggestion of outputing hexa-like text, but changing the > types of

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-10-03 Thread Tom Lane
Andrew Dunstan writes: > Do you have any suggestion as to how we should transmit the blacklist to > parallel workers? Perhaps serialize the contents into an array in DSM, then rebuild a hash table from that in the worker. Robert might have a better idea though.

Re: [HACKERS] Warnings in objectaddress.c

2017-10-03 Thread Robert Haas
On Sun, Oct 1, 2017 at 10:33 AM, Дмитрий Воронин wrote: > I'm building PostgreSQL 10 rc1 sources on Debian wheezy (gcc 4.7). I have > those warnings: > > objectaddress.c: In function ‘get_object_address’: > objectaddress.c:1646:10: warning: ‘typeoids[1]’ may be used

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Wood, Dan
One minor side note… Is it weird for xmin/xmax to go backwards in a hot row chain? lp | t_ctid | lp_off | t_infomask | t_infomask2 | t_xmin | t_xmax ++++-++ 1 | (0,1) | 8152 | 2818 | 3 | 36957 | 0 2 |

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Peter Geoghegan
On Tue, Oct 3, 2017 at 6:09 PM, Wood, Dan wrote: > I’ve just started looking at this again after a few weeks break. > if (TransactionIdIsValid(priorXmax) && > !TransactionIdEquals(priorXmax, > HeapTupleHeaderGetXmin(htup))) >

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Peter Geoghegan
On Tue, Oct 3, 2017 at 5:15 PM, Michael Paquier wrote: >> FYI, the repro case page contents looks like this with the patch applied: >> postgres=# select lp, lp_flags, t_xmin, t_xmax, t_ctid, >> to_hex(t_infomask) as infomask, >> to_hex(t_infomask2) as infomask2 >> from

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Wood, Dan
I’ve just started looking at this again after a few weeks break. There is a tangled web of issues here. With the community fix we get a corrupted page(invalid redirect ptr from indexed item). The cause of that is: pruneheap.c: /* * Check the tuple XMIN

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-10-03 Thread Michael Paquier
On Wed, Oct 4, 2017 at 9:52 AM, Bossart, Nathan wrote: > On 10/3/17, 5:59 PM, "Tom Lane" wrote: >> I thought it would be a good idea to get this done before walking away >> from the commitfest and letting all this info get swapped out of my >> head. So

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-10-03 Thread Bossart, Nathan
On 10/3/17, 5:59 PM, "Tom Lane" wrote: > I thought it would be a good idea to get this done before walking away > from the commitfest and letting all this info get swapped out of my > head. So I've reviewed and pushed this. Thanks! > I took out most of the infrastructure

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Michael Paquier
On Wed, Oct 4, 2017 at 8:10 AM, Peter Geoghegan wrote: > I now think that it actually is a VACUUM problem, specifically a > problem with VACUUM pruning. You see the HOT xmin-to-xmax check > pattern that you mentioned within heap_prune_chain(), which looks like > where the incorrect

Re: [HACKERS] Issues with logical replication

2017-10-03 Thread Masahiko Sawada
On Wed, Oct 4, 2017 at 8:35 AM, Petr Jelinek wrote: > On 02/10/17 18:59, Petr Jelinek wrote: >>> >>> Now fix the trigger function: >>> CREATE OR REPLACE FUNCTION replication_trigger_proc() RETURNS TRIGGER AS $$ >>> BEGIN >>> RETURN NEW; >>> END $$ LANGUAGE plpgsql;

[HACKERS] Re: [PATCH] BUG #13416: Postgres >= 9.3 doesn't use optimized shared memory on Solaris anymore

2017-10-03 Thread Sean Chittenden
Hello.  We identified the same problem.  Sam Gwydir and Josh Clulow were able to put together the appropriate fix after. The breakage in src/backend/port/sysv_shmem.c and  src/include/storage/dsm_impl.h should be back ported to all supported versions (the regression was introduced between the

Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?

2017-10-03 Thread Andrew Dunstan
On 09/27/2017 02:52 PM, Tom Lane wrote: > Andrew Dunstan writes: >> At this stage on reflection I agree it should be pulled :-( > That seems to be the consensus, so I'll go make it happen. > >> I'm not happy about the idea of marking an input function as not >>

Re: [HACKERS] Issues with logical replication

2017-10-03 Thread Petr Jelinek
On 02/10/17 18:59, Petr Jelinek wrote: >> >> Now fix the trigger function: >> CREATE OR REPLACE FUNCTION replication_trigger_proc() RETURNS TRIGGER AS $$ >> BEGIN >>   RETURN NEW; >> END $$ LANGUAGE plpgsql; >> >> And manually perform at master two updates inside one transaction: >> >> postgres=#

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Peter Geoghegan
On Tue, Oct 3, 2017 at 9:48 AM, Alvaro Herrera wrote: > But that still doesn't fix the problem; > as far as I can see, vacuum removes the root of the chain, not yet sure > why, and then things are just as corrupted as before. Are you sure it's not opportunistic pruning?

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-10-03 Thread Tom Lane
"Bossart, Nathan" writes: > Since get_rel_oids() was altered in 19de0ab2, here is a new version of > the patch. I thought it would be a good idea to get this done before walking away from the commitfest and letting all this info get swapped out of my head. So I've reviewed

Re: [HACKERS] datetime.h defines like PM conflict with external libraries

2017-10-03 Thread Andrew Dunstan
On 10/03/2017 04:43 PM, Tom Lane wrote: > Andres Freund writes: >> On 2017-10-03 16:34:38 -0400, Andrew Dunstan wrote: >>> AFAICT at a quick glance these are only used in a couple of files. Maybe >>> the defs need to be floated off to a different header with more limited >>>

Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2017-10-03 Thread Vik Fearing
On 10/03/2017 10:10 PM, Andreas Joseph Krogh wrote: > While we're in deferrable constraints land...; > I even more often need deferrable /conditional /unique-indexes. > In PG you now may have: > > ALTER TABLE email_folder ADD CONSTRAINT some_uk UNIQUE (owner_id, > folder_type, name) DEFERRABLE

Re: [HACKERS] generated columns

2017-10-03 Thread Greg Stark
There are some unanswered questions with column grants too. Do we allow granting access to a calculated column which accesses columns the user doesn't have access to? If so then this is a suitable substitute for using updateable views to handle things like granting users access to things like

Re: [HACKERS] parallelize queries containing initplans

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 7:33 AM, Amit Kapila wrote: >> - Why do we even need contains_parallel_unsafe_param() and >> is_initplan_is_below_current_query_level() in the first place, anyway? >> I think there's been some discussion of that on this thread, but I'm >> not sure

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Petr Jelinek
On 03/10/17 22:01, Thomas Munro wrote: > On Wed, Oct 4, 2017 at 7:32 AM, Petr Jelinek > wrote: >> On 03/10/17 19:44, Tom Lane wrote: >>> I wrote: > So that's trouble waiting to happen, for sure. At the very least we > need to do a single fetch of

Re: [HACKERS][BUG] Cache invalidation for queries that contains const of temporary composite type

2017-10-03 Thread Maksim Milyutin
Hi HORIGUCHI-san! Thanks for the valuable comments. 03.10.17 4:30, Kyotaro HORIGUCHI wrote: The first thought that patch gave me is that the problem is not limited to constants. Actually the following sequence also reproduces similar failure even with this patch. create table t2 (x int , y

Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2017-10-03 Thread Nico Williams
On Tue, Oct 03, 2017 at 02:51:30PM -0500, Nico Williams wrote: > Anyways, this patch is NOT passing tests at the moment, and I'm not sure > why. I'm sure I can figure it out, but first I need to understand the > failures. E.g., I see this sort of difference: > >\d testschema.test_index1 >

Re: [HACKERS] datetime.h defines like PM conflict with external libraries

2017-10-03 Thread Tom Lane
Andres Freund writes: > On 2017-10-03 16:34:38 -0400, Andrew Dunstan wrote: >> AFAICT at a quick glance these are only used in a couple of files. Maybe >> the defs need to be floated off to a different header with more limited >> inclusion? > Why not just rename them to PG_PM

Re: [HACKERS] datetime.h defines like PM conflict with external libraries

2017-10-03 Thread Andres Freund
Hi, On 2017-10-03 16:34:38 -0400, Andrew Dunstan wrote: > On 10/03/2017 03:00 PM, Andres Freund wrote: > > Hi, > > > > In my llvm jit work I'd to > > > > #undef PM > > /* include some llvm headers */ > > #define PM 1 > > > > because llvm has a number of functions which have an argument named PM.

Re: [HACKERS] datetime.h defines like PM conflict with external libraries

2017-10-03 Thread Andrew Dunstan
On 10/03/2017 03:00 PM, Andres Freund wrote: > Hi, > > In my llvm jit work I'd to > > #undef PM > /* include some llvm headers */ > #define PM 1 > > because llvm has a number of functions which have an argument named PM. > Now that works, but it's fairly ugly. Perhaps it would be a good idea

Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2017-10-03 Thread Nico Williams
On Tue, Oct 03, 2017 at 10:10:59PM +0200, Andreas Joseph Krogh wrote: > +1. > > While we're in deferrable constraints land...; I even more often need > deferrable conditional unique-indexes. > In PG you now may have: > ALTER TABLE email_folder ADD CONSTRAINT some_uk UNIQUE (owner_id, >

Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2017-10-03 Thread Andreas Joseph Krogh
På tirsdag 03. oktober 2017 kl. 21:51:30, skrev Nico Williams < n...@cryptonector.com >: Attached are patches to add an ALWAYS DEFERRED option to CONSTRAINTs and CONSTRAINT TRIGGERs, meaning: SET CONSTRAINTS .. IMMEDIATE will not make immediate any

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Thomas Munro
On Wed, Oct 4, 2017 at 7:32 AM, Petr Jelinek wrote: > On 03/10/17 19:44, Tom Lane wrote: >> I wrote: So that's trouble waiting to happen, for sure. At the very least we need to do a single fetch of WalRcv->latch, not two. I wonder whether even that

[HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2017-10-03 Thread Nico Williams
Attached are patches to add an ALWAYS DEFERRED option to CONSTRAINTs and CONSTRAINT TRIGGERs, meaning: SET CONSTRAINTS .. IMMEDIATE will not make immediate any constraint/trigger that is declared as ALWAYS DEFERRED. I.e., the opposite of NOT DEFERRED. Perhaps I should make this NOT IMMEDIATE?

Re: [HACKERS] UPDATE of partition key

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 8:16 AM, Amit Khandekar wrote: > While writing this down, I observed that after multi-level partition > tree expansion was introduced, the child table expressions are not > converted directly from the root. Instead, they are converted from > their

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 8:57 AM, Ashutosh Bapat wrote: >> Regarding nomenclature and my previous griping about wisdom, I was >> wondering about just calling this a "partition join" like you have in >> the regression test. So the GUC would be enable_partition_join,

[HACKERS] datetime.h defines like PM conflict with external libraries

2017-10-03 Thread Andres Freund
Hi, In my llvm jit work I'd to #undef PM /* include some llvm headers */ #define PM 1 because llvm has a number of functions which have an argument named PM. Now that works, but it's fairly ugly. Perhaps it would be a good idea to name these defines in a manner that's slightly less likely to

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Petr Jelinek
On 03/10/17 19:44, Tom Lane wrote: > I wrote: >>> So that's trouble waiting to happen, for sure. At the very least we >>> need to do a single fetch of WalRcv->latch, not two. I wonder whether >>> even that is sufficient, though: this coding requires an atomic fetch of >>> a pointer, which is

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-10-03 Thread Alexander Korotkov
On Wed, Sep 13, 2017 at 10:57 AM, Ashutosh Sharma wrote: > On Wed, Sep 13, 2017 at 1:15 PM, Alexey Chernyshov > wrote: > > On Sat, 9 Sep 2017 13:53:35 +0530 > > Ashutosh Sharma wrote: > > > >> > >> Finally, i got some

Re: [HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Andres Freund
On 2017-10-03 14:19:09 -0400, Tom Lane wrote: > Alexander Korotkov writes: > > This topic was already discussed (at least one time) in 2011. See [1] for > > details. I'd like to raise that again. > > I'm a bit worried about adding a toast table to pg_class, and more

Re: [HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 9:19 PM, Tom Lane wrote: > Alexander Korotkov writes: > > This topic was already discussed (at least one time) in 2011. See [1] > for > > details. I'd like to raise that again. > > I'm a bit worried about adding a toast

Re: [HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Tom Lane
Alexander Korotkov writes: > This topic was already discussed (at least one time) in 2011. See [1] for > details. I'd like to raise that again. I'm a bit worried about adding a toast table to pg_class, and more so about pg_database, because both of those have to be

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 12:23 PM, Andres Freund wrote: > Makes sense? Yes. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Alexander Korotkov
Hi! This topic was already discussed (at least one time) in 2011. See [1] for details. I'd like to raise that again. Currently, we have table in system catalog with ACL, but without TOAST. Thus, it might happen that we can't fit new ACL item, because row becomes too large for in-line storage.

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Tom Lane
I wrote: >> So that's trouble waiting to happen, for sure. At the very least we >> need to do a single fetch of WalRcv->latch, not two. I wonder whether >> even that is sufficient, though: this coding requires an atomic fetch of >> a pointer, which is something we generally don't assume to be

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Adrien Nayrat
On 10/03/2017 05:47 PM, Nico Williams wrote: > +1, but it's trickier than you might think. I can connect you with > Viktor Dukhovni, who has implemented DANE for OpenSSL, and done yeoman's > work getting DANE for SMTP working. I really appreciate, but I know it is very tricky :). I do not

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Peter Geoghegan
On Tue, Oct 3, 2017 at 9:48 AM, Alvaro Herrera wrote: > which shows a HOT-update chain, where the t_xmax are multixacts. Then a > vacuum freeze comes, and because the multixacts are below the freeze > horizon for multixacts, we get this: > > select lp, lp_flags, t_xmin,

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Tom Lane
I wrote: > So that's trouble waiting to happen, for sure. At the very least we > need to do a single fetch of WalRcv->latch, not two. I wonder whether > even that is sufficient, though: this coding requires an atomic fetch of > a pointer, which is something we generally don't assume to be safe.

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-10-03 Thread Alvaro Herrera
So here's my attempt at an explanation for what is going on. At one point, we have this: select lp, lp_flags, t_xmin, t_xmax, t_ctid, to_hex(t_infomask) as infomask, to_hex(t_infomask2) as infomask2 from heap_page_items(get_raw_page('t', 0)); lp | lp_flags | t_xmin | t_xmax | t_ctid | infomask

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Dang Minh Huong
2017/09/28 3:47、Peter Eisentraut のメッセージ: > At the PGCon Developer Meeting it was agreed[0] to add a list of credits > to the release notes, including everyone who was mentioned in a commit > message. I have now completed that list. > > Attached is the proposed

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Alvaro Herrera writes: >>> I think the latch is only used locally. Seems that it was only put in >>> shmem to avoid a separate variable ... >> Hm, I'm strongly tempted to move it to a separate static

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-10-03 Thread Andres Freund
On 2017-10-03 11:06:08 -0400, Robert Haas wrote: > On Tue, Oct 3, 2017 at 3:55 AM, Andres Freund wrote: > > Attached is a revised version of this patchset. > > I don't much like the functions with "_pre" affixed to their names. > It's not at all clear that "pre" means

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 12:04 PM, Alexander Korotkov wrote: > BTW, you didn't comment Tom's suggestion about dropping high-order bit which > trades minor user user confusion to minor loss of precision. Oh, I thought I did comment on that. I favor allowing negative IDs

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 5:55 PM, Robert Haas wrote: > On Mon, Oct 2, 2017 at 8:07 PM, Alexander Korotkov > wrote: > > +1, > > I see 3 options there: > > 1) Drop high-order bit, as you proposed. > > 2) Allow negative queryIds. > > 3) Implement

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Nico Williams
On Tue, Oct 03, 2017 at 11:45:24AM +0200, Adrien Nayrat wrote: > On 10/03/2017 06:15 AM, Zeus Kronion wrote: > > 2) I was surprised to learn the following from the docs: > > > >> By default, PostgreSQL will not perform any verification of the server > > certificate. This means that it is possible

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Nico Williams
On Tue, Oct 03, 2017 at 09:44:01AM -0400, Tom Lane wrote: > Magnus Hagander writes: > > On Tue, Oct 3, 2017 at 6:33 AM, Tom Lane wrote: > >> I'm not an SSL expert, so insert appropriate grain of salt, but AIUI the > >> question is what are you going to

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Alvaro Herrera
Michael Paquier wrote: > Looking at this list, the first name is followed by the family name, > so there are inconsistencies with some Japanese names: > - Fujii Masao should be Masao Fujii. > - KaiGai Kohei should be Kohei Kaigai. We've already been here:

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Nico Williams
On Tue, Oct 03, 2017 at 12:33:00AM -0400, Tom Lane wrote: > Zeus Kronion writes: > > 2) I was surprised to learn the following from the docs: > > >> By default, PostgreSQL will not perform any verification of the server > >> certificate. > > > Is there a technical reason to

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Fujii Masao
On Tue, Oct 3, 2017 at 9:57 PM, Tatsuo Ishii wrote: >> On Mon, Oct 2, 2017 at 5:09 PM, Tatsuo Ishii wrote: >>> Michael is correct. >>> >>> Sometimes people choose family name first in the emails. However I am >>> sure "Fujii" is the family name and

Re: [HACKERS] [PATCH] Incremental sort

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 2:52 PM, Robert Haas wrote: > On Mon, Oct 2, 2017 at 12:37 PM, Alexander Korotkov > wrote: > > I've applied patch on top of c12d570f and rerun the same benchmarks. > > CSV-file with results is attached. There is no

Re: [HACKERS] Postgresql gives error that role goes not exists while it exists

2017-10-03 Thread Tom Lane
Craig Ringer writes: > We could only emit a useful HINT if we actually went and looked in the > relevant catalog for a different-cased version. Which is pretty > expensive. There is actually a hint somewhat like that for the specific case of misspelled column names in DML

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-10-03 Thread Robert Haas
On Tue, Oct 3, 2017 at 3:55 AM, Andres Freund wrote: > Attached is a revised version of this patchset. I don't much like the functions with "_pre" affixed to their names. It's not at all clear that "pre" means "preallocated"; it sounds more like you're doing something ahead

Re: [HACKERS] Two pass CheckDeadlock in contentent case

2017-10-03 Thread Sokolov Yura
On 2017-10-03 17:30, Sokolov Yura wrote: Good day, hackers. During hard workload sometimes process reaches deadlock timeout even if no real deadlock occurred. It is easily reproducible with pg_xact_advisory_lock on same value + some time consuming operation (update) and many clients. When

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Magnus Hagander
On Tue, Oct 3, 2017 at 3:51 PM, Stephen Frost wrote: > Tom, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Magnus Hagander writes: > > > On Tue, Oct 3, 2017 at 6:33 AM, Tom Lane wrote: > > >> I'm not an SSL expert, so insert

Re: [HACKERS] Postgresql gives error that role goes not exists while it exists

2017-10-03 Thread Craig Ringer
On 3 October 2017 at 20:47, Euler Taveira wrote: > > 2017-10-03 5:49 GMT-03:00 Nick Dro : > > Can someone assists with the issue posted on StackOverflow? > > > >

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Robert Haas
On Mon, Oct 2, 2017 at 8:07 PM, Alexander Korotkov wrote: > +1, > I see 3 options there: > 1) Drop high-order bit, as you proposed. > 2) Allow negative queryIds. > 3) Implement unsigned 64-type. > > #1 causes minor loss of precision which looks rather insignificant in

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> I don't especially like the Asserts inside spinlocks, either. > > > I didn't change these. It doesn't look to me that these asserts are > > worth very much as production code. > > OK. If we ever see

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Tom Lane
Alvaro Herrera writes: > Fixed the pstrdup problem by replacing with strlcpy() to stack-allocated > variables (rather than palloc + memcpy as proposed in Michael's patch). +1 > Tom Lane wrote: >> I don't especially like the Asserts inside spinlocks, either. > I didn't

[HACKERS] Two pass CheckDeadlock in contentent case

2017-10-03 Thread Sokolov Yura
Good day, hackers. During hard workload sometimes process reaches deadlock timeout even if no real deadlock occurred. It is easily reproducible with pg_xact_advisory_lock on same value + some time consuming operation (update) and many clients. When backend reaches deadlock timeout, it calls

Re: [HACKERS] [PATCH] Improve geometric types

2017-10-03 Thread Tom Lane
Emre Hasegeli writes: >> Uh, I thought pg_hypot() was still needed on our oldest supported >> platforms. Or is hypot() already supported there? > What is our oldest supported platform? Our normal reference for such questions is SUS v2 (POSIX 1997):

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Alvaro Herrera
Fixed the pstrdup problem by replacing with strlcpy() to stack-allocated variables (rather than palloc + memcpy as proposed in Michael's patch). About the other problems: Tom Lane wrote: > I took a quick look through walreceiver.c, and there are a couple of > obvious problems of the same ilk in

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Magnus Hagander writes: > > On Tue, Oct 3, 2017 at 6:33 AM, Tom Lane wrote: > >> I'm not an SSL expert, so insert appropriate grain of salt, but AIUI the > >> question is what are you going to verify against?

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Tom Lane
Magnus Hagander writes: > On Tue, Oct 3, 2017 at 6:33 AM, Tom Lane wrote: >> I'm not an SSL expert, so insert appropriate grain of salt, but AIUI the >> question is what are you going to verify against? > One way to do it would be to default to the

Re: [HACKERS] [PATCH] Improve geometric types

2017-10-03 Thread Emre Hasegeli
> Uh, I thought pg_hypot() was still needed on our oldest supported > platforms. Or is hypot() already supported there? If not, I suppose we > can keep the HYPOT() macro, and have it use hypot() on platforms that > have it and pg_hypot elsewhere? That particular fraction of 0001 seemed > a bit

Re: [HACKERS] [PATCH] Improve geometric types

2017-10-03 Thread Emre Hasegeli
> I think if we're going to do this it should be separated out as its > own patch. Also, I think someone should explain what the reasoning > behind the change is. Do we, for example, foresee that the built-in > code might be faster or less likely to overflow? Because we're > clearly taking a

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Tatsuo Ishii
> On Mon, Oct 2, 2017 at 5:09 PM, Tatsuo Ishii wrote: >> Michael is correct. >> >> Sometimes people choose family name first in the emails. However I am >> sure "Fujii" is the family name and "Masao" is the firstname. > > But I don't think that directly answers the question

Re: [HACKERS] Postgresql gives error that role goes not exists while it exists

2017-10-03 Thread Euler Taveira
2017-10-03 5:49 GMT-03:00 Nick Dro : > Can someone assists with the issue posted on StackOverflow? > > https://stackoverflow.com/questions/46540537/postgresql-9-3-creation-of-group-role-causes-permission-problems > > > Creation of new Group Role causes postgresql to think

[HACKERS] Postgresql gives error that role goes not exists while it exists

2017-10-03 Thread Nick Dro
Can someone assists with the issue posted on StackOverflow?   https://stackoverflow.com/questions/46540537/postgresql-9-3-creation-of-group-role-causes-permission-problems     Creation of new Group Role causes postgresql to think that Login roles does not exist. I think it's a bug? or at least a

Re: [HACKERS] Logging idle checkpoints

2017-10-03 Thread Stephen Frost
Greetings, * Kyotaro HORIGUCHI (horiguchi.kyot...@lab.ntt.co.jp) wrote: > At Tue, 3 Oct 2017 10:23:08 +0900, Michael Paquier > wrote in > > > On Tue, Oct 3, 2017 at 12:01 AM, Stephen Frost

Re: [HACKERS] UPDATE of partition key

2017-10-03 Thread Amit Khandekar
On 30 September 2017 at 01:26, Robert Haas wrote: > On Fri, Sep 29, 2017 at 3:53 PM, Robert Haas wrote: >> On Fri, Sep 22, 2017 at 1:57 AM, Amit Khandekar >> wrote: >>> The patch for the above change is : >>>

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Kohei KaiGai
2017-10-03 6:09 GMT+09:00 Tatsuo Ishii : >> On Wed, Sep 27, 2017 at 8:29 PM, Michael Paquier >> wrote: >>> Looking at this list, the first name is followed by the family name, >>> so there are inconsistencies with some Japanese names: >>> - Fujii

Re: [HACKERS] [PATCH] Incremental sort

2017-10-03 Thread Robert Haas
On Mon, Oct 2, 2017 at 12:37 PM, Alexander Korotkov wrote: > I've applied patch on top of c12d570f and rerun the same benchmarks. > CSV-file with results is attached. There is no dramatical changes. There > is still minority of performance regression cases while

Re: [HACKERS] parallelize queries containing initplans

2017-10-03 Thread Amit Kapila
On Mon, Oct 2, 2017 at 8:13 PM, Robert Haas wrote: > On Thu, Sep 14, 2017 at 10:45 PM, Amit Kapila wrote: >> The latest patch again needs to be rebased. Find rebased patch >> attached with this email. > > I read through this patch this morning.

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Alvaro Herrera
Andreas Seltenreich wrote: > Michael Paquier writes: > > > I am attaching a patch that addresses the bugs for the spin lock sections. > > [2. text/x-diff; walreceiver-spin-calls.patch] > > I haven't seen a spinlock PANIC since testing with the patch applied. > They occured five times with the

Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM

2017-10-03 Thread Andreas Seltenreich
Michael Paquier writes: > I am attaching a patch that addresses the bugs for the spin lock sections. > [2. text/x-diff; walreceiver-spin-calls.patch] I haven't seen a spinlock PANIC since testing with the patch applied. They occured five times with the same amount of testing done earlier.

Re: [HACKERS] Repetitive code in RI triggers

2017-10-03 Thread Ildar Musin
Hi Maksim, On 26.09.2017 11:51, Maksim Milyutin wrote: On 19.09.2017 11:09, Daniel Gustafsson wrote: Removing reviewer Maksim Milyutin from patch entry due to inactivity and community account email bouncing. Maksim: if you are indeed reviewing this patch, then please update the community

Re: [HACKERS] list of credits for release notes

2017-10-03 Thread Robert Haas
On Mon, Oct 2, 2017 at 5:09 PM, Tatsuo Ishii wrote: > Michael is correct. > > Sometimes people choose family name first in the emails. However I am > sure "Fujii" is the family name and "Masao" is the firstname. But I don't think that directly answers the question of how he

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Adrien Nayrat
Hi, On 10/03/2017 06:15 AM, Zeus Kronion wrote: > 2) I was surprised to learn the following from the docs: > >> By default, PostgreSQL will not perform any verification of the server > certificate. This means that it is possible to spoof the server identity (for > example by modifying a DNS

Re: [HACKERS] [PATCH] Improve geometric types

2017-10-03 Thread Alvaro Herrera
Robert Haas wrote: > I'm potentially willing to commit a patch that just makes the > pg_hypot() -> hypot() change and does nothing else, if there are not > objections to that change, but I want to be sure that we'll know right > away if that turns out to break. Uh, I thought pg_hypot() was still

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2017-10-03 Thread Ashutosh Bapat
On Thu, Sep 28, 2017 at 5:45 PM, Etsuro Fujita wrote: > Hi, > > Commit 7086be6e3627c1ad797e32ebbdd232905b5f577f addressed mishandling of WCO > in direct foreign table modification by disabling it when we have WCO, but I > noticed another oddity in postgres_fdw: > >

Re: [HACKERS] [PATCH] Assert that the correct locks are held when calling PageGetLSN()

2017-10-03 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Oct 3, 2017 at 12:54 AM, Alvaro Herrera > wrote: > > I'd argue about this in the same direction I argued about > > BufferGetPage() needing an LSN check that's applied separately: if it's > > too easy for a developer to do the wrong thing

Re: [HACKERS] [PATCH] Improve geometric types

2017-10-03 Thread Kyotaro HORIGUCHI
At Mon, 2 Oct 2017 08:23:49 -0400, Robert Haas wrote in > On Mon, Oct 2, 2017 at 4:23 AM, Kyotaro HORIGUCHI > wrote: > > For other potential reviewers: > > > > I found

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Andres Freund
On 2017-10-03 17:06:20 +0900, Michael Paquier wrote: > On Tue, Oct 3, 2017 at 3:12 PM, Andres Freund wrote: > > On 2017-10-03 03:07:09 +0300, Alexander Korotkov wrote: > >> On Tue, Oct 3, 2017 at 12:32 AM, Tom Lane wrote: > >> +1, > >> I see 3 options

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Michael Paquier
On Tue, Oct 3, 2017 at 3:12 PM, Andres Freund wrote: > On 2017-10-03 03:07:09 +0300, Alexander Korotkov wrote: >> On Tue, Oct 3, 2017 at 12:32 AM, Tom Lane wrote: >> +1, >> I see 3 options there: >> 1) Drop high-order bit, as you proposed. >> 2) Allow

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-10-03 Thread Andres Freund
Hi, Attached is a revised version of this patchset. I'd like to get some input on two points: 1) Does anybody have a better idea than the static buffer in SendRowDescriptionMessage()? That's not particularly pretty, but there's not really a convenient stringbuffer to use when called from

Re: [HACKERS] Possible SSL improvements for a newcomer to tackle

2017-10-03 Thread Magnus Hagander
On Tue, Oct 3, 2017 at 6:33 AM, Tom Lane wrote: > Zeus Kronion writes: > > 2) I was surprised to learn the following from the docs: > > >> By default, PostgreSQL will not perform any verification of the server > >> certificate. > > > Is there a technical

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Vladimir Sitnikov
>OK, so here's a patch. Review appreciated. Please correct typo "Write an unsigned integer field (anythign written with UINT64_FORMAT)". anythign -> anything. Vladimir

  1   2   >