Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-11-20 Thread Ashutosh Bapat
On Fri, Nov 17, 2017 at 6:24 PM, David Rowley wrote: > > I'm kind of thinking this patch should change that, even if the patch is not > making use of the indexes, you could argue that something using > set_rel_pathlist_hook might want to do something there, although, there's > likely a bunch of co

Re: [HACKERS] pgbench regression test failure

2017-11-20 Thread Fabien COELHO
Hello Tom, Thanks for having a look at this bug fix. So we fixed the reported TPS rate, which was nowhere near reality, and the per-script stats are sane now. Good so far, but this still has two problems IMO: 1. The per-script stats shouldn't be printed at all if there's only one script. Th

Re: [HACKERS] Repetitive code in RI triggers

2017-11-20 Thread Ildar Musin
On 19.11.2017 00:31, Tom Lane wrote: Ildar Musin writes: [ ri_triggers_v2.patch ] Pushed with two minor improvements. I noticed that ri_setdefault could just go directly to ri_restrict rather than call the two separate triggers that would end up there anyway; that lets its argument be "Tri

Re: no library dependency in Makefile?

2017-11-20 Thread 高增琦
The attached patch use normal dependency instead of order-only dependency for static libraries. 2017-11-20 12:58 GMT+08:00 高增琦 : > > > 2017-11-20 2:25 GMT+08:00 Tom Lane : > >> =?UTF-8?B?6auY5aKe55Cm?= writes: >> > I very much look forward to hearing everyone's views on this issue. >> > If the s

Re: Jsonb transform for pl/python

2017-11-20 Thread Anthony Bykov
On Mon, 13 Nov 2017 15:08:16 + Aleksander Alekseev wrote: > The following review has been posted through the commitfest > application: make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tes

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Ildus Kurbangaliev
On Mon, 20 Nov 2017 00:23:23 +0100 Tomas Vondra wrote: > On 11/15/2017 02:13 PM, Robert Haas wrote: > > On Wed, Nov 15, 2017 at 4:09 AM, Ildus Kurbangaliev > > wrote: > >> So in the next version of the patch I can just unlink the options > >> from compression methods and dropping compression m

Failed to delete old ReorderBuffer spilled files

2017-11-20 Thread atorikoshi
Hi, I put many queries into one transaction and made ReorderBuffer spill data to disk, and sent SIGKILL to postgres before the end of the transaction. After starting up postgres again, I observed the files spilled to data wasn't deleted. I think these files should be deleted because its transac

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-20 Thread Dmitry Dolgov
> On 19 November 2017 at 16:13, Arthur Zakirov wrote: > > I think it is time to mark the patch as "Ready for Commiter". I've > marked it. Good, thank you for the comprehensive review.

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-11-20 Thread Alexander Korotkov
Hi, Tomas! On Mon, Nov 20, 2017 at 4:09 AM, Tomas Vondra wrote: > Seems fine to me, although perhaps it should be split into two parts. > One with the cube_coord_llur fixes, and then g_cube_distance changes > adding support for negative coordinates. Thank you for your feedback. I'll split thi

Unicode or local language

2017-11-20 Thread Lelisa Diriba
unicode=# SET CLIENT_ENCODING TO UNICODE; SET unicode=# show client_encoding; client_encoding - UTF8 (1 row) insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i want to SELECT FROM SQL SHELL(PSQL) i doesn't the normal value.how psql support UNICODE chara

Re: [COMMITTERS] pgsql: Add hash partitioning.

2017-11-20 Thread amul sul
On Sat, Nov 18, 2017 at 1:19 AM, Robert Haas wrote: > On Thu, Nov 16, 2017 at 9:37 AM, amul sul wrote: >> Fixed in the 001 patch. >> >> IMHO, this function is not meant for a user, so that instead of ereport() >> cant >> we simply return false? TWIW, I have attached 003 patch which replaces all

Re: Unicode or local language

2017-11-20 Thread Laurenz Albe
Lelisa Diriba wrote: > unicode=# SET CLIENT_ENCODING TO UNICODE; > SET > unicode=# show client_encoding; > client_encoding > - > UTF8 > (1 row) > insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i > want to SELECT FROM SQL SHELL(PSQL) i doesn't the nor

Re: [HACKERS] [PATCH] A hook for session start

2017-11-20 Thread Fabrízio de Royes Mello
On Mon, Nov 20, 2017 at 1:38 AM, Tom Lane wrote: > > Michael Paquier writes: > > On Mon, Nov 20, 2017 at 12:11 PM, Tom Lane wrote: > >> The stuff related to AuxProcType is in miscadmin.h, so one possibility > >> is to put the new enum there. But I could see inventing a whole new > >> header for

[PATCH] Porting small OpenBSD changes.

2017-11-20 Thread David CARLIER
Hi, Compilation pass, make check passes. Motivations : - Reducing OpenBSD postfgresql maintainer internal changes bookeeping if those small changes make sense for the PostgreSQL developers. Hope it is good. Thanks in advance. Kind regards. 0001-PATCH-1-1-Porting-OpenBSD-internal-changes.pat

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-20 Thread Amit Kapila
On Wed, Nov 15, 2017 at 6:58 PM, Robert Haas wrote: > On Tue, Nov 14, 2017 at 12:28 AM, Thomas Munro > wrote: >> Thanks. You're right. Rebased and updated to describe what "off" does. > > Committed. > Thanks, reflected the same in CF entry (https://commitfest.postgresql.org/16/1375/). -- Wit

Re: Jsonb transform for pl/python

2017-11-20 Thread Aleksander Alekseev
Hi Anthony, > thank you for your review. I took your comments into account in the > third version of the patch. In the new version, I've added all the > tests you asked for. The interesting thing is that: > 1. set or any other non-jsonb-transformable object is transformed into > string and added t

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Alik Khilazhev
> Patch applies with "patch", but not with "git apply", probably because it is > in CR-NL eol format. No big deal. > > Documentation has been switched from SGML to XML, so now tags must be > explicitely closed, i.e. use x instead of x. > > Patch compiles with a warning: > > Declaration must m

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 10:44 AM, Ildus Kurbangaliev wrote: > On Mon, 20 Nov 2017 00:23:23 +0100 > Tomas Vondra wrote: > >> On 11/15/2017 02:13 PM, Robert Haas wrote: >>> On Wed, Nov 15, 2017 at 4:09 AM, Ildus Kurbangaliev >>> wrote: So in the next version of the patch I can just unlink the optio

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Евгений Шишкин
> On Nov 20, 2017, at 18:18, Tomas Vondra wrote: > > > I don't think we need to do anything smart here - it should behave just > like dropping a data type, for example. That is, error out if there are > columns using the compression method (without CASCADE), and drop all the > columns (with CA

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 04:21 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:18, Tomas Vondra > > wrote: >> >> >> I don't think we need to do anything smart here - it should behave just >> like dropping a data type, for example. That is, error out if there are

IndexTupleDSize macro seems redundant

2017-11-20 Thread Ildar Musin
Hi all, While I was looking through the indexes code I got confused by couple of macros - IndexTupleSize() and IndexTupleDSize() - which seem to do the same thing with only difference that the first one takes pointer as an argument while the second one takes struct. And in most cases IndexTup

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Евгений Шишкин
> On Nov 20, 2017, at 18:29, Tomas Vondra wrote: > >> >> What about instead of dropping column we leave data uncompressed? >> > > That requires you to go through the data and rewrite the whole table. > And I'm not aware of a DROP command doing that, instead they just drop > the dependent obj

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Ildus Kurbangaliev
On Mon, 20 Nov 2017 16:29:11 +0100 Tomas Vondra wrote: > On 11/20/2017 04:21 PM, Евгений Шишкин wrote: > > > > > >> On Nov 20, 2017, at 18:18, Tomas Vondra > >> >> > wrote: > >> > >> > >> I don't think we need to do anything smart here - it should behave

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Fabien COELHO
Hello Alik, Patch applies, compiles, works (I checked the distribution). Doc gen ok. make check ok. I have reduced range to [1, 10] and updated the test. I would suggest to use [1, 9] and the simpler regex [1-9] instead of the full list. Also, there should be an empty line between funct

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 04:43 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:29, Tomas Vondra wrote: >> >>> >>> What about instead of dropping column we leave data uncompressed? >>> >> >> That requires you to go through the data and rewrite the whole table. >> And I'm not aware of a DROP comman

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-11-20 Thread Alvaro Herrera
BTW see bug #14863 which is related to this: https://postgr.es/m/CAEBTBzu5j_E1K1jb9OKwTZj98MPeM7V81-vadp5adRm=nhj...@mail.gmail.com -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] [PATCH] A hook for session start

2017-11-20 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > typedef enum > { > ClientBackendProcess = -1, > CheckerProcess = 0, > BootstrapProcess, Uh, why would you do that (start from -1)? It makes it impossible to build an array indexed by the enum, which might be useful --- converting enu

Re: [HACKERS] CLUSTER command progress monitor

2017-11-20 Thread Antonin Houska
Robert Haas wrote: > On Wed, Aug 30, 2017 at 10:12 PM, Tatsuro Yamada > wrote: > > 1. scanning heap > > 2. sort tuples > > These two phases overlap, though. I believe progress reporting for > sorts is really hard. In the simple case where the data fits in > work_mem, none of the work of th

Re: [HACKERS] CLUSTER command progress monitor

2017-11-20 Thread Tom Lane
Antonin Houska writes: > Robert Haas wrote: >> These two phases overlap, though. I believe progress reporting for >> sorts is really hard. > Whatever complexity is hidden in the sort, cost_sort() should have taken it > into consideration when called via plan_cluster_use_sort(). Thus I think that

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Martín Marqués
El 14/11/17 a las 06:25, Arthur Zakirov escribió: > On Fri, Nov 10, 2017 at 10:32:23AM -0300, Martín Marqués wrote: >> An example where using isatty() might fail is if you run pg_basebackup >> from a tty but redirect the output to a file, I believe that in that >> case isatty() will return true, bu

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-20 Thread Fujii Masao
On Mon, Nov 20, 2017 at 4:12 PM, Masahiko Sawada wrote: > On Fri, Nov 17, 2017 at 11:00 AM, Michael Paquier > wrote: >> On Thu, Nov 16, 2017 at 8:17 PM, Masahiko Sawada >> wrote: >>> On Thu, Nov 16, 2017 at 1:11 PM, Michael Paquier >>> wrote: + /* +* Quick exit if session is no

Using isatty() on WIN32 platform

2017-11-20 Thread Martín Marqués
Hi, While following suggestions from Arthur Zakirov on a patch for pg_basebackup I found that we are using isatty() in multiple places, but we don't distinguish the WIN32 code which should use _isatty() as per [1]. It's true that isatty() is still supported by Visual C (else we'd fail to compile)

Re: [HACKERS] pgbench regression test failure

2017-11-20 Thread Tom Lane
Fabien COELHO writes: >> 1. The per-script stats shouldn't be printed at all if there's >> only one script. They're redundant with the overall stats. > Indeed. > I think the output should tend to be the same for possible automatic > processing, whether there is one script or more, even at the p

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread Tom Lane
David CARLIER writes: > - Reducing OpenBSD postfgresql maintainer internal changes bookeeping if > those small changes make sense for the PostgreSQL developers. Hm. The s_lock.c change is surely fine if OpenBSD maintainers say it is. Not sure about adding Motorola 88K support to s_lock.h ... is

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread David CARLIER
On 20 November 2017 at 18:49, Tom Lane wrote: > David CARLIER writes: > > - Reducing OpenBSD postfgresql maintainer internal changes bookeeping if > > those small changes make sense for the PostgreSQL developers. > > Hm. The s_lock.c change is surely fine if OpenBSD maintainers say it is. > > N

Re: [HACKERS] [PATCH] A hook for session start

2017-11-20 Thread Fabrízio de Royes Mello
On Mon, Nov 20, 2017 at 2:56 PM, Tom Lane wrote: > > =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > > typedef enum > > { > > ClientBackendProcess = -1, > > CheckerProcess = 0, > > BootstrapProcess, > > Uh, why would you do that (start from -1)? It makes it impossible to > build a

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread David Fetter
On Mon, Nov 20, 2017 at 06:57:47PM +, David CARLIER wrote: > On 20 November 2017 at 18:49, Tom Lane wrote: > > > David CARLIER writes: > > > - Reducing OpenBSD postfgresql maintainer internal changes bookeeping if > > > those small changes make sense for the PostgreSQL developers. > > > > Hm

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

2017-11-20 Thread Andres Freund
Hi, On 2017-11-13 19:03:41 -0800, Andres Freund wrote: > Hi, > > On 2017-11-03 07:53:30 -0700, Andres Freund wrote: > > Here's that patch. I've stared at this some, and Robert did too. Robert > > mentioned that the commit message might need some polish and I'm not > > 100% sure about the error m

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Martín Marqués
El 09/11/17 a las 09:29, Arthur Zakirov escribió: > Hello, > > On Sun, Oct 01, 2017 at 04:49:17PM -0300, Martin Marques wrote: >> Updated patch with documentation of the new option. >> > > I have checked the patch. > The patch is applied and compiled correctly without any errors. Tests passed. >

Re: Using isatty() on WIN32 platform

2017-11-20 Thread Tom Lane
=?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= writes: > While following suggestions from Arthur Zakirov on a patch for > pg_basebackup I found that we are using isatty() in multiple places, but > we don't distinguish the WIN32 code which should use _isatty() as per [1]. I dunno, [1] looks like pure pedant

Re: Add PGDLLIMPORT lines to some variables

2017-11-20 Thread Brian Cloutier
> please, append session_timezone to your list Here's a v2 patch which also includes session_timezone. Separately, is this the kind of thing which is eligible for backporting into the next releases of 9.6 and 10? On Thu, Nov 16, 2017 at 10:27 PM, Pavel Stehule wrote: > Hi > > 2017-11-16 23:59

Re: Add PGDLLIMPORT lines to some variables

2017-11-20 Thread Andres Freund
Hi, Please quote properly on postgres mailing lists... We're old school [tm]. On 2017-11-20 11:58:44 -0800, Brian Cloutier wrote: > > please, append session_timezone to your list > > Here's a v2 patch which also includes session_timezone. > > Separately, is this the kind of thing which is eligi

Anybody care about having the verbose form of the tzdata files?

2017-11-20 Thread Tom Lane
Traditionally, src/timezone/data/ contains the source files of the IANA timezone database. That currently amounts to just under 700KB, and it's growing all the time, mostly because they keep what amounts to their entire commit log in the comments :-( IANA have recently started distributing an abb

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Alik Khilazhev
> I would suggest to use [1, 9] and the simpler regex [1-9] instead of the full > list. > > Also, there should be an empty line between functions. I just noticed that > one is missing after zipfFindOrCreateCacheCell(). Fixed. pgbench-zipf-11v.patch Description: Binary data — Thanks and Regar

Re: [HACKERS] SQL procedures

2017-11-20 Thread Andrew Dunstan
On 11/14/2017 10:54 AM, Peter Eisentraut wrote: > Here is an updated patch. It's updated for the recent documentation > format changes. I added some more documentation as suggested by reviewers. > > I also added more tests about how the various privilege commands (GRANT, > GRANT on ALL, default

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Fabien COELHO
Fixed. Applies, compiles, make check ok, doc ok. Note that the patch may interact with other patches which add functions to pgbench, so might need a rebase depending on the order in which the patch are applied. We'll see. I have added the thread to the next CF (January 2018), and marked i

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Alik Khilazhev
> I have added the thread to the next CF (January 2018), and marked it as > "ready for committer”. That’s cool, thank you for review! — Thanks and Regards, Alik Khilazhev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-11-20 Thread Alexander Korotkov
On Mon, Nov 20, 2017 at 1:59 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Nov 20, 2017 at 4:09 AM, Tomas Vondra < > tomas.von...@2ndquadrant.com> wrote: > >> Seems fine to me, although perhaps it should be split into two parts. >> One with the cube_coord_llur fixes, and the

Re: [HACKERS] pgbench regression test failure

2017-11-20 Thread Fabien COELHO
Hello Tom, 2. ISTM that we should report that 100% of the transactions were above the latency limit, not 33%; that is, the appropriate base for the "number of transactions above the latency limit" percentage is the number of actual transactions not the number of scheduled transactions. Hmmm.

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-11-20 Thread Masahiko Sawada
On Tue, Nov 14, 2017 at 4:36 PM, Masahiko Sawada wrote: > Thank you for pointing out and comments. > > On Fri, Nov 10, 2017 at 12:38 AM, Tom Lane wrote: >> Robert Haas writes: >>> No, that's not right. Now that you mention it, I realize that tuple >>> locks can definitely cause deadlocks. Exam

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread Tom Lane
David CARLIER writes: > On 20 November 2017 at 18:49, Tom Lane wrote: >> OTOH, we still have M68K >> and VAX stanzas in that file, so I suppose it's silly to complain >> about 88K. A bigger issue is that I wonder whether that code has >> ever been tested: it does not look to me like the __asm__

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread Tom Lane
I wrote: > I still dare to doubt whether you've tested this, because AFAICS > the operand numbering is wrong. The "r"(lock) operand is number 3 > given these operand declarations, not number 2. Oh, my apologies, scratch that. Evidently I put in the "+m"(*lock) operand and confused myself about w

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread David CARLIER
I m not against, I would go with your final version too. Thanks ! On 20 November 2017 at 22:36, Tom Lane wrote: > I wrote: > > I still dare to doubt whether you've tested this, because AFAICS > > the operand numbering is wrong. The "r"(lock) operand is number 3 > > given these operand declarati

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-20 Thread Michael Paquier
On Tue, Nov 21, 2017 at 3:11 AM, Fujii Masao wrote: > On Mon, Nov 20, 2017 at 4:12 PM, Masahiko Sawada > wrote: >> I agree with your approach. It makes sense to me. >> >> Attached updated patch. Please review it. > > Thanks for updating the patch! The patch basically looks good to me. I am not

Re: [PATCH] Porting small OpenBSD changes.

2017-11-20 Thread Tom Lane
David CARLIER writes: > I m not against, I would go with your final version too. Thanks ! Pushed to all supported branches. regards, tom lane

Re: [HACKERS] [PATCH] Incremental sort

2017-11-20 Thread Alexander Korotkov
Hi! On Mon, Nov 20, 2017 at 12:24 AM, Thomas Munro < thomas.mu...@enterprisedb.com> wrote: > On Wed, Nov 15, 2017 at 7:42 AM, Alexander Korotkov > wrote: > > Sure, please find rebased patch attached. > > + /* > + * Check if first "skipCols" sort values are equal. > + */ > + static bool > + cmp

Re: [HACKERS][PATCH]pg_buffercache add a buffer state column, Add fuction to decode buffer state

2017-11-20 Thread Masahiko Sawada
On Tue, Nov 14, 2017 at 6:36 PM, Moon Insung wrote: > # I add [hacker] to the mail subject. You should avoid top-posting. > > Dear Andres Freund. > > Thank you for review! >> I'm disinclined to exposing state that way. It's an internal representation >> that's not unlikely to change. Sure, >> p

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-20 Thread Masahiko Sawada
On Tue, Nov 21, 2017 at 8:03 AM, Michael Paquier wrote: > On Tue, Nov 21, 2017 at 3:11 AM, Fujii Masao wrote: >> On Mon, Nov 20, 2017 at 4:12 PM, Masahiko Sawada >> wrote: >>> I agree with your approach. It makes sense to me. >>> >>> Attached updated patch. Please review it. >> >> Thanks for up

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-20 Thread Michael Paquier
On Tue, Nov 21, 2017 at 9:37 AM, Masahiko Sawada wrote: > On Tue, Nov 21, 2017 at 8:03 AM, Michael Paquier > wrote: >> You could just add "as this allows to keep backup counters kept in >> shared memory consistent with the state of the session starting or >> stopping a backup.". > > Thank you for

Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning

2017-11-20 Thread Amit Langote
Hi David. On 2017/11/17 21:44, David Rowley wrote: > On 17 November 2017 at 23:01, Amit Langote > wrote: > >> Please find attached updated patch set. There are significant changes in >> this version as described below, including the support for hash >> partitioned tables. >> > > Hi Amit, > >

Re: [HACKERS] [PATCH] Incremental sort

2017-11-20 Thread Peter Geoghegan
On Mon, Nov 20, 2017 at 3:34 PM, Alexander Korotkov wrote: > Thank you very much for review. I really appreciate this topic gets > attention. Please, find next revision of patch in the attachment. I would really like to see this get into v11. This is an important patch, that has fallen through

Re: Add PGDLLIMPORT lines to some variables

2017-11-20 Thread Craig Ringer
On 21 November 2017 at 04:02, Andres Freund wrote: > Hi, > > Please quote properly on postgres mailing lists... We're old school [tm]. > > On 2017-11-20 11:58:44 -0800, Brian Cloutier wrote: > > > please, append session_timezone to your list > > > > Here's a v2 patch which also includes session_t

Re: Using isatty() on WIN32 platform

2017-11-20 Thread Craig Ringer
On 21 November 2017 at 03:53, Tom Lane wrote: > =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= writes: > > While following suggestions from Arthur Zakirov on a patch for > > pg_basebackup I found that we are using isatty() in multiple places, but > > we don't distinguish the WIN32 code which should use _i

Re: [HACKERS] Index only scan for cube and seg

2017-11-20 Thread Tom Lane
Andrey Borodin writes: >> 29 окт. 2017 г., в 2:24, Alexander Korotkov >> написал(а): >> Thus, it should be safe to just remove both compress/decompress methods from >> existing opclass. > Alexander, Tom, you are absolutely right. I was sure there is toasting code > in cube's compress, but it

Combine function returning NULL unhandled?

2017-11-20 Thread Andres Freund
Hi, Since commit a7de3dc5c346e07e0439275982569996e645b3c2 Author: Robert Haas Date: 2016-01-20 13:46:50 -0500 Support multi-stage aggregation. Aggregate nodes now have two new modes: a "partial" mode where they output the unfinalized transition state, and a "finalize" mode whe

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

2017-11-20 Thread Michael Paquier
On Sun, Nov 19, 2017 at 8:13 AM, Michael Paquier wrote: > On Sun, Nov 19, 2017 at 12:56 AM, Peter Eisentraut > wrote: >> I'll be off for a week, so perhaps by that time you could make a rebased >> version of the rest? I'm not sure how much more time I'll have, so >> maybe it will end up being mo

Re: [HACKERS] subscription worker signalling wal writer too much

2017-11-20 Thread Michael Paquier
On Thu, Oct 5, 2017 at 10:59 PM, Robert Haas wrote: > This patch wasn't formatted very nicely; attached is a version that > pgindent likes better and doesn't bust past 80 columns. > > I think this patch needs significantly better comments. There's no > explanation of the rather complex formula th

Re: Failed to delete old ReorderBuffer spilled files

2017-11-20 Thread Masahiko Sawada
On Mon, Nov 20, 2017 at 7:35 PM, atorikoshi wrote: > Hi, > > I put many queries into one transaction and made ReorderBuffer spill > data to disk, and sent SIGKILL to postgres before the end of the > transaction. > > After starting up postgres again, I observed the files spilled to > data wasn't de

View with duplicate GROUP BY entries

2017-11-20 Thread Ashutosh Bapat
Hi All, While reviewing patch for similar problem in postgres_fdw [1], I noticed that we don't use positional notation while creating the view. This might introduced anomalies when GROUP BY entries are non-immutable. E.g. postgres=# create view aggv as select c2 c21, c2 c22 from t1 group by 1, 2;

Re: [HACKERS] proposal: Support Unicode host variable in ECPG

2017-11-20 Thread Michael Paquier
On Thu, Oct 26, 2017 at 12:29 PM, Jing Wang wrote: > I would like to provide the patch file that ECPG can support the utf16/utf32 > unicode host variable type. This feature is used to compatible the same > feature in Oracle's. Please find Oracle's feature in the [1]. > > [1] https://docs.oracle.co

Re: [HACKERS] More stats about skipped vacuums

2017-11-20 Thread Kyotaro HORIGUCHI
Thank you for the comments. At Sat, 18 Nov 2017 22:23:20 +0900, Michael Paquier wrote in > On Thu, Nov 16, 2017 at 7:34 PM, Kyotaro HORIGUCHI > wrote: > > At Wed, 15 Nov 2017 16:13:01 +0900, Michael Paquier > > wrote in > > > >> Please use spaces instead of tabs. Indentation is not consist

Re: [HACKERS] Parallel Append implementation

2017-11-20 Thread Rafia Sabih
On Mon, Nov 13, 2017 at 12:54 PM, Amit Khandekar wrote: > Thanks a lot Robert for the patch. I will have a look. Quickly tried > to test some aggregate queries with a partitioned pgbench_accounts > table, and it is crashing. Will get back with the fix, and any other > review comments. > > Thanks >

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-20 Thread Arthur Zakirov
On Mon, Nov 20, 2017 at 04:45:48PM -0300, Martín Marqués wrote: > New version of patch, without the --batch-mode option and using isatty() > Great! > + fprintf(stderr, "waiting for checkpoint"); > + if (isatty(fileno(stderr))) > + fprintf(stderr, "\n")

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-11-20 Thread Ashutosh Bapat
On Fri, Nov 17, 2017 at 6:24 PM, David Rowley wrote: > > I'm kind of thinking this patch should change that, even if the patch is not > making use of the indexes, you could argue that something using > set_rel_pathlist_hook might want to do something there, although, there's > likely a bunch of co

Re: [HACKERS] pgbench regression test failure

2017-11-20 Thread Fabien COELHO
Hello Tom, Thanks for having a look at this bug fix. So we fixed the reported TPS rate, which was nowhere near reality, and the per-script stats are sane now. Good so far, but this still has two problems IMO: 1. The per-script stats shouldn't be printed at all if there's only one script. Th

Re: [HACKERS] Repetitive code in RI triggers

2017-11-20 Thread Ildar Musin
On 19.11.2017 00:31, Tom Lane wrote: Ildar Musin writes: [ ri_triggers_v2.patch ] Pushed with two minor improvements. I noticed that ri_setdefault could just go directly to ri_restrict rather than call the two separate triggers that would end up there anyway; that lets its argument be "Tri

Re: no library dependency in Makefile?

2017-11-20 Thread 高增琦
The attached patch use normal dependency instead of order-only dependency for static libraries. 2017-11-20 12:58 GMT+08:00 高增琦 : > > > 2017-11-20 2:25 GMT+08:00 Tom Lane : > >> =?UTF-8?B?6auY5aKe55Cm?= writes: >> > I very much look forward to hearing everyone's views on this issue. >> > If the s

Re: Jsonb transform for pl/python

2017-11-20 Thread Anthony Bykov
On Mon, 13 Nov 2017 15:08:16 + Aleksander Alekseev wrote: > The following review has been posted through the commitfest > application: make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tes

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Ildus Kurbangaliev
On Mon, 20 Nov 2017 00:23:23 +0100 Tomas Vondra wrote: > On 11/15/2017 02:13 PM, Robert Haas wrote: > > On Wed, Nov 15, 2017 at 4:09 AM, Ildus Kurbangaliev > > wrote: > >> So in the next version of the patch I can just unlink the options > >> from compression methods and dropping compression m

Failed to delete old ReorderBuffer spilled files

2017-11-20 Thread atorikoshi
Hi, I put many queries into one transaction and made ReorderBuffer spill data to disk, and sent SIGKILL to postgres before the end of the transaction. After starting up postgres again, I observed the files spilled to data wasn't deleted. I think these files should be deleted because its transac

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-20 Thread Dmitry Dolgov
> On 19 November 2017 at 16:13, Arthur Zakirov wrote: > > I think it is time to mark the patch as "Ready for Commiter". I've > marked it. Good, thank you for the comprehensive review.

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-11-20 Thread Alexander Korotkov
Hi, Tomas! On Mon, Nov 20, 2017 at 4:09 AM, Tomas Vondra wrote: > Seems fine to me, although perhaps it should be split into two parts. > One with the cube_coord_llur fixes, and then g_cube_distance changes > adding support for negative coordinates. Thank you for your feedback. I'll split thi

Unicode or local language

2017-11-20 Thread Lelisa Diriba
unicode=# SET CLIENT_ENCODING TO UNICODE; SET unicode=# show client_encoding; client_encoding - UTF8 (1 row) insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i want to SELECT FROM SQL SHELL(PSQL) i doesn't the normal value.how psql support UNICODE chara

Re: [COMMITTERS] pgsql: Add hash partitioning.

2017-11-20 Thread amul sul
On Sat, Nov 18, 2017 at 1:19 AM, Robert Haas wrote: > On Thu, Nov 16, 2017 at 9:37 AM, amul sul wrote: >> Fixed in the 001 patch. >> >> IMHO, this function is not meant for a user, so that instead of ereport() >> cant >> we simply return false? TWIW, I have attached 003 patch which replaces all

Re: Unicode or local language

2017-11-20 Thread Laurenz Albe
Lelisa Diriba wrote: > unicode=# SET CLIENT_ENCODING TO UNICODE; > SET > unicode=# show client_encoding; > client_encoding > - > UTF8 > (1 row) > insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i > want to SELECT FROM SQL SHELL(PSQL) i doesn't the nor

Re: [HACKERS] [PATCH] A hook for session start

2017-11-20 Thread Fabrízio de Royes Mello
On Mon, Nov 20, 2017 at 1:38 AM, Tom Lane wrote: > > Michael Paquier writes: > > On Mon, Nov 20, 2017 at 12:11 PM, Tom Lane wrote: > >> The stuff related to AuxProcType is in miscadmin.h, so one possibility > >> is to put the new enum there. But I could see inventing a whole new > >> header for

[PATCH] Porting small OpenBSD changes.

2017-11-20 Thread David CARLIER
Hi, Compilation pass, make check passes. Motivations : - Reducing OpenBSD postfgresql maintainer internal changes bookeeping if those small changes make sense for the PostgreSQL developers. Hope it is good. Thanks in advance. Kind regards. 0001-PATCH-1-1-Porting-OpenBSD-internal-changes.pat

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-20 Thread Amit Kapila
On Wed, Nov 15, 2017 at 6:58 PM, Robert Haas wrote: > On Tue, Nov 14, 2017 at 12:28 AM, Thomas Munro > wrote: >> Thanks. You're right. Rebased and updated to describe what "off" does. > > Committed. > Thanks, reflected the same in CF entry (https://commitfest.postgresql.org/16/1375/). -- Wit

Re: Jsonb transform for pl/python

2017-11-20 Thread Aleksander Alekseev
Hi Anthony, > thank you for your review. I took your comments into account in the > third version of the patch. In the new version, I've added all the > tests you asked for. The interesting thing is that: > 1. set or any other non-jsonb-transformable object is transformed into > string and added t

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Alik Khilazhev
> Patch applies with "patch", but not with "git apply", probably because it is > in CR-NL eol format. No big deal. > > Documentation has been switched from SGML to XML, so now tags must be > explicitely closed, i.e. use x instead of x. > > Patch compiles with a warning: > > Declaration must m

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 10:44 AM, Ildus Kurbangaliev wrote: > On Mon, 20 Nov 2017 00:23:23 +0100 > Tomas Vondra wrote: > >> On 11/15/2017 02:13 PM, Robert Haas wrote: >>> On Wed, Nov 15, 2017 at 4:09 AM, Ildus Kurbangaliev >>> wrote: So in the next version of the patch I can just unlink the optio

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Евгений Шишкин
> On Nov 20, 2017, at 18:18, Tomas Vondra wrote: > > > I don't think we need to do anything smart here - it should behave just > like dropping a data type, for example. That is, error out if there are > columns using the compression method (without CASCADE), and drop all the > columns (with CA

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 04:21 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:18, Tomas Vondra > > wrote: >> >> >> I don't think we need to do anything smart here - it should behave just >> like dropping a data type, for example. That is, error out if there are

IndexTupleDSize macro seems redundant

2017-11-20 Thread Ildar Musin
Hi all, While I was looking through the indexes code I got confused by couple of macros - IndexTupleSize() and IndexTupleDSize() - which seem to do the same thing with only difference that the first one takes pointer as an argument while the second one takes struct. And in most cases IndexTup

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Евгений Шишкин
> On Nov 20, 2017, at 18:29, Tomas Vondra wrote: > >> >> What about instead of dropping column we leave data uncompressed? >> > > That requires you to go through the data and rewrite the whole table. > And I'm not aware of a DROP command doing that, instead they just drop > the dependent obj

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Ildus Kurbangaliev
On Mon, 20 Nov 2017 16:29:11 +0100 Tomas Vondra wrote: > On 11/20/2017 04:21 PM, Евгений Шишкин wrote: > > > > > >> On Nov 20, 2017, at 18:18, Tomas Vondra > >> >> > wrote: > >> > >> > >> I don't think we need to do anything smart here - it should behave

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-20 Thread Fabien COELHO
Hello Alik, Patch applies, compiles, works (I checked the distribution). Doc gen ok. make check ok. I have reduced range to [1, 10] and updated the test. I would suggest to use [1, 9] and the simpler regex [1-9] instead of the full list. Also, there should be an empty line between funct

Re: [HACKERS] Custom compression methods

2017-11-20 Thread Tomas Vondra
On 11/20/2017 04:43 PM, Евгений Шишкин wrote: > > >> On Nov 20, 2017, at 18:29, Tomas Vondra wrote: >> >>> >>> What about instead of dropping column we leave data uncompressed? >>> >> >> That requires you to go through the data and rewrite the whole table. >> And I'm not aware of a DROP comman

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-11-20 Thread Alvaro Herrera
BTW see bug #14863 which is related to this: https://postgr.es/m/CAEBTBzu5j_E1K1jb9OKwTZj98MPeM7V81-vadp5adRm=nhj...@mail.gmail.com -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] [PATCH] A hook for session start

2017-11-20 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > typedef enum > { > ClientBackendProcess = -1, > CheckerProcess = 0, > BootstrapProcess, Uh, why would you do that (start from -1)? It makes it impossible to build an array indexed by the enum, which might be useful --- converting enu

  1   2   >