Re: [HACKERS] Using quicksort for every external sort run

2016-03-21 Thread Peter Geoghegan
On Thu, Mar 17, 2016 at 1:13 PM, Robert Haas wrote: > OK, I have now committed 0001 I attach a revision of the external quicksort patch and supplementary small patches, rebased on top of the master branch. Changes: 1. As I mentioned on the "Improve memory management for

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-19 17:46:25 -0300, alvhe...@2ndquadrant.com wrote: > > I don't think the first patch is acceptable standalone -- we need both > things together. OK. > But in reality, pg_depend handling is mixed up with other changes all > over the place. Yes, I noticed that. :-/ > Anyway I think

Re: [HACKERS] extend pgbench expressions with functions

2016-03-21 Thread Michael Paquier
On Mon, Mar 21, 2016 at 6:56 AM, Fabien COELHO wrote: > >> v38 is a simple rebase, trying to keep up-to-date with Tom's work. > > > v39 is yet another rebase: 42 is in sight! What's up with v42? Is that your personal record? -- Michael -- Sent via pgsql-hackers mailing

Re: [HACKERS] pam auth - add rhost item

2016-03-21 Thread Haribabu Kommi
On Wed, Mar 16, 2016 at 10:46 PM, Grzegorz Sampolski wrote: > Hi. > Can be, but as you mentioned OS resolver can be configured to not use > dns at all. So much more appropriate will be pam_try_hostname if we want > to be more accurately. > But for me pamusedns, pam_use_hostname

Re: [HACKERS] extend pgbench expressions with functions

2016-03-21 Thread Fabien COELHO
Bonjour Michaël, v39 is yet another rebase: 42 is in sight! What's up with v42? Is that your personal record? It is just a (geek) joke, see: https://en.wikipedia.org/wiki/42_%28number%29#Hitchhiker.27s_Guide_to_the_Galaxy It is the answer to the "Ultimate Question of Life, The Universe

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-03-21 Thread Aleksander Alekseev
> This is the point where I think I am missing something about patch. > As far as I can understand, it uses the same freelist index > (freelist_idx) for allocating and putting back the entry, so I think > the chance of increment in one list and decrement in another is there > when the value of

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Emre Hasegeli
Here are my comments about the operator class implementation: > + *implementation of quad-4d tree over boxes for SP-GiST. Isn't the whole thing actually 3D? > + * For example consider the case of intersection. No need for a new line after this. > + * A quadrant has bounds, but sp-gist

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-21 Thread Haribabu Kommi
On Mon, Mar 21, 2016 at 2:00 PM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> > Check. >> > >> > +} lookup_hba_line_context; >> > ^ but why TAB here? >> >> corrected. I am not sure why pg_indent is adding a tab here. > > It's because lookup_hba_line_context is

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Jim Nasby
On 3/21/16 5:03 PM, Merlin Moncure wrote: in Oracle, you'd simply do: LogIt('I did something'); It would be *great* if we could support that in plpgsql. I'm not sure what Oracle does for SELECT statements without INTO/BULK UPDATE. I'm not really inclined to care -- I'm really curious to see

Re: [HACKERS] Minor bug affecting ON CONFLICT lock wait log messages

2016-03-21 Thread Stephen Frost
Peter, * Peter Geoghegan (p...@heroku.com) wrote: > Thinking about this again, I think we should use > XLTW_InsertIndexUnique after all. The resemblance of the > check_exclusion_or_unique_constraint() code to the nbtinsert.c code > seems only superficial on second thought. So, I propose fixing

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Stas Kelvich
> On 21 Mar 2016, at 22:38, Kevin Grittner wrote: > > On Mon, Mar 21, 2016 at 11:57 AM, Teodor Sigaev wrote: > >>> I couldn't get the term 4D point. Maybe it means that we are >>> using box datatype as the prefix, but we are not treating them >>> as

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Merlin Moncure
On Mon, Mar 21, 2016 at 4:13 PM, Pavel Stehule wrote: > Hi > > 2016-03-21 21:24 GMT+01:00 Merlin Moncure : >> >> Patch is trivial (see below), discussion is not :-). >> >> I see no useful reason to require INTO when returning data with >> SELECT.

Re: [HACKERS] WIP: Access method extendability

2016-03-21 Thread Alvaro Herrera
Alexander Korotkov wrote: > Hi! > > Thank you for review! So. Before this version of the patch was posted in Nov 4th 2015, both Tom and Heikki had said essentially "CREATE ACCESS METHOD is worthless, let's pursue this stuff without those commands".

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Tom Lane
Jim Nasby writes: > On 3/21/16 5:03 PM, Merlin Moncure wrote: >> in Oracle, you'd simply do: >> LogIt('I did something'); > It would be *great* if we could support that in plpgsql. FWIW, I'm hesitant to just start accepting that syntax as if it were an equivalent to

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-21 Thread Tom Lane
So I looked into this, and found that persuading psql to let backslash commands cross line boundaries is a much bigger deal than just fixing the lexer. The problem is that MainLoop would need to grow an understanding of having received only a partial backslash command and needing to go back to

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Alvaro Herrera
Tom Lane wrote: > "David G. Johnston" writes: > > On Monday, March 21, 2016, Tom Lane wrote: > >> What about just discarding the old format entirely, and printing one of > >> these two things: > >> > >> Timestamp (every Ns) > >> > >> User Given

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Jim Nasby
On 3/21/16 11:57 AM, Teodor Sigaev wrote: A and B are points of intersection of lines. So, box PBCAis a bounding box for points contained in 3-rd (see labeling above). For example X labeled point is not a descendace of child node with centroid C because it must be in branch of 1-st quad of

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
Hi 2016-03-21 21:24 GMT+01:00 Merlin Moncure : > Patch is trivial (see below), discussion is not :-). > > I see no useful reason to require INTO when returning data with > SELECT. However, requiring queries to indicate not needing data via > PERFORM causes some annoyances: >

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Merlin Moncure
On Mon, Mar 21, 2016 at 5:49 PM, Tom Lane wrote: > So, I'm -1 on not having any keyword at all. I have no objection > to Merlin's proposal though. I agree that PERFORM is starting to > look a bit silly, since it doesn't play with WITH for instance. All right -- I'll submit

[HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Merlin Moncure
Patch is trivial (see below), discussion is not :-). I see no useful reason to require INTO when returning data with SELECT. However, requiring queries to indicate not needing data via PERFORM causes some annoyances: *) converting routines back and forth between pl/pgsql and pl/sql requires

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-21 Thread Stas Kelvich
> On 22 Mar 2016, at 01:47, Jim Nasby wrote: > > On 3/21/16 11:57 AM, Teodor Sigaev wrote: >> A and B are points of intersection of lines. So, box PBCAis a bounding >> box for points contained in 3-rd (see labeling above). For example X >> labeled point is not a

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Michael Paquier
On Tue, Mar 22, 2016 at 6:25 AM, Tom Lane wrote: > If I don't hear objections PDQ, I'm going to update the docs and commit > it like that. Thanks! -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-21 Thread Haribabu Kommi
On Tue, Mar 22, 2016 at 2:19 PM, Amit Kapila wrote: > On Mon, Mar 21, 2016 at 6:16 PM, Haribabu Kommi > wrote: >> >> On Mon, Mar 14, 2016 at 4:51 PM, Amit Kapila >> wrote: >> >> Operating system - windows 7 >> >> Binary

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-21 Thread Etsuro Fujita
On 2016/03/19 3:30, Robert Haas wrote: On Fri, Mar 18, 2016 at 5:15 AM, Etsuro Fujita wrote: Attached is the updated version of the patch. Committed. Thank you. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread David G. Johnston
On Monday, March 21, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > On Monday, March 21, 2016, Tom Lane > > wrote: > >> What about just discarding the old format entirely, and printing one

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-21 Thread Amit Kapila
On Mon, Mar 21, 2016 at 6:16 PM, Haribabu Kommi wrote: > > On Mon, Mar 14, 2016 at 4:51 PM, Amit Kapila wrote: > >> Operating system - windows 7 > >> Binary - PostgreSQL 9.5 (This doesn't matter, 9.4+ can produce the > >> problem) > >> > >> 1.

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 6:49 PM, Tom Lane wrote: > So, I'm -1 on not having any keyword at all. I have no objection > to Merlin's proposal though. I agree that PERFORM is starting to > look a bit silly, since it doesn't play with WITH for instance. Yeah, I think requiring

Re: [HACKERS] Declarative partitioning

2016-03-21 Thread Amit Langote
On 2016/03/22 4:55, Robert Haas wrote: > So, the last patch on this thread was posted on February 17th, and the > CF entry was marked Waiting on Author on March 2nd. Even if we had a > new patch in hand at this point, I don't think there's any real chance > of being able to get this done for 9.6;

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-21 15:43:09 -0400, robertmh...@gmail.com wrote: > > I also think we should allow a function to depend on multiple > extensions, as Alvaro mentions downthread. I'm working on an updated patch, will post shortly. -- Abhijit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-21 Thread Etsuro Fujita
On 2016/03/19 4:51, Robert Haas wrote: On Thu, Mar 17, 2016 at 7:00 AM, Etsuro Fujita wrote: So, I'd like to propose: (1) when tableoids are requested from the remote server, postgres_fdw sets valid values for them locally, instead (core should support that?)

[HACKERS] parallel aggregation - Numeric is unsupported?

2016-03-21 Thread Pavel Stehule
Hi is it expected in this moment? Table "public.foo" Column │ Type │ Modifiers ╪═╪═══ a │ integer │ postgres=# \d foo2 Table "public.foo2" Column │ Type │ Modifiers ╪═╪═══ a │ numeric │ postgres=# explain select

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-21 Thread Dilip Kumar
On Sun, Mar 20, 2016 at 4:10 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > Actually, we behave like old code and do such modifications without > increasing number of atomic operations. We can just calculate new value of > state (including unset of BM_LOCKED flag) and write it to

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-21 Thread Dilip Kumar
On Tue, Mar 22, 2016 at 12:31 PM, Dilip Kumar wrote: > ! pg_atomic_write_u32(>state, state); > } while (!StartBufferIO(bufHdr, true)); > > Better Write some comment, about we clearing the BM_LOCKED from stage > directly and need not to call UnlockBufHdr explicitly. >

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-21 Thread Amit Kapila
On Tue, Mar 22, 2016 at 9:13 AM, Haribabu Kommi wrote: > > On Tue, Mar 22, 2016 at 2:19 PM, Amit Kapila wrote: > > On Mon, Mar 21, 2016 at 6:16 PM, Haribabu Kommi < kommi.harib...@gmail.com> > > wrote: > >> > >> On Mon, Mar 14, 2016 at 4:51 PM,

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread James Sewell
Good news! On Tuesday, 22 March 2016, David Rowley wrote: > On 22 March 2016 at 02:35, Robert Haas > wrote: > > I have committed this after changing some of the comments. > > > > There might still be bugs ... but I don't see

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-21 Thread Ashutosh Bapat
On Tue, Mar 22, 2016 at 8:03 AM, Etsuro Fujita wrote: > On 2016/03/19 4:51, Robert Haas wrote: > >> On Thu, Mar 17, 2016 at 7:00 AM, Etsuro Fujita >> wrote: >> >>> So, I'd like to propose: (1) when tableoids are >>> requested from the

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
2016-03-21 23:03 GMT+01:00 Merlin Moncure : > On Mon, Mar 21, 2016 at 4:13 PM, Pavel Stehule > wrote: > > Hi > > > > 2016-03-21 21:24 GMT+01:00 Merlin Moncure : > >> > >> Patch is trivial (see below), discussion is not :-). > >> >

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
2016-03-21 23:26 GMT+01:00 Jim Nasby : > On 3/21/16 5:03 PM, Merlin Moncure wrote: > >> in Oracle, you'd simply do: >> LogIt('I did something'); >> > > It would be *great* if we could support that in plpgsql. > > I'm not sure what Oracle does for SELECT statements

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
2016-03-21 23:49 GMT+01:00 Tom Lane : > Jim Nasby writes: > > On 3/21/16 5:03 PM, Merlin Moncure wrote: > >> in Oracle, you'd simply do: > >> LogIt('I did something'); > > > It would be *great* if we could support that in plpgsql. > > FWIW, I'm

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-21 Thread Tom Lane
Amit Kapila writes: > On Mon, Mar 21, 2016 at 10:13 PM, Robert Haas wrote: >> It is very difficult to believe that this is a good idea: >> >> --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c >> +++

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618

2016-03-21 Thread Craig Ringer
On 21 March 2016 at 20:46, Haribabu Kommi wrote: > > No. Not as local service. The user should be the new standard user > that is created > in the system. > Which was done how, exactly? Commands run? Steps taken? PostgreSQL drops privileges once it starts, so it's

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-21 Thread Amit Kapila
On Tue, Mar 22, 2016 at 9:46 AM, Tom Lane wrote: > > Amit Kapila writes: > > On Mon, Mar 21, 2016 at 10:13 PM, Robert Haas wrote: > >> It is very difficult to believe that this is a good idea: > >> > >> ---

Re: [HACKERS] parallel aggregation - Numeric is unsupported?

2016-03-21 Thread Pavel Stehule
2016-03-22 6:28 GMT+01:00 David Rowley : > > On 22/03/2016 5:24 pm, "Pavel Stehule" wrote: > > > > Hi > > > > is it expected in this moment? > > > > > > Table "public.foo" > > Column │ Type │ Modifiers > >

Re: [HACKERS] Minor bug affecting ON CONFLICT lock wait log messages

2016-03-21 Thread Peter Geoghegan
On Mon, Mar 21, 2016 at 3:38 PM, Stephen Frost wrote: >> Basically, unlike with the similar nbtinsert.c code, we're checking >> someone else's tuple in the speculative insertion >> check_exclusion_or_unique_constraint() case that was changed (or it's >> an exclusion

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Tom Lane
Pavel Stehule writes: > I can live with SELECT fx(x). It is little bit dangerous, but this risk can > be easy detected by plpgsql_check. Dangerous how? >> So, I'm -1 on not having any keyword at all. I have no objection >> to Merlin's proposal though. I agree that

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-21 Thread Pavel Stehule
2016-03-22 6:06 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > I can live with SELECT fx(x). It is little bit dangerous, but this risk > can > > be easy detected by plpgsql_check. > > Dangerous how? > I afraid of useless and forgotten call of

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-21 Thread Amit Kapila
On Mon, Mar 21, 2016 at 10:13 PM, Robert Haas wrote: > > On Tue, Mar 1, 2016 at 12:38 AM, Michael Paquier > wrote: > > Thoughts? I have registered that in the CF app, and a patch is attached. > > It is very difficult to believe that this is a

Re: [HACKERS] Identifying a message in emit_log_hook.

2016-03-21 Thread Kyotaro HORIGUCHI
I found that this has been commited. Thank you for committing this, Simon. regards, At Tue, 15 Mar 2016 12:22:05 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20160315.122205.08265186.horiguchi.kyot...@lab.ntt.co.jp> > Thnak you for scooping up

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Jeff Janes
On Sun, Mar 20, 2016 at 4:34 PM, Tomas Vondra wrote: > > > D'oh. Thanks for reporting. Attached is v16, hopefully fixing the few > remaining whitespace issues. Hi Tomas, I'm trying out v16 against a common problem, where postgresql thinks it is likely top stop

Re: [HACKERS] parallel aggregation - Numeric is unsupported?

2016-03-21 Thread David Rowley
On 22/03/2016 5:24 pm, "Pavel Stehule" wrote: > > Hi > > is it expected in this moment? > > > Table "public.foo" > Column │ Type │ Modifiers > ╪═╪═══ > a │ integer │ > > postgres=# \d foo2 > Table "public.foo2" > Column │

Re: [HACKERS] parallel aggregation - Numeric is unsupported?

2016-03-21 Thread David Rowley
On 22/03/2016 5:24 pm, "Pavel Stehule" wrote: > > Hi > > is it expected in this moment? > > > Table "public.foo" > Column │ Type │ Modifiers > ╪═╪═══ > a │ integer │ > > postgres=# \d foo2 > Table "public.foo2" > Column │

[HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Chapman Flack
On 03/21/2016 06:08 AM, Aleksander Alekseev wrote: > As you may see there are "holes" that were in fact not filled. Under > normal conditions they will be filled with data previously stored on > stack which could be anything including passwords and other private > data. Afterwards this structure

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: > On 21/03/16 14:15, Andres Freund wrote: > >>Only when the origin is actually setup for the current session. You > >>need > >>to call the replorigin_advance yourself from your apply code. > > > >That's problematic from a durability POV. > > > >

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 7:30 PM, David Rowley wrote: > An updated patch is attached. This hopefully addresses your concerns > with the comment, and also the estimate_hashagg_tablesize() NULL > checking. I have committed this after changing some of the comments.

Re: [HACKERS] flex: where's THIS been all this time?

2016-03-21 Thread Yury Zhuravlev
While I'm not quite sufficiently excited to run around and fix all our .l files like this today, I'm definitely planning to do it for psql's lexer, since I'm messing with that right now, and I don't much like Horiguchi-san's solution to the problem. +1. More less code for CMake. PS This hack

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:25, Andres Freund wrote: On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: On 21/03/16 14:15, Andres Freund wrote: Only when the origin is actually setup for the current session. You need to call the replorigin_advance yourself from your apply code. That's problematic from a

Re: [HACKERS] [GENERAL] OS X 10.11.3, psql, bus error 10, 9.5.1

2016-03-21 Thread Tom Lane
Greg Stark writes: > On 12 Mar 2016 10:58 pm, "Tom Lane" wrote: >> I shall get rid of the const-ness, as well as the lame casting away >> of it, and I think I will also go make buildfarm member longfin use >> "-fno-common". It is truly sad that we apparently

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 8:30 AM, Michael Paquier wrote: >> Doing that with the >> level of detail and care that it seems to me to require seems like an >> almost-impossible task. Most of the major features I've committed >> this CommitFest are patches where I've

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Aleksander Alekseev
> Well, the documentation already says to avoid it: > > http://www.postgresql.org/docs/current/static/xfunc-c.html > >Another important point is to avoid leaving any uninitialized >bits within data type values; for example, take care to zero out >any alignment padding bytes that

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Chapman Flack
On 03/21/2016 10:21 AM, Aleksander Alekseev wrote: > Well in this case here is a patch that fixes "use of uninitialized > value" reports by MemorySanitizer I managed to catch so far. I'm new here so someone more experienced would have to weigh in, but I would wonder a couple of things: a.

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:15, Andres Freund wrote: On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-21 12:04:40 +0530, a...@2ndquadrant.com wrote: > > I'll write up a patch for this. Thanks for the suggestions. Here's a patch to implement ALTER FUNCTION x DEPENDS ON EXTENSION y. The changes to functioncmds.c:AlterFunction were less intrusive than I had originally feared. -- Abhijit

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Petr Jelinek
Hi, thanks for review. On 17/03/16 13:36, Tomas Vondra wrote: Hi, a few comments about the last version of the patch: 1) LogicalDecodeMessageCB Do we actually need the 'transactional' parameter here? I mean, having the 'txn' should be enough, as transactional = (txt != NULL)

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: >On 21/03/16 13:44, Konstantin Knizhnik wrote: >> >> >> On 21.03.2016 15:10, Petr Jelinek wrote: >>> Hi, >>> >>> On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical

Re: [HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-03-21 Thread Ashutosh Bapat
Thanks Michael for looking into this. > In get_useful_ecs_for_relation, it seems to me that this assertion > should be removed and replaces by an actual check because even if > right_ec and left_ec are initialized, we cannot be sure that ec_relids > contains the relations specified: >

Re: [HACKERS] [COMMITTERS] pgsql: Support parallel aggregation.

2016-03-21 Thread David Fetter
On Mon, Mar 21, 2016 at 01:33:28PM +, Robert Haas wrote: > Support parallel aggregation. ...and there was much rejoicing! Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP:

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Tomas Vondra
Hi, On 03/21/2016 10:34 AM, Robert Haas wrote: On Sun, Mar 20, 2016 at 11:34 PM, Alvaro Herrera wrote: ObjectProperty[] contains a comment that the ACL is "same as relation", but is that still correct, given that now stats may be related to more than one relation?

[HACKERS] PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-21 Thread Aleksander Alekseev
Hello I was playing with CLang sanitizers[1][2][3][4] recently and discovered something disturbing regarding how PostgreSQL works. Here is an example. Lets create a breakpoint right before filling a CheckPoint structure: (gdb) b xlog.c:4772 Breakpoint 1 at 0x7ffbad0556d4: file xlog.c, line

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Konstantin Knizhnik
On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support

Re: [HACKERS] pam auth - add rhost item

2016-03-21 Thread Grzegorz Sampolski
Ok. So if no one objected to the evening - in my time zone ofcourse :) I will change pamusedns to pam_use_hostname. On 03/21/2016 08:43 AM, Haribabu Kommi wrote: > On Wed, Mar 16, 2016 at 10:46 PM, Grzegorz Sampolski wrote: >> Hi. >> Can be, but as you mentioned OS resolver can

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Tomas Vondra
On 03/21/2016 04:34 AM, Alvaro Herrera wrote: Another skim on 0002: reference.sgml is missing a call to ObjectProperty[] contains a comment that the ACL is "same as relation", but is that still correct, given that now stats may be related to more than one relation? Do we even know what the

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-21 Thread Andres Freund
Hi, I've pushed the new API. We might want to use it in more places... On 2015-12-25 20:08:15 +0300, Васильев Дмитрий wrote: > I suddenly found commit ac1d794 gives up to 3 times performance degradation. > > I tried to run pgbench -s 1000 -j 48 -c 48 -S -M prepared on 70 CPU-core > machine: >

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Stas Kelvich
> On 18 Mar 2016, at 14:45, Stas Kelvich wrote: >> >>> One possible solution for that is just fallback to pg_fdatasync in case >>> when offset = nbytes = 0. >> >> Hm, that's a bit heavyweight. I'd rather do an lseek(SEEK_END) to get >> the file size. Could you test

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Andres Freund
On 2016-03-21 14:46:09 +0300, Stas Kelvich wrote: > > > On 18 Mar 2016, at 14:45, Stas Kelvich wrote: > >> > >>> One possible solution for that is just fallback to pg_fdatasync in case > >>> when offset = nbytes = 0. > >> > >> Hm, that's a bit heavyweight. I'd rather

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Artur Zakirov
I tried to find some bugs in the code. I can't find them. But it does not mean that there are not bugs. Still there are a lack of comments and trailing whitespaces. On 16.03.2016 19:38, Dmitry Ivanov wrote: Hi, Artur I've made an attempt to fix some of the issues you've listed, although

Re: [HACKERS] latch usage and postmaster death

2016-03-21 Thread Robert Haas
On Mon, Mar 21, 2016 at 5:35 AM, Andres Freund wrote: > a significant number of WaitLatch's in the backend currently don't check > for postmaster death. That's imo wrong. E.g. SELECT pg_sleep(100); just > continues to run. > > I think we should change most sites to error out

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
On Mon, Mar 21, 2016 at 2:19 PM, Abhijit Menon-Sen wrote: > At 2016-03-21 13:04:33 +0300, a.korot...@postgrespro.ru wrote: > > > > I'm not sure why we want to make new dependency type by ALTER FUNCTION > > command, not ALTER EXTENSION? > > It's a matter of semantics. It

[HACKERS] latch usage and postmaster death

2016-03-21 Thread Andres Freund
Hi, a significant number of WaitLatch's in the backend currently don't check for postmaster death. That's imo wrong. E.g. SELECT pg_sleep(100); just continues to run. I think we should change most sites to error out in that case. I wonder if we shouldn't add another WL_ flag that automatically

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
On Mon, Mar 21, 2016 at 9:34 AM, Abhijit Menon-Sen wrote: > At 2016-03-19 17:46:25 -0300, alvhe...@2ndquadrant.com wrote: > > > > I don't think the first patch is acceptable standalone -- we need both > > things together. > > OK. > > > But in reality, pg_depend handling is

Re: [HACKERS] multivariate statistics v14

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 11:34 PM, Alvaro Herrera wrote: > ObjectProperty[] contains a comment that the ACL is "same as relation", > but is that still correct, given that now stats may be related to more > than one relation? Do we even know what the rules for ACLs on >

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-21 Thread Andres Freund
Hi,m On 2016-03-21 11:26:43 +0530, Amit Kapila wrote: > LOG: database system was shut down at 2016-03-21 11:17:13 IST > LOG: MultiXact member wraparound protections are now enabled > LOG: database system is ready to accept connections > LOG: autovacuum launcher started > FATAL: failed to set

Re: [HACKERS] improving GROUP BY estimation

2016-03-21 Thread Alexander Korotkov
Hi, Dean! On Fri, Mar 18, 2016 at 1:20 PM, Dean Rasheed wrote: > Probably a better URL to give is > http://www.adellera.it/investigations/distinct_balls/ which has a link > to the PDF version of the paper and also some supporting material. > > However, while that paper

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Abhijit Menon-Sen
At 2016-03-21 13:04:33 +0300, a.korot...@postgrespro.ru wrote: > > I'm not sure why we want to make new dependency type by ALTER FUNCTION > command, not ALTER EXTENSION? It's a matter of semantics. It means something very different than what an 'e' dependency means. The extension doesn't own the

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Alexander Korotkov
Hi! I see that patch changes existing regression tests in tsearch2.out. *** a/contrib/tsearch2/expected/tsearch2.out --- b/contrib/tsearch2/expected/tsearch2.out *** SELECT '(!1|2)&3'::tsquery; *** 278,292 (1 row) SELECT '1|(2|(4|(5|6)))'::tsquery; !

Re: [HACKERS] Combining Aggregates

2016-03-21 Thread David Rowley
On 20 March 2016 at 16:48, David Rowley wrote: > I've attached another series of patches: > > 0001: This is the latest Parallel Aggregate Patch, not intended for > review here, but is required for the remaining patches. This patch has > changed quite a bit from the

[HACKERS] BRIN is missing in multicolumn indexes documentation

2016-03-21 Thread Petr Jediný
Hello, the http://www.postgresql.org/docs/9.5/static/indexes-multicolumn.html page doesn't mention BRIN support, but according to the http://www.postgresql.org/docs/9.5/static/sql-createindex.html it is supported in multicolumn setup. The attached patch (git diff against master branch) fixes the

Re: [HACKERS] WIP: Covering + unique indexes.

2016-03-21 Thread Anastasia Lubennikova
19.03.2016 08:00, Peter Geoghegan: On Fri, Mar 18, 2016 at 5:15 AM, David Steele wrote: It looks like this patch should be marked "needs review" and I have done so. Uh, no it shouldn't. I've posted an extensive review on the original design thread. See CF entry:

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2016-03-21 Thread Robert Haas
On Wed, Mar 2, 2016 at 12:01 AM, Pavel Stehule wrote: >> I see the pfree you added isn't allowed on a NULL pointer but as far >> as I see message is guaranteed not to be NULL as dgettext never >> returns NULL. >> >> I'll mark this Ready for Committer. > > Thank you very

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-21 Thread Stas Kelvich
On 21 Mar 2016, at 14:53, Andres Freund wrote: > Hm. I think we should rather just skip calling pg_flush_data in the > directory case, that very likely isn't beneficial on any OS. Seems reasonable, changed. > I think we still need to fix the mmap() implementation to support

Re: [HACKERS] Relation extension scalability

2016-03-21 Thread Amit Kapila
On Fri, Mar 18, 2016 at 2:38 PM, Dilip Kumar wrote: > > > On Thu, Mar 17, 2016 at 1:31 PM, Petr Jelinek wrote: >> >> Great. >> >> Just small notational thing, maybe this would be simpler?: >> extraBlocks = Min(512, lockWaiters * 20); > > > Done, new

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying

Re: [HACKERS] Parallel Aggregate

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 11:24 PM, Alvaro Herrera wrote: > David Rowley wrote: >> On 21 March 2016 at 15:48, Alvaro Herrera wrote: >> > David Rowley wrote: >> > >> >> I've rewritten the comment to become: >> >> >> >> /* >> >> * Providing that

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-21 Thread Haribabu Kommi
On Mon, Mar 14, 2016 at 4:51 PM, Amit Kapila wrote: > On Fri, Mar 11, 2016 at 5:21 PM, Haribabu Kommi > wrote: >> >> On Fri, Mar 11, 2016 at 12:00 AM, Amit Kapila >> wrote: >> >> >> >> I am not able to find the reason

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-21 Thread Alvaro Herrera
Robert Haas wrote: > On Sun, Mar 20, 2016 at 5:27 PM, Pavel Stehule > wrote: > > From my perspective, it is ready for commiter. Daniel solved the most big > > issues. > > OK, so that brings us back to: is there any committer who likes this > enough to want to look at

Re: [HACKERS] Combining Aggregates

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 11:48 PM, David Rowley wrote: > 0002: Adds serial/de-serial function support to CREATE AGGREGATE, > contains minor fix-ups from last version. This looks pretty good, but don't build_aggregate_serialfn_expr and build_aggregate_deserialfn_expr

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-21 Thread Robert Haas
On Tue, Mar 1, 2016 at 12:38 AM, Michael Paquier wrote: > Thoughts? I have registered that in the CF app, and a patch is attached. It is very difficult to believe that this is a good idea: --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-21 Thread Robert Haas
On Sat, Mar 19, 2016 at 3:28 PM, Fabien COELHO wrote: >>> Thanks for the pointer. However, I do not have "editor priviledge" on >>> this >>> wiki, maybe Tomas has? >> >> I gave you editor privs now, but since it's in 9.5 I guess it needs to >> be on the bug tracker (Except,

Re: [HACKERS] max_parallel_degree context level

2016-03-21 Thread Robert Haas
On Sun, Mar 20, 2016 at 3:01 AM, David Rowley wrote: > On 12 February 2016 at 04:55, Robert Haas wrote: >> On Thu, Feb 11, 2016 at 10:32 AM, Simon Riggs wrote: >>> Is it slower if you request N workers, yet only 1 is

  1   2   >