wrong formatting psql expanded mode short columns

2017-11-15 Thread Pavel Stehule
Hi postgres=# select i, i from generate_series(1,5) g(i); ┌─[ RECORD 1 ]─┐ │ i │ 1 │ │ i │ 1 │ ╞═[ RECORD 2 ]═╡ │ i │ 2 │ │ i │ 2 │ ╞═[ RECORD 3 ]═╡ │ i │ 3 │ │ i │ 3 │ ╞═[ RECORD 4 ]═╡ │ i │ 4 │ │ i │ 4 │ ╞═[ RECORD 5 ]═╡ │ i │ 5 │ │ i │ 5 │ └───┴───┘ The last column need to be more wider Regar

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-15 Thread Michael Paquier
On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane wrote: > Andrew Dunstan writes: >> Disable installcheck tests for test_session_hooks > > This seems not quite right; it's causing warnings like this: > > $ make -s clean > Makefile:25: warning: overriding commands for target `installcheck' > ../../../../

Re: pspg - psql pager

2017-11-15 Thread Pavel Stehule
2017-11-16 1:12 GMT+01:00 Jason Petersen : > On Nov 15, 2017, at 1:41 AM, Pavel Stehule > wrote: > > I hope so this pager is useful - I know some users who use it few months > intensively. But the source code has proof concept quality. It should be > cleaned next year. > > > This is great! I’ve

Re: Further simplification of c.h's #include section

2017-11-15 Thread Michael Paquier
On Thu, Nov 16, 2017 at 2:23 PM, David Rowley wrote: > I do get some warnings: > > (ClCompile target) -> > src/test/modules/test_session_hooks/test_session_hooks.c(112): warning > C4113: 'void (__cdecl *)()' differs in parameter lists from > 'session_start_hook_type' [test_session_hooks.vcxproj]

Re: Further simplification of c.h's #include section

2017-11-15 Thread David Rowley
On 16 November 2017 at 15:52, Tom Lane wrote: > Anybody want to test this manually, or shall we just throw it into the > buildfarm and see what blows up? I don't have any cygwin around, but it compiles fine with the Visual Studios 2012 toolchain. I do get some warnings: (ClCompile target) ->

Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)

2017-11-15 Thread David Rowley
On 16 November 2017 at 16:38, Peter Geoghegan wrote: > * To understand how this relates to admission control. The only > obvious difference that I can think of is that admission control > probably involves queuing when very memory constrained, and isn't > limited to caring about memory. I'm not tr

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 9:34 PM, Amit Kapila wrote: > The main advantage of local queue idea is that it won't consume any > memory by default for running parallel queries. It would consume > memory when required and accordingly help in speeding up those cases. > However, increasing the size of sh

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

2017-11-15 Thread Michael Paquier
On Thu, Nov 16, 2017 at 10:57 AM, Masahiko Sawada wrote: > Agreed. Attached the updated patch, please review it. + /* +* Quick exit if session is not keeping around a non-exclusive backup +* already started. +*/ + if (sessionBackupState != SESSION_BACKUP_NON_EXCLUSIVE) + ret

Re: [HACKERS] path toward faster partition pruning

2017-11-15 Thread David Rowley
On 16 November 2017 at 15:54, Kyotaro HORIGUCHI wrote: > Anyway I added __attribute((noinline)) to the two > functions and got the following result. > >> bms_add_range in 1.24 (12.4 ns per loop) >> bms_add_range2 in 0.8 (8 ns per loop) I see similar here with __attribute((noinline)). Thanks for i

Treating work_mem as a shared resource (Was: Parallel Hash take II)

2017-11-15 Thread Peter Geoghegan
On Wed, Nov 15, 2017 at 1:06 PM, Thomas Munro wrote: > In the old days, Oracle had only simple per-operation memory limits > too, and that applied to every operation in every thread just like our > work_mem. It's interesting that they had separate knobs for sort and > hash though, and defaulted t

Re: [HACKERS] Timeline ID in backup_label file

2017-11-15 Thread Michael Paquier
On Thu, Nov 16, 2017 at 9:20 AM, David Steele wrote: > For this patch at least, I think we should do #1. Getting rid of the order > dependency is attractive but there may be other programs that are depending > on the order. I know you are not proposing to change the order now, but it > *could* b

Re: [HACKERS] path toward faster partition pruning

2017-11-15 Thread Kyotaro HORIGUCHI
Thanks for the interesting test, David. At Tue, 14 Nov 2017 17:00:12 +1300, David Rowley wrote in > On 13 November 2017 at 22:46, Amit Langote > wrote: > > On 2017/11/10 12:30, Kyotaro HORIGUCHI wrote: > >> Without some aggressive optimization, the loop takes most of the > >> time to check-and

Re: Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 15, 2017 at 5:22 PM, Tom Lane wrote: >> Thoughts? > Sure, having a win32_port.h as a sub-include of port.h seems fine. Here's a draft patch for this. I'm not too certain about the interactions with Cygwin; some of the stuff I moved out of port.h might have to

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-15 Thread Amit Kapila
On Thu, Nov 16, 2017 at 12:18 AM, Robert Haas wrote: > On Tue, Nov 14, 2017 at 7:31 AM, Rafia Sabih > wrote: > Similarly, I think that faster_gather_v3.patch is effectively here > because it lets all the workers run at the same time, not because > Gather gets any faster. The local queue is 100x

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-15 Thread Robert Haas
On Mon, Nov 13, 2017 at 3:25 AM, Masahiko Sawada wrote: > In ginInsertCleanup(), we lock the GIN meta page by LockPage and could > wait for the concurrent cleaning up process if stats == NULL. And the > source code comment says that this happen is when ginINsertCleanup is > called by [auto]vacuum/

Re: [HACKERS] moving some partitioning code to executor

2017-11-15 Thread Amit Langote
On 2017/11/16 0:29, Robert Haas wrote: > On Tue, Nov 14, 2017 at 7:59 PM, Amit Langote > wrote: >> On 2017/11/15 2:09, Alvaro Herrera wrote: >>> Amit Langote wrote: >>> Since that 0001 patch was committed [1], here is the rebased patch. Will add this to the November commit-fest. >>> >>>

Re: Further simplification of c.h's #include section

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 5:22 PM, Tom Lane wrote: > Thoughts? Sure, having a win32_port.h as a sub-include of port.h seems fine. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

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

2017-11-15 Thread Masahiko Sawada
On Wed, Nov 15, 2017 at 5:39 PM, Michael Paquier wrote: > On Wed, Nov 15, 2017 at 5:21 PM, Masahiko Sawada > wrote: >> On Wed, Nov 15, 2017 at 2:38 PM, Michael Paquier >> wrote: >>> On Wed, Nov 15, 2017 at 12:12 PM, Masahiko Sawada >>> wrote: I think we need to check only sessionBackupSt

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-15 Thread David Rowley
On 16 November 2017 at 05:57, Konstantin Knizhnik wrote: > The main problem IMHO is that there are a lot of different threads and > patches related with this topic:( > And it is very difficult to combine all of them together to achieve the > final goal: efficient execution of OLAP queries on shard

Re: [HACKERS] Timeline ID in backup_label file

2017-11-15 Thread David Steele
On 11/15/17 6:01 PM, Michael Paquier wrote: On Wed, Nov 15, 2017 at 11:16 PM, David Steele wrote: Find my review below. On 10/26/17 2:03 PM, Michael Paquier wrote: Thanks for the feedback. Attached is a patch to achieve so, I have added as well a STOP TIMELINE field in the backup history fil

Re: pspg - psql pager

2017-11-15 Thread Jason Petersen
> On Nov 15, 2017, at 1:41 AM, Pavel Stehule wrote: > > I hope so this pager is useful - I know some users who use it few months > intensively. But the source code has proof concept quality. It should be > cleaned next year. This is great! I’ve submitted it to homebrew to aid installation fo

Re: [HACKERS] Timeline ID in backup_label file

2017-11-15 Thread Michael Paquier
On Wed, Nov 15, 2017 at 11:16 PM, David Steele wrote: > Find my review below. > > On 10/26/17 2:03 PM, Michael Paquier wrote: >> >> Thanks for the feedback. Attached is a patch to achieve so, I have >> added as well a STOP TIMELINE field in the backup history file. Note >> that START TIMELINE gets

Re: Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
I wrote: > Robert Haas writes: >> On Wed, Nov 15, 2017 at 4:32 PM, Tom Lane wrote: >>> How do you feel about "win32_more.h"? >> Seems morally equivalent to what you had before. I think what I would >> be looking for is a filename that somehow conveys what the difference >> is between what shoul

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-15 Thread Dmitry Dolgov
> On 14 November 2017 at 22:25, Dmitry Dolgov <9erthali...@gmail.com> wrote: > But now I wonder if `resnull` is really needed in `jsonb_get_element`, > `array_get_element` and it seems to me that I can even get rid of it so On the second thought, no, looks like I'm wrong and it should be like this

Re: Updated macOS start scripts

2017-11-15 Thread Tom Lane
Mark Dilger writes: > I am reasonably content with your earlier idea of not keeping support > for ancient versions of OS X, but if you want to do what you describe > above, I'd be happy to review that on my 10.6 box to verify that > everything works at least that far back. I don't have access to

Re: Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 15, 2017 at 4:32 PM, Tom Lane wrote: >> How do you feel about "win32_more.h"? > Seems morally equivalent to what you had before. I think what I would > be looking for is a filename that somehow conveys what the difference > is between what should go in the exis

Re: [HACKERS] Transaction control in procedures

2017-11-15 Thread Peter Eisentraut
On 11/15/17 09:54, Merlin Moncure wrote: > ... I noticed that: > *) now() did not advance with commit and, > *) xact_start via pg_stat_activity did not advance > > Shouldn't both of those advance with the in-loop COMMIT? I think you are correct. I'll include that in the next patch version. It sh

Re: Updated macOS start scripts

2017-11-15 Thread Mark Dilger
> On Nov 15, 2017, at 1:37 PM, Tom Lane wrote: > > Mark Dilger writes: >> I have tested this on 10.11.6. I had no trouble following the instructions >> in the README and everything worked as described. >> As far as I can tell, this patch has not yet been submitted to any >> commitfest. >> I wo

Re: [HACKERS] Transaction control in procedures

2017-11-15 Thread Peter Eisentraut
On 11/8/17 18:48, Simon Riggs wrote: > What would happen if some of the INSERTs failed? Where would control > go to? (Maybe this is just "no change" in this particular proc) An exception is raised and unless the exception is caught (depending on the PL), control leaves the procedure. What is alre

Re: Updated macOS start scripts

2017-11-15 Thread Tom Lane
Mark Dilger writes: > I have tested this on 10.11.6. I had no trouble following the instructions > in the README and everything worked as described. > As far as I can tell, this patch has not yet been submitted to any commitfest. > I would mark it Read for Committer. Thanks for reviewing! Since

Re: Further simplification of c.h's #include section

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 4:32 PM, Tom Lane wrote: >>> I have no objection to trying to clean things up in that area, but I >>> request a less-lame filename than win32_2.h > >> Sure, if you have a suggestion. > > How do you feel about "win32_more.h"? Seems morally equivalent to what you had before.

Re: Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
I wrote: > Robert Haas writes: >> On Wed, Nov 15, 2017 at 10:51 AM, Tom Lane wrote: >>> 1. Move what's currently in src/include/port/win32.h (a/k/a >>> pg_config_os.h) to a new file, say src/include/port/win32_2.h. >> I have no objection to trying to clean things up in that area, but I >> reques

Re: [HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-11-15 Thread Robert Haas
On Wed, Sep 13, 2017 at 11:50 AM, Adrian Escoms wrote: > I realized that the parameter 'shared_preload_libraries' used to belong to > category 'Resource Usage / Kernel Resources' but since postgresql version > 9.4 it was changed in pg_settings to 'Client Connection Defaults / Shared > Library Prel

Re: Fix number skipping in to_number

2017-11-15 Thread Tom Lane
I wrote: > Oliver Ford writes: >> On Monday, 13 November 2017, Tom Lane wrote: >>> I don't follow your concern? If "$" is not the correct currency >>> symbol for the locale, we shouldn't accept it as a match to an L format. >>> Your patch is tightening what we will accept as a match to a G forma

Re: Transaction control in procedures

2017-11-15 Thread Peter Eisentraut
On 11/14/17 17:40, legrand legrand wrote: > will that kind of statement (that is permitted with Oracle but gives errors > ora-1555 snapshot too old) be permitted ? > > begin > for c in (select id from tab where cond='blabla') > loop > update tab set x=1 where id=c.id; > commit; > end lo

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

2017-11-15 Thread Robert Haas
On Mon, Oct 30, 2017 at 9:19 PM, Badrul Chowdhury wrote: > Thank you for the comprehensive review! We are very much in the early stages > of contributing to the PG community and we clearly have lots to learn, but we > look forward to becoming proficient and active members of the pg community. >

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Thomas Munro
On Thu, Nov 16, 2017 at 8:09 AM, Robert Haas wrote: > On Wed, Nov 15, 2017 at 1:35 PM, Andres Freund wrote: >> But this does bug me, and I think it's what made me pause here to make a >> bad joke. The way that parallelism treats work_mem makes it even more >> useless of a config knob than it was

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Thomas Munro
On Thu, Nov 16, 2017 at 7:57 AM, Peter Geoghegan wrote: > The contrast with the situation with Thomas and his hash join patch is > interesting. Hash join is *much* more sensitive to the availability of > memory than a sort operation is. > >> I don't really have a good answer to "but what should we

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Thomas Munro
On Thu, Nov 16, 2017 at 7:35 AM, Andres Freund wrote: > On 2017-11-15 08:37:11 -0500, Robert Haas wrote: >> I mean, the very first version of this patch that Thomas submitted was >> benchmarked by Rafia and had phenomenally good performance >> characteristics. That turned out to be because it was

Re: [HACKERS] taking stdbool.h into use

2017-11-15 Thread Peter Eisentraut
I'm going to put this patch set as Returned With Feedback for now. The GinNullCategory issues look like they will need quite a bit of work. But it will be worth picking this up some time. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DB

Re: [HACKERS] Issues with logical replication

2017-11-15 Thread Robert Haas
On Mon, Oct 9, 2017 at 9:19 PM, Stas Kelvich wrote: > I investigated this case and it seems that XactLockTableWait() in > SnapBuildWaitSnapshot() > not always work as expected. XactLockTableWait() waits on LockAcquire() for > xid to be > completed and if we finally got this lock but transactio

Re: Updated macOS start scripts

2017-11-15 Thread Mark Dilger
> On Nov 15, 2017, at 11:00 AM, Tom Lane wrote: > > Mark Dilger writes: >>> On Nov 15, 2017, at 8:32 AM, Tom Lane wrote: >>> The stuff in contrib/start-scripts/osx/ does not, as far as I know, >>> work at all on any recent release of macOS, because SystemStarter >>> is long gone. I propose re

Re: [HACKERS] pg audit requirements

2017-11-15 Thread Pavel Stehule
2017-11-15 16:21 GMT+01:00 David Steele : > On 11/13/17 1:43 PM, Pavel Stehule wrote: > >> 2017-11-13 19:19 GMT+01:00 David Steele > > > > >> Thanks for the input! I'm not sure this is the best forum for >> comments, however, since pgAudit is not part of Postgres. >> >> Issues can be

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 1:35 PM, Andres Freund wrote: > But this does bug me, and I think it's what made me pause here to make a > bad joke. The way that parallelism treats work_mem makes it even more > useless of a config knob than it was before. Parallelism, especially > after this patch, shou

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Andres Freund
Hi, On 2017-11-15 10:57:35 -0800, Peter Geoghegan wrote: > > I don't really have a good answer to "but what should we otherwise do", > > but I'm doubtful this is quite the right answer. > > I think that the work_mem model should be replaced by something that > centrally budgets memory. It would m

Re: Updated macOS start scripts

2017-11-15 Thread Tom Lane
Mark Dilger writes: >> On Nov 15, 2017, at 8:32 AM, Tom Lane wrote: >> The stuff in contrib/start-scripts/osx/ does not, as far as I know, >> work at all on any recent release of macOS, because SystemStarter >> is long gone. I propose replacing it with the attached, which >> I've tested on curre

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Peter Geoghegan
On Wed, Nov 15, 2017 at 10:35 AM, Andres Freund wrote: >> I realize you're sort of joking here, but I think it's necessary to >> care about fairness between pieces of code. > > Indeed I kinda was. When I posted v1 of parallel CREATE INDEX, it followed the hash join model of giving workMem (mainte

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-15 Thread Andres Freund
Hi, On 2017-11-15 13:48:18 -0500, Robert Haas wrote: > I think that we need a little bit deeper analysis here to draw any > firm conclusions. Indeed. > I suspect that one factor is that many of the queries actually send > very few rows through the Gather. Yep. I kinda wonder if the same result

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-15 Thread Robert Haas
On Tue, Nov 14, 2017 at 7:31 AM, Rafia Sabih wrote: > Case 2: patches applied as in case 1 + >a) increased PARALLEL_TUPLE_QUEUE_SIZE to 655360 > No significant change in performance in any query >b) increased PARALLEL_TUPLE_QUEUE_SIZE to 65536 * 50 > Performance improved from 2

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2017-11-15 Thread Peter Geoghegan
On Tue, Nov 14, 2017 at 10:01 AM, Peter Geoghegan wrote: > On Tue, Nov 14, 2017 at 1:41 AM, Rushabh Lathia > wrote: >> Thanks Peter and Thomas for the review comments. > > No problem. More feedback: I see that Robert just committed support for a parallel_leader_participation GUC. Parallel tuples

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Andres Freund
On 2017-11-15 08:37:11 -0500, Robert Haas wrote: > On Tue, Nov 14, 2017 at 4:24 PM, Andres Freund wrote: > >> I agree, and I am interested in that subject. In the meantime, I > >> think it'd be pretty unfair if parallel-oblivious hash join and > >> sort-merge join and every other parallel plan ge

Re: Updated macOS start scripts

2017-11-15 Thread Mark Dilger
> On Nov 15, 2017, at 8:32 AM, Tom Lane wrote: > > The stuff in contrib/start-scripts/osx/ does not, as far as I know, > work at all on any recent release of macOS, because SystemStarter > is long gone. I propose replacing it with the attached, which > I've tested on current-vintage Macs. > I

Re: pspg - psql pager

2017-11-15 Thread Pavel Stehule
2017-11-15 18:38 GMT+01:00 Gibrain : > I can't thank you enough pavel. > I use psql on a daily basis since 8 years ago, with a lot "less" pain, > Love vim keybindings and freeze column features. > Works smoothly in ubuntu 16.04 x86_64. > > > ​ > :) pspg is postcardware - if you like it, send me

Re: pspg - psql pager

2017-11-15 Thread Gibrain
I can't thank you enough pavel. I use psql on a daily basis since 8 years ago, with a lot "less" pain, Love vim keybindings and freeze column features. Works smoothly in ubuntu 16.04 x86_64. ​

Re: Updated macOS start scripts

2017-11-15 Thread Mark Dilger
> On Nov 15, 2017, at 8:32 AM, Tom Lane wrote: > > The stuff in contrib/start-scripts/osx/ does not, as far as I know, > work at all on any recent release of macOS, because SystemStarter > is long gone. I propose replacing it with the attached, which > I've tested on current-vintage Macs. > >

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-15 Thread Konstantin Knizhnik
On 15.11.2017 13:35, Jeevan Chalke wrote: As explained by Ashutosh Bapat in reply https://www.postgresql.org/message-id/CAFjFpRdpeMTd8kYbM_x0769V-aEKst5Nkg3+coG=8ki7s8z...@mail.gmail.com we cannot rely on just aggtype==aggtranstype. Obviously this check (aggtype==aggtranstype) is not correct

Updated macOS start scripts

2017-11-15 Thread Tom Lane
The stuff in contrib/start-scripts/osx/ does not, as far as I know, work at all on any recent release of macOS, because SystemStarter is long gone. I propose replacing it with the attached, which I've tested on current-vintage Macs. If anyone's interested in reviewing this, I'll stick it into the

Re: [HACKERS] [PATCH] Incremental sort

2017-11-15 Thread Antonin Houska
Antonin Houska wrote: > Alexander Korotkov wrote: > > > Patch rebased to current master is attached. I'm going to improve my > > testing script and post new results. > > I wanted to review this patch but incremental-sort-8.patch fails to apply. Can > you please rebase it again? I could find

Re: Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 15, 2017 at 10:51 AM, Tom Lane wrote: >> 1. Move what's currently in src/include/port/win32.h (a/k/a >> pg_config_os.h) to a new file, say src/include/port/win32_2.h. > I have no objection to trying to clean things up in that area, but I > request a less-lame fi

Re: Schedule for migration to pglister

2017-11-15 Thread Noah Misch
On Wed, Nov 15, 2017 at 09:18:31AM -0500, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: > > When each list migrated, its mbox archives stopped receiving new messages: > > This was actually anticipated, though we had been thinking that the > migration would be faster and so it woul

Re: Further simplification of c.h's #include section

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 10:51 AM, Tom Lane wrote: > 1. Move what's currently in src/include/port/win32.h (a/k/a > pg_config_os.h) to a new file, say src/include/port/win32_2.h. I have no objection to trying to clean things up in that area, but I request a less-lame filename than win32_2.h -- Ro

Re: Separate leader buffer info and worker wait info in EXPLAIN output?

2017-11-15 Thread Robert Haas
On Tue, Nov 14, 2017 at 6:09 PM, Thomas Munro wrote: > EXPLAIN can show per-worker information and aggregated information, > but doesn't show the leader's information individually. Should it? > > Example: > > Partial Aggregate [...] > Output: PARTIAL count(*) > Buffers: shared hit=476 >

Further simplification of c.h's #include section

2017-11-15 Thread Tom Lane
Yesterday's commit 91aec93e6 got rid of quite a bit of unprincipled cruft that had accumulated in c.h's #include section. It occurs to me that we could clean it up some more, eliminating almost all the Windows-specific hacking there, by doing this: 1. Move what's currently in src/include/port/win

Re: [HACKERS] moving some partitioning code to executor

2017-11-15 Thread Robert Haas
On Tue, Nov 14, 2017 at 7:59 PM, Amit Langote wrote: > On 2017/11/15 2:09, Alvaro Herrera wrote: >> Amit Langote wrote: >> >>> Since that 0001 patch was committed [1], here is the rebased patch. Will >>> add this to the November commit-fest. >> >> Please rebase once more -- 1aba8e651ac3 seems to

Re: Rewriting PL/Python's typeio code

2017-11-15 Thread Tom Lane
Anthony Bykov writes: > I have checked your patch. Everything looks fine for me, but I have some > doubts: Thanks for reviewing! > 1. In file plpy_exec.c there is a typo on line 347: > "... We use the result and resultin[should be here "g"?] variables... No, "resultin" is the name of the varia

Re: [HACKERS] pg audit requirements

2017-11-15 Thread David Steele
On 11/13/17 1:43 PM, Pavel Stehule wrote: 2017-11-13 19:19 GMT+01:00 David Steele > Thanks for the input!  I'm not sure this is the best forum for comments, however, since pgAudit is not part of Postgres. Issues can be opened at the github site: https://github.com/pgaudit/pgaudi

Re: pspg - psql pager

2017-11-15 Thread Geoff Winkless
On 15 November 2017 at 09:41, Pavel Stehule wrote: > Hi > > I finished new pager, that can be interesting for postgresql expert users. > > It demonstrate some possibilities of TUI and I hope it shows some possible > directions of future possibilities of psql. > > It is available as rpm from our r

Re: pspg - psql pager

2017-11-15 Thread Nicolas Barbier
2017-11-15 Merlin Moncure : > I use psql all day, every day. PSPG IS AWESOME, IF YOU USE PSQL GET > IT AND DON'T LOOK BACK. [..] > Thank you Pavel. +1! I especially love it for the improved handling of wide tables (which are really annoying with “less”). Also --no-mouse is mandatory for me bec

Re: [HACKERS] Transaction control in procedures

2017-11-15 Thread Merlin Moncure
On Wed, Nov 15, 2017 at 7:38 AM, Merlin Moncure wrote: > On Tue, Nov 14, 2017 at 5:27 PM, Peter Eisentraut >>> Can we zero in on this? The question implied, 'can you do this >>> without being in a transaction'? PERFORM do_stuff() is a implicit >>> transaction, so it ought to end when the functio

Re: pspg - psql pager

2017-11-15 Thread Pavel Stehule
2017-11-15 15:42 GMT+01:00 Merlin Moncure : > On Wed, Nov 15, 2017 at 4:45 AM, Andreas Joseph Krogh > wrote: > > På onsdag 15. november 2017 kl. 10:41:45, skrev Pavel Stehule > > : > > > > Hi > > > > I finished new pager, that can be interesting for postgresql expert > users. > > Thanks for makin

Re: pspg - psql pager

2017-11-15 Thread Merlin Moncure
On Wed, Nov 15, 2017 at 4:45 AM, Andreas Joseph Krogh wrote: > På onsdag 15. november 2017 kl. 10:41:45, skrev Pavel Stehule > : > > Hi > > I finished new pager, that can be interesting for postgresql expert users. > Thanks for making this, "-X --no-mouse" made my day. This was my first bugfix/su

Re: Schedule for migration to pglister

2017-11-15 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: > On Mon, Nov 06, 2017 at 10:36:38AM -0500, Stephen Frost wrote: > > Our planned migration schedule is as follows: > > > > Nov 6 - > > pgsql-www > > > > Nov 13 - > > pgsql-hackers > > When each list migrated, its mbox archives stopped receiving

Re: [HACKERS] Timeline ID in backup_label file

2017-11-15 Thread David Steele
Hi Michael, Find my review below. On 10/26/17 2:03 PM, Michael Paquier wrote: > > Thanks for the feedback. Attached is a patch to achieve so, I have > added as well a STOP TIMELINE field in the backup history file. Note > that START TIMELINE gets automatically into the backup history file. > Adde

Re: [HACKERS] Transaction control in procedures

2017-11-15 Thread Pavel Stehule
2017-11-15 14:38 GMT+01:00 Merlin Moncure : > On Tue, Nov 14, 2017 at 5:27 PM, Peter Eisentraut > wrote: > > On 11/14/17 16:33, Merlin Moncure wrote: > >>> One detail in your example is that when you enter the procedure, you > are > >>> already in a transaction, so you would have to run either CO

Re: [HACKERS] Transaction control in procedures

2017-11-15 Thread Merlin Moncure
On Tue, Nov 14, 2017 at 5:27 PM, Peter Eisentraut wrote: > On 11/14/17 16:33, Merlin Moncure wrote: >>> One detail in your example is that when you enter the procedure, you are >>> already in a transaction, so you would have to run either COMMIT or >>> ROLLBACK before the START TRANSACTION. >> >>

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

2017-11-15 Thread Robert Haas
On Wed, Nov 15, 2017 at 8:35 AM, Jesper Pedersen wrote: > Small typo. Thanks. That just proves no task is so simple that I can't foul it up. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Parallel Hash take II

2017-11-15 Thread Robert Haas
On Tue, Nov 14, 2017 at 4:24 PM, Andres Freund wrote: >> I agree, and I am interested in that subject. In the meantime, I >> think it'd be pretty unfair if parallel-oblivious hash join and >> sort-merge join and every other parallel plan get to use work_mem * p >> (and in some cases waste it with

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

2017-11-15 Thread Jesper Pedersen
On 11/15/2017 08:28 AM, 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. I noticed that you didn't add the new GUC to postgresql.conf.sample, so I did that. But then I thought it didn

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

2017-11-15 Thread Robert Haas
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. I noticed that you didn't add the new GUC to postgresql.conf.sample, so I did that. But then I thought it didn't really belong in the section you put it, s

Logical Replication and triggers

2017-11-15 Thread Thomas Rosenstein
I would like somebody to consider Petr Jelineks patch for worker.c from here (https://www.postgresql.org/message-id/619c557d-93e6-1833-1692-b010b176ff77%402ndquadrant.com) I'm was facing the same issue with 10.1 and BEFORE INSERT OR UPDATE triggers. BR Thomas Rosenstein

Re: [HACKERS] Custom compression methods

2017-11-15 Thread Robert Haas
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 method will not affect > already compressed tuples. They still could be decompressed. I guess I don't understand how t

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-15 Thread Jeevan Chalke
On Thu, Nov 2, 2017 at 7:36 AM, Robert Haas wrote: > On Wed, Nov 1, 2017 at 6:20 PM, Jeevan Chalke > wrote: > > Yep. > > But as David reported earlier, if we remove the first part i.e. adding > > cpu_operator_cost per tuple, Merge Append will be preferred over an > Append > > node unlike before.

Re: Schedule for migration to pglister

2017-11-15 Thread Noah Misch
On Mon, Nov 06, 2017 at 10:36:38AM -0500, Stephen Frost wrote: > Our planned migration schedule is as follows: > > Nov 6 - > pgsql-www > > Nov 13 - > pgsql-hackers When each list migrated, its mbox archives stopped receiving new messages: https://www.postgresql.org/list/pgsql-www/mbox/pgsql

Re: Rewriting PL/Python's typeio code

2017-11-15 Thread Anthony Bykov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:tested, passed Hello, I have checked your patch. Everything looks fine for me, but I

RE: User defined data types in Logical Replication

2017-11-15 Thread Huong Dangminh
Hi, > We are getting the bellow error while trying use Logical Replication with > user defined data types in a C program (when call elog function). > > ERROR: XX000: cache lookup failed for type X > Sorry for continuously disturbing in this topic, but am I missing something here? I mean

could not receive data from WAL stream: SSL SYSCALL error: Success

2017-11-15 Thread Thomas Munro
Hi hackers, I heard a report of an error like this from a user of openssl 1.1.0f-3+deb9u on Debian: pg_basebackup: could not receive data from WAL stream: SSL SYSCALL error: Success I noticed that some man pages for SSL_get_error say this under SSL_ERROR_SYSCALL: Some non-recoverable

Sv: pspg - psql pager

2017-11-15 Thread Andreas Joseph Krogh
På onsdag 15. november 2017 kl. 10:41:45, skrev Pavel Stehule < pavel.steh...@gmail.com >: Hi   I finished new pager, that can be interesting for postgresql expert users.   It demonstrate some possibilities of TUI and I hope it shows some possible directions of

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-15 Thread Jeevan Chalke
On Sun, Nov 12, 2017 at 1:59 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > On 10/27/2017 02:01 PM, Jeevan Chalke wrote: > >> Hi, >> >> Attached new patch-set here. Changes include: >> >> 1. Added separate patch for costing Append node as discussed up-front in >> the >> patch-set. >

Re: [HACKERS] Transform for pl/perl

2017-11-15 Thread Aleksander Alekseev
Hello, hackers. > > I'm curious, how much benefit we could get from this ? There are several > > publicly available json datasets, which can be used to measure performance > > gaining. I have bookmarks and review datasets available from > > http://www.sai.msu.su/~megera/postgres/files/, look at js

pspg - psql pager

2017-11-15 Thread Pavel Stehule
Hi I finished new pager, that can be interesting for postgresql expert users. It demonstrate some possibilities of TUI and I hope it shows some possible directions of future possibilities of psql. It is available as rpm from our repository or you can get source code from github https://github.c

Re: [HACKERS] Transform for pl/perl

2017-11-15 Thread Pavel Stehule
2017-11-15 10:24 GMT+01:00 Oleg Bartunov : > > > On 14 Nov 2017 11:35, "Anthony Bykov" wrote: > > On Fri, 10 Nov 2017 14:40:21 +0100 > Pavel Stehule wrote: > > > Hi > > > > 2017-10-24 14:27 GMT+02:00 Anthony Bykov : > > > > > There are some moments I should mention: > > > 1. {"1":1}::jsonb is tr

Re: [HACKERS] Transform for pl/perl

2017-11-15 Thread Oleg Bartunov
On 14 Nov 2017 11:35, "Anthony Bykov" wrote: On Fri, 10 Nov 2017 14:40:21 +0100 Pavel Stehule wrote: > Hi > > 2017-10-24 14:27 GMT+02:00 Anthony Bykov : > > > There are some moments I should mention: > > 1. {"1":1}::jsonb is transformed into HV {"1"=>"1"}, while > > ["1","2"]::jsonb is transfor

Re: [HACKERS] Custom compression methods

2017-11-15 Thread Ildus Kurbangaliev
On Sun, 5 Nov 2017 17:34:23 -0500 Robert Haas wrote: > On Sun, Nov 5, 2017 at 2:22 PM, Oleg Bartunov > wrote: > >> IIRC there were some concerns about what happened with pg_upgrade, > >> with consuming precious toast bits, and a few other things. > > > > yes, pg_upgrade may be a problem. >

Re: Transform for pl/perl

2017-11-15 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hello Anthony, Great patch! Everything is OK and I almost ag

Re: [HACKERS] SQL procedures

2017-11-15 Thread Laurenz Albe
Simon Riggs wrote: > It would seem to be implied by the SQLStandard that Functions and > Procedures occupy the same namespace, since they are both Routines. > > I can't see any benefit from having foo() function AND foo() procedure > at same time. It would certainly confuse most people that come f

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

2017-11-15 Thread Michael Paquier
On Wed, Nov 15, 2017 at 5:21 PM, Masahiko Sawada wrote: > On Wed, Nov 15, 2017 at 2:38 PM, Michael Paquier > wrote: >> On Wed, Nov 15, 2017 at 12:12 PM, Masahiko Sawada >> wrote: >>> I think we need to check only sessionBackupState and don't need to >>> check XLogCtl->Insert.exclusiveBackupStat

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

2017-11-15 Thread Masahiko Sawada
On Wed, Nov 15, 2017 at 2:38 PM, Michael Paquier wrote: > On Wed, Nov 15, 2017 at 12:12 PM, Masahiko Sawada > wrote: >> I think we need to check only sessionBackupState and don't need to >> check XLogCtl->Insert.exclusiveBackupState in do_pg_abort_backup(). We >> can quickly return if sessionBac

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-15 Thread Michael Paquier
On Sat, Nov 11, 2017 at 9:01 AM, Michael Paquier wrote: > On Sat, Nov 11, 2017 at 12:50 AM, Robert Haas wrote: >> On Fri, Nov 10, 2017 at 10:34 AM, Tom Lane wrote: >>> I think as far as that goes, we can just change to "Therefore, by default >>> their use is restricted ...". Then I suggest addi

no library dependency in Makefile?

2017-11-15 Thread 高增琦
Hi, Recently, I found 'psql' is not rebuilt automatically after editing 'fe_utils/psqlscan.l'. The detail is: 'psqlscan.l' is part of 'libpgfeutils.a' which will be built into 'psql' statically. But there is no dependency rule between them. It's OK for 'libpq' since 'libpq' is a dynamic library.

Re: [HACKERS] Transform for pl/perl

2017-11-15 Thread Pavel Stehule
Hi > Hello, > Thank you for your review. I have fixed most of your comments, except > for the 5-th part, about data::dumper - I just couldn't understand > your point, but I've added more tests with more complex objects if this > helps. > > Please, take a look at new patch. You can find it in atta

  1   2   >