Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-09-30 Thread Mark Kirkwood
On 30/09/17 06:43, Robert Haas wrote: On Fri, Sep 29, 2017 at 2:06 AM, Michael Paquier wrote: My tendency about this patch is still that it should be rejected. This is presenting additional handling for no real gain. I vehemently disagree. If the server lets you

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Pavel Stehule
2017-10-01 4:55 GMT+02:00 Devrim Gündüz : > > Hi, > > On Sat, 2017-09-30 at 11:15 -0400, Tom Lane wrote: > > So the point is that postgresql-devel now needs to have a dependency > > on icu-devel. > > Oh, I see. Ack, added. Will appear in 10.0 RPMs. > Thank you Pavel > >

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Devrim Gündüz
Hi, On Sat, 2017-09-30 at 11:15 -0400, Tom Lane wrote: > So the point is that postgresql-devel now needs to have a dependency > on icu-devel. Oh, I see. Ack, added. Will appear in 10.0 RPMs. Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat

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

2017-09-30 Thread Peter Geoghegan
On Thu, Sep 28, 2017 at 1:20 PM, Alvaro Herrera wrote: > Maybe what this means is that we need to do both Dan's initially > proposed patch (or something related to it) apart from the fixes already > pushed. IOW we need to put back some of the "tupkeep" business ... I

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Andres Freund
On 2017-09-30 18:17:37 -0400, Robert Haas wrote: > On Sat, Sep 30, 2017 at 11:55 AM, Andres Freund wrote: > > On 2017-09-30 11:50:08 -0400, Robert Haas wrote: > >> Well, I think that the fact that pg_stat_statements.max exists at all > >> is something that could be fixed now

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Robert Haas
On Sat, Sep 30, 2017 at 11:55 AM, Andres Freund wrote: > On 2017-09-30 11:50:08 -0400, Robert Haas wrote: >> Well, I think that the fact that pg_stat_statements.max exists at all >> is something that could be fixed now that we have DSA. > > You normally *do* want a limit imo.

[HACKERS] why subplan is 10x faster then function?

2017-09-30 Thread Pavel Stehule
Hi I have some strange slow queries based on usage "view" functions one function looks like this: CREATE OR REPLACE FUNCTION ides_funcs.najdatsplt_cislo_exekuce(mid_najdatsplt bigint) RETURNS character varying LANGUAGE sql STABLE AS $function$ select CISLOEXEKUCE from najzalobpr MT,

Re: [HACKERS] alter server for foreign table

2017-09-30 Thread Tom Lane
Andrew Dunstan writes: > I assume the proposal is to allow changing to a different server using > the same FDW. I can see all sorts of odd things happening if we allow > changing to a server of a different FDW. As long as we check that the table's FDW options are

Re: [HACKERS] Causal reads take II

2017-09-30 Thread Thomas Munro
On Sun, Oct 1, 2017 at 9:05 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >>> LOG: could not remove directory "pg_tblspc/47733/PG_10_201707211/47732": >>> Directory not empty >>> ... >> >> Hmm. The first error ("could not remove directory") could perhaps be >> explained by temporary files

Re: [HACKERS] alter server for foreign table

2017-09-30 Thread konstantin knizhnik
On Sep 30, 2017, at 10:58 PM, Andrew Dunstan wrote: > > > On 09/30/2017 05:14 AM, Derry Hamilton wrote: >> Just to say, yes, this would be handy. I've been using a variant of >> that hack on reporting servers, while migrating systems from >> proprietary databases. It behaves quite gracefully

Re: [HACKERS] alter server for foreign table

2017-09-30 Thread Nico Williams
On Sat, Sep 30, 2017 at 03:58:04PM -0400, Andrew Dunstan wrote: > On 09/30/2017 05:14 AM, Derry Hamilton wrote: > > Just to say, yes, this would be handy. I've been using a variant of > > that hack on reporting servers, while migrating systems from > > proprietary databases.  It behaves quite

Re: [HACKERS] [PATCH] Incremental sort

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 16, 2017 at 2:46 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Sep 14, 2017 at 2:48 AM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> Patch rebased to current master is attached. I'm going to improve my >> testing script and post new results. >>

Re: [HACKERS] [PATCH] Tests for reloptions

2017-09-30 Thread Nikolay Shaplov
While working with reloptions refactoring patch, I've written series of tests that triggers reloptions related code in all access methods. (I needed it to make sure I did not break anything while coding) I've included these tests to that patch. Meanwhile Alvaro suggested to commit these tests

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 30, 2017 at 6:12 PM, Shubham Barai wrote: > I have made changes according to your suggestions. Please have a look at > the updated patch. > I am also considering your suggestions for my other patches also. But, I > will need some time to > make changes as I

Re: [HACKERS] [PATCH] Generic type subscripting

2017-09-30 Thread Dmitry Dolgov
> On Fri, Sep 22, 2017 at 3:51 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 9/21/17 11:24, Dmitry Dolgov wrote: >> One last thing that I need to clarify. Initially there was an idea to >> minimize changes in `pg_type` > > I see, but there is no value in that if it makes

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 30, 2017 at 8:18 PM, chenhj wrote: > On 2017-09-30 02:17:54,"Alexander Korotkov" > wrote: > > > Great. Now code of this patch looks good for me. > However, we forgot about documentation. > > >>The result is equivalent to replacing

Re: [HACKERS] Causal reads take II

2017-09-30 Thread Dmitry Dolgov
> On 31 July 2017 at 07:49, Thomas Munro wrote: >> On Sun, Jul 30, 2017 at 7:07 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> >> I looked through the code of `synchronous-replay-v1.patch` a bit and ran a few >> tests. I didn't manage to break anything, except

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 30, 2017 at 6:39 PM, Peter Geoghegan wrote: > On Sat, Sep 30, 2017 at 7:34 AM, Robert Haas > wrote: > > Assuming, however, that you don't manage to prove all known > > mathematics inconsistent, what one might reasonably hope to do is > > render

Re: [HACKERS] alter server for foreign table

2017-09-30 Thread Andrew Dunstan
On 09/30/2017 05:14 AM, Derry Hamilton wrote: > Just to say, yes, this would be handy. I've been using a variant of > that hack on reporting servers, while migrating systems from > proprietary databases.  It behaves quite gracefully when there are > incompatible options, and it fixes up properly

Re: [HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Peter Geoghegan
On Sat, Sep 30, 2017 at 12:28 PM, Tom Lane wrote: > This suggests to me that arguing about canonicalization is moot so > far as avoiding reindexing goes: if you change ICU library versions, > you're screwed and will have to jump through all the reindexing hoops, > no matter

Re: [HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Tom Lane
Noah Misch writes: > On Sat, Sep 30, 2017 at 11:25:43AM -0400, Tom Lane wrote: >> Sure, but dealing with that is mechanical: reindex the necessary indexes >> and you're done. > In the general case, one must revalidate CHECK constraints, re-partition > tables, revalidate range

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-30 Thread Alvaro Herrera
Jeff Janes wrote: > On Fri, Sep 22, 2017 at 1:19 PM, Robert Haas wrote: > > > On Fri, Sep 22, 2017 at 3:39 PM, Jeff Janes wrote: > > > It turns out it is not new in pg10. I spotted in the log file only by > > > accident while looking for something

Re: [HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Noah Misch
On Sat, Sep 30, 2017 at 11:25:43AM -0400, Tom Lane wrote: > Noah Misch writes: > > On Mon, Sep 25, 2017 at 09:36:44AM -0700, Peter Geoghegan wrote: > >>> I think it's inevitable that a certain number of users are going to > >>> have to cope with ICU version changes breaking

Re: [HACKERS] 10RC1 crash testing MultiXact oddity

2017-09-30 Thread Jeff Janes
On Fri, Sep 22, 2017 at 1:19 PM, Robert Haas wrote: > On Fri, Sep 22, 2017 at 3:39 PM, Jeff Janes wrote: > > It turns out it is not new in pg10. I spotted in the log file only by > > accident while looking for something else. Now that I am looking

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-30 Thread chenhj
On 2017-09-30 02:17:54,"Alexander Korotkov" wrote: Great. Now code of this patch looks good for me. However, we forgot about documentation. The result is equivalent to replacing the target data directory with the source one. Only changed blocks from

Re: [HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Peter Geoghegan
On Sat, Sep 30, 2017 at 8:25 AM, Tom Lane wrote: > I'd also argue that the point of adopting ICU was exactly so we *could* > distinguish those cases, and limit the scope of a normal upgrade to > "reindex these identifiable indexes and you're done". In the libc world, > when

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Robert Haas
On Sat, Sep 30, 2017 at 12:03 PM, Tom Lane wrote: > More to the point: with 32-bit IDs, it's apparent that you shouldn't > really rely on them being unique, and should design your usage so that > it will survive collisions. But the point is precisely that we do not do that.

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Andres Freund
On 2017-09-30 12:03:57 -0400, Tom Lane wrote: > Peter Geoghegan writes: > > On Sat, Sep 30, 2017 at 7:34 AM, Robert Haas wrote: > >> Assuming, however, that you don't manage to prove all known > >> mathematics inconsistent, what one might reasonably hope to

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Tom Lane
Peter Geoghegan writes: > On Sat, Sep 30, 2017 at 7:34 AM, Robert Haas wrote: >> Assuming, however, that you don't manage to prove all known >> mathematics inconsistent, what one might reasonably hope to do is >> render collisions remote enough that one need

Re: [HACKERS] Parallel Append implementation

2017-09-30 Thread Robert Haas
On Sat, Sep 30, 2017 at 12:20 AM, Amit Kapila wrote: > Okay, but the point is whether it will make any difference > practically. Let us try to see with an example, consider there are > two children (just taking two for simplicity, we can extend it to > many) and first

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Andres Freund
On 2017-09-30 11:50:08 -0400, Robert Haas wrote: > Well, I think that the fact that pg_stat_statements.max exists at all > is something that could be fixed now that we have DSA. You normally *do* want a limit imo. And given that query strings are now stored externally, I don't think there's a

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Robert Haas
On Sat, Sep 30, 2017 at 11:39 AM, Peter Geoghegan wrote: > On Sat, Sep 30, 2017 at 7:34 AM, Robert Haas wrote: >> Assuming, however, that you don't manage to prove all known >> mathematics inconsistent, what one might reasonably hope to do is >> render

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Peter Geoghegan
On Sat, Sep 30, 2017 at 8:39 AM, Peter Geoghegan wrote: > Isn't that already true in the case of queryId? I've never heard any > complaints about collisions. Most people don't change > pg_stat_statements.max, so the probability of a collision is more like > 1%. And, that's the

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Peter Geoghegan
On Sat, Sep 30, 2017 at 7:34 AM, Robert Haas wrote: > Assuming, however, that you don't manage to prove all known > mathematics inconsistent, what one might reasonably hope to do is > render collisions remote enough that one need not worry about them too > much in practice.

Re: [HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Tom Lane
Noah Misch writes: > On Mon, Sep 25, 2017 at 09:36:44AM -0700, Peter Geoghegan wrote: >>> I think it's inevitable that a certain number of users are going to >>> have to cope with ICU version changes breaking stuff. >> Wasn't the main point of adopting ICU that that doesn't

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= writes: > On Sat, 2017-09-30 at 08:19 +0200, Pavel Stehule wrote: >> probably rpm is created with --with-icu > Sure, I compile all v10 RPMs with ICU support. So the point is that postgresql-devel now needs to have a dependency on icu-devel.

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-09-30 Thread Shubham Barai
Sent with Mailtrack <#> On 28 September 2017 at 15:49, Alexander Korotkov wrote: > On Thu, Sep 28, 2017 at 12:45 AM, Alexander Korotkov < >

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Robert Haas
On Sat, Sep 30, 2017 at 12:34 AM, Tom Lane wrote: > Robert Haas writes: >> How about widening the value to uint64? > > Doesn't really seem like that would guarantee no collisions. Well, no duh. If you come up with a hash function that maps an infinite

Re: [HACKERS] Parallel Append implementation

2017-09-30 Thread Amit Kapila
On Wed, Sep 20, 2017 at 10:59 AM, Amit Khandekar wrote: > On 16 September 2017 at 10:42, Amit Kapila wrote: >> >> At a broader level, the idea is good, but I think it won't turn out >> exactly like that considering your below paragraph which

Re: [HACKERS] alter server for foreign table

2017-09-30 Thread Derry Hamilton
Just to say, yes, this would be handy. I've been using a variant of that hack on reporting servers, while migrating systems from proprietary databases. It behaves quite gracefully when there are incompatible options, and it fixes up properly with DROPs as the first options. Derry

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Devrim Gündüz
Hi, On Sat, 2017-09-30 at 08:19 +0200, Pavel Stehule wrote: > probably rpm is created with --with-icu Sure, I compile all v10 RPMs with ICU support. Regards -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz ,

[HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Noah Misch
On Mon, Sep 25, 2017 at 09:36:44AM -0700, Peter Geoghegan wrote: > On Mon, Sep 25, 2017 at 9:06 AM, Robert Haas wrote: > >> The big concern I have here is that this feels a lot like something that > >> we'll regret at leisure, if it's not right in the first release. I'd >

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Michael Paquier
On Sat, Sep 30, 2017 at 1:34 PM, Tom Lane wrote: > Robert Haas writes: >> How about widening the value to uint64? > > Doesn't really seem like that would guarantee no collisions. This moves the possibility of a 25% collision from 50k queries 3.3

[HACKERS] Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?

2017-09-30 Thread Noah Misch
On Mon, Sep 25, 2017 at 08:26:21AM +, Noah Misch wrote: > On Tue, Sep 19, 2017 at 07:01:47PM -0700, Peter Geoghegan wrote: > > On Tue, Sep 19, 2017 at 5:52 PM, Peter Eisentraut > > wrote: > > > On 9/18/17 18:46, Peter Geoghegan wrote: > > >> As I pointed out

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Pavel Stehule
2017-09-30 8:18 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > /usr/pgsql-10/include/server/utils/pg_locale.h:19:26: error: > > unicode/ucol.h: Adresář nebo soubor neexistuje > > > This mean not optional dependency on ICU. > > Really? That file has

Re: [HACKERS] extension build issue with PostgreSQL 10 on Centos6

2017-09-30 Thread Tom Lane
Pavel Stehule writes: > /usr/pgsql-10/include/server/utils/pg_locale.h:19:26: error: > unicode/ucol.h: Adresář nebo soubor neexistuje > This mean not optional dependency on ICU. Really? That file has #ifdef USE_ICU #include #endif So if you managed to get that error

Re: [HACKERS] pg_prepared_xact_status

2017-09-30 Thread konstantin knizhnik
On Sep 29, 2017, at 11:33 PM, Robert Haas wrote: > On Fri, Sep 29, 2017 at 4:22 AM, Craig Ringer wrote: >> This sounds kind-of like 1/4 of a distributed transaction resolver, without >> a way to make it reliable enough to build the other 3/4. >> >> To make this practical