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

2015-12-23 Thread Shulgin, Oleksandr
On Wed, Dec 16, 2015 at 9:33 AM, Haribabu Kommi wrote: > > Function is changed to accept default values. > > Apart from the above, added a local memory context to allocate the memory > required for forming tuple for each line. This context resets for every > hba line >

Re: [HACKERS] Some questions about the array.

2015-12-23 Thread Yury Zhuravlev
I've committed this with a number of revisions, mostly but not entirely cosmetic. Thanks Tom! I feel I still have a lot to learn Postgres to choose the right solution. Your comments are very valuable. -- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres

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

2015-12-23 Thread Haribabu Kommi
On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr wrote: > On Wed, Dec 16, 2015 at 9:33 AM, Haribabu Kommi > wrote: >> >> >> Function is changed to accept default values. >> >> Apart from the above, added a local memory context to

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-12-23 Thread Michael Paquier
On Mon, Sep 21, 2015 at 1:52 PM, Corey Huinker wrote: > Attached is the patch / diff against current master. I have moved this patch to next CF, there is a new patch, but no reviews. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Fabien COELHO
Hello Robert & Tatsuo, Some paraphrasing and additional comments. $ pgbench -p 11002 --rate 2 --latency-limit 1 -c 10 -T 10 test You are targetting 2 tps over 10 connections, so that is about one transaction every 5 seconds for each connection, the target is about 20 transactions in 10

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

2015-12-23 Thread Shulgin, Oleksandr
On Wed, Dec 23, 2015 at 12:56 PM, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr > wrote: > > > > 1. Have you considered re-loading the HBA file upon call to this > function in > > a local context instead of

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 9:22 AM, Fabien COELHO wrote: >> Wait, what? On what workload does the FPW spike last only a few >> seconds? [...] > > Ok. AFAICR, a relatively small part at the beginning of the checkpoint, but > possibly more that a few seconds. On a pgbench test,

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 11:23 AM, Fabien COELHO wrote: >>> Probably no skips though, because the response time needed is below 5 >>> *seconds*, not ms : 2 tps on 10 connections, 1 transaction every 5 >>> seconds >>> for each connection. >> >> Oops. Right. But why did this

Re: [HACKERS] [PROPOSAL] Backup and recovery of pg_statistic

2015-12-23 Thread Tom Lane
Dmitry Ivanov writes: >> That concern is exactly the reason why we never did this originally. >> In particular, emitting raw INSERTs into pg_statistic is just plain >> foolish; we have changed the rowtype of pg_statistic in the past and >> are likely to do so again. At a

Re: [HACKERS] WIP: Rework access method interface

2015-12-23 Thread Michael Paquier
On Mon, Dec 14, 2015 at 11:26 PM, Petr Jelinek wrote: > These look like copy-pastos of boilerplate. > > Another note is that amvalidate SQL interface is not documented anywhere. I > know it's mainly meant for regression tests and we for example don't > document hashing

Re: [HACKERS] On columnar storage (2)

2015-12-23 Thread Konstantin Knizhnik
Hi Alvaro, May be you know, that I have implemented IMCS (in-memory-columnar-store) as PostgreSQL extension. It was not so successful, mostly because people prefer to use standard SQL rather than using some special functions for accessing columnar storage (CS). Now I am thinking about second

Re: [HACKERS] [PROPOSAL] Backup and recovery of pg_statistic

2015-12-23 Thread Dmitry Ivanov
> That concern is exactly the reason why we never did this originally. > In particular, emitting raw INSERTs into pg_statistic is just plain > foolish; we have changed the rowtype of pg_statistic in the past and > are likely to do so again. At a minimum we would need such a facility > to be proof

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Robert Haas
On Tue, Dec 22, 2015 at 9:28 PM, Tatsuo Ishii wrote: > While playing with 9.5's pgbench, I faced with a strange behavior. > > $ pgbench -p 11002 --rate 2 --latency-limit 1 -c 10 -T 10 test > starting vacuum...end. > transaction type: TPC-B (sort of) > scaling factor: 1 >

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 9:52 AM, Fabien COELHO wrote: >> In your example, you've got 10 connections and are trying to run at 2 >> tps, so to avoid having to start skipping things you need transaction >> response times to be <~ 5 ms. The actual response time is ~5.5ms, so >>

Re: [HACKERS] Review: GiST support for UUIDs

2015-12-23 Thread Ildus Kurbangaliev
On Tue, 15 Sep 2015 09:03:00 +0300 Teodor Sigaev wrote: > Paul Jungwirth wrote: > >> Or something like this in pseudocode: > >> > >> numeric = int8_numeric(*(uint64 *)(>data[0])) * > >> int8_numeric(MAX_INT64) + int8_numeric(*(uint64 *)(>data[8])) > > > > This is more like

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Fabien COELHO
Hello Robert, I think that the 1.5 value somewhere in the patch is much too high for the purpose because it shifts the checkpoint load quite a lot (50% more load at the end of the checkpoint) just for the purpose of avoiding a spike which lasts a few seconds (I think) at the beginning. A much

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

2015-12-23 Thread Tom Lane
"Shulgin, Oleksandr" writes: > 1. Have you considered re-loading the HBA file upon call to this function > in a local context instead of keeping it in the backends memory? Aside from the security questions, please consider that this feature should work similarly to

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Fabien COELHO
Hello Robert, On a pgbench test, and probably many other workloads, the impact of FPWs declines exponentially (or maybe geometrically, but I think exponentially) as we get further into the checkpoint. Indeed. If the probability of hitting a page is uniform, I think that the FPW probability

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Fabien COELHO
Probably no skips though, because the response time needed is below 5 *seconds*, not ms : 2 tps on 10 connections, 1 transaction every 5 seconds for each connection. Oops. Right. But why did this test only run 16 transactions in total instead of 20? Because the schedule is based on a

Re: [HACKERS] Patch: Optimize memory allocation in function 'bringetbitmap'

2015-12-23 Thread Michael Paquier
On Tue, Dec 15, 2015 at 10:41 AM, Tomas Vondra wrote: > On 10/16/2015 08:00 PM, Jinyu Zhang wrote: >> Update the patch_brin_optimze_mem according to your comment. > > I've reviewed the last version of the patch, and I do have a few comments. I > haven't done any

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-12-23 Thread Michael Paquier
On Wed, Dec 9, 2015 at 9:18 PM, Michael Paquier wrote: > On Thu, Sep 17, 2015 at 7:12 AM, Andres Freund wrote: >> On 2015-08-20 09:59:25 -0400, Andrew Dunstan wrote: >>> Is there any significant interest in either of these? >>> >>> Josh Berkus tells

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

2015-12-23 Thread Michael Paquier
On Wed, Dec 23, 2015 at 8:56 PM, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 8:54 PM, Shulgin, Oleksandr > wrote: >> 5. Some tests demonstrating possible output would be really nice to have. > > Do you mean regression tests? In case of

Re: [HACKERS] Parallel Aggregate

2015-12-23 Thread Robert Haas
On Mon, Dec 21, 2015 at 6:38 PM, David Rowley wrote: > On 22 December 2015 at 04:16, Paul Ramsey wrote: >> >> Shouldn’t parallel aggregate come into play regardless of scan >> selectivity? > > I'd say that the costing should take into

Re: [HACKERS] parallel joins, and better parallel explain

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 2:34 AM, Dilip Kumar wrote: >> I think the gather-reader-order patch will fix this. Here's a test >> with all three patches. > > Yeah right, After applying all three patches this problem is fixed, now > parallel hash join is faster than normal hash

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 2:16 PM, Tomas Vondra wrote: >> Another point (which Jan Wieck made me think of) is that the optimal >> behavior here likely depends on whether xlog and data are on the same >> disk controller. If they aren't, the FPW spike and background

Re: [HACKERS] WIP: Fix parallel workers connection bug in pg_dump (Bug #13727)

2015-12-23 Thread Tom Lane
Michael Paquier writes: > OK, I think that we had better address this bug for this CF. I am > attaching an updated patch following Marko's suggestion, and marking > this patch as ready for committer. I have noticed that the fix was > actually not complete:

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-23 Thread Robert Haas
On Mon, Dec 21, 2015 at 3:09 PM, Chapman Flack wrote: > On 12/21/2015 02:30 PM, Chapman Flack wrote: >> On 12/21/2015 12:46 PM, Tom Lane wrote: > >>> all, since we don't provide a way for extensions to hook into the DROP >>> mechanisms. Perhaps that should be fixed.) >> >>

Re: [HACKERS] SET SESSION AUTHORIZATION superuser limitation.

2015-12-23 Thread Robert Haas
On Mon, Dec 21, 2015 at 9:27 PM, Craig Ringer wrote: > Right now the logs just have to be treated as security critical. Which > sucks, but is not easily solved. > > Nothing is going to stop: > > ALTER USER fred PAWORD 'sekrit'; > > from logging the password in a

Re: [HACKERS] Parallel pg_dump's error reporting doesn't work worth squat

2015-12-23 Thread Joshua D. Drake
On 12/23/2015 10:16 AM, Tom Lane wrote: Depending on timing, this scheme might accidentally fail to fail, but it seems fragile as can be. I would bet that it's prone to deadlocks, quite aside from the SIGPIPE problem. Considering how amazingly ugly the underlying code is (exit_horribly is in

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Tomas Vondra
Hi, On 12/23/2015 03:38 PM, Robert Haas wrote: I think one thing that this conversation exposes is that the size of the working set matters a lot. For example, if the workload is pgbench, you're going to see a relatively short FPW-related spike at scale factor 100, but at scale factor 3000

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Tomas Vondra
On 12/21/2015 01:11 PM, Heikki Linnakangas wrote: On 21/12/15 13:53, Tomas Vondra wrote: On 12/21/2015 12:03 PM, Heikki Linnakangas wrote: On 17/12/15 19:07, Robert Haas wrote: If it works well empirically, does it really matter that it's arbitrary? I mean, the entire planner is full of

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 10:37 AM, Fabien COELHO wrote: > Hmmm. Let us try with both hands: > > AFAICR with xlog-triggered checkpoints, the checkpointer progress is > measured with respect to the size of the WAL file, which does not grow > linearly in time for the reason you

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

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 5:50 AM, Rushabh Lathia wrote: > +1. > > I like idea of separate FDW API for the DML Pushdown. Was thinking can't we > can re-use the IterateForeignScan(ForeignScanState *node) rather then > introducing IterateDMLPushdown(ForeignScanState *node)

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-12-23 Thread Corey Huinker
On Wed, Dec 23, 2015 at 8:43 AM, Michael Paquier wrote: > On Mon, Sep 21, 2015 at 1:52 PM, Corey Huinker > wrote: > > Attached is the patch / diff against current master. > > I have moved this patch to next CF, there is a new patch, but no

[HACKERS] Parallel pg_dump's error reporting doesn't work worth squat

2015-12-23 Thread Tom Lane
I was in process of testing the proposed patch for bug #13727, and I found that at least on my Linux box, this is the behavior in the failure case without the patch: $ pg_dump "postgres://postgres:phonypassword@localhost/regression" --jobs=9 -Fd -f testdump $ echo $? 141 $ ls testdump toc.dat

Re: [HACKERS] [BUGS] BUG #13741: vacuumdb does not accept valid password

2015-12-23 Thread Tom Lane
Michael Paquier writes: > On Mon, Nov 16, 2015 at 11:41 AM, Haribabu Kommi > wrote: >> On Sun, Nov 15, 2015 at 12:39 AM, Michael Paquier >> wrote: >>> That's neater. See for example the attached. >> Yes, it is much

Re: [HACKERS] [BUGS] BUG #13741: vacuumdb does not accept valid password

2015-12-23 Thread Alvaro Herrera
Tom Lane wrote: > Sorry for having lost track of this. I think if we're going to do this, > we should do it now not later, because it essentially reverts the > connectDatabase() API change made in 83dec5a71 in favor of a different API > change with the same purpose. Now, that doesn't matter if

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

2015-12-23 Thread Robert Haas
On Tue, Dec 22, 2015 at 8:10 PM, Peter Geoghegan wrote: >> Sure, there are arbitrary numbers all over the code, driven by >> empirical observations about what factors are important to model. But >> this is not that. You don't have a thing called seq_page_cost and a >> thing

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-12-23 Thread Joe Conway
On 12/23/2015 05:45 AM, Michael Paquier wrote: >> Yeah, the last version of the patch dates of August, and there is >> visibly agreement that the information of pg_controldata provided at >> SQL level is useful while the data of pg_config is proving to be less >> interesting for remote users.

Re: [HACKERS] pgbench --latency-limit option

2015-12-23 Thread Fabien COELHO
[...] Because the schedule is based on a stochastic process, transactions are not set regularly (that would induce patterns and is not representative of real-life load) but randomly. The long term average is expected to converge to 2 tps, but on a short run it may differ significantly. Hmm.

Re: [HACKERS] Experimental evaluation of PostgreSQL's query optimizer

2015-12-23 Thread Jim Nasby
On 12/21/15 8:36 AM, Tom Lane wrote: but it might be nice to have some number as to how > reliable a certain estimate is, which is high if the estimate is, say, > derived from a single filter on a base table and sinks as more conditions > are involved or numbers pulled out of thin air.

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

2015-12-23 Thread Daniel Verite
Hi, Here's an updated patch that replaces sorted arrays by AVL binary trees when gathering distinct values for the columns involved in the pivot. The change is essential for large resultsets. For instance, it allows to process a query like this (10 million rows x 10 columns): select

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

2015-12-23 Thread Michael Paquier
On Tue, Dec 22, 2015 at 5:34 PM, Kyotaro HORIGUCHI wrote: > I wrote: >> Wouldn't it be better with something say in src/common >> which is frontend-only? We could start with a set of routines allowing >> commands to be parsed. That gives us more room for future

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread Haribabu Kommi
On Wed, Dec 23, 2015 at 7:50 PM, David Rowley wrote: > One other part that I'm not too sure on how to deal with is how to set the > data type for the Aggrefs when we're not performing finalization on the > aggregate node. The return type for the Aggref in this case

Re: [HACKERS] WIP: Fix parallel workers connection bug in pg_dump (Bug #13727)

2015-12-23 Thread Michael Paquier
On Thu, Dec 24, 2015 at 4:36 AM, Tom Lane wrote: > As written, this would leak password strings, and it even seems possible > that it would leave savedPassword pointing at dangling memory, since the > free(password) inside the loop might free what savedPassword is pointing >

Re: [HACKERS] Experimental evaluation of PostgreSQL's query optimizer

2015-12-23 Thread Craig Ringer
On 24 December 2015 at 03:43, Jim Nasby wrote: > On 12/21/15 7:49 PM, Craig Ringer wrote: > >> CREATE JOIN STATISTICS ON t1 JOIN t2 USING (somecol); >> >> >> That way we let an admin who's tuning queries direct effort at problem >> areas. It's not automagical, but it's

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread Haribabu Kommi
On Thu, Dec 24, 2015 at 1:12 PM, David Rowley wrote: > On 24 December 2015 at 13:55, Haribabu Kommi > wrote: >> >> On Wed, Dec 23, 2015 at 7:50 PM, David Rowley >> wrote: >> > One other part that I'm not too

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

2015-12-23 Thread Michael Paquier
On Thu, Dec 24, 2015 at 8:44 AM, Peter Geoghegan wrote: > [long blahblah] (Patch moved to next CF, work is going on. Thanks to people here to be active) -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2015-12-23 Thread Michael Paquier
On Wed, Dec 23, 2015 at 6:16 PM, Amit Kapila wrote: > blah. autovacuum log: Moved to next CF as thread is really active. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-12-23 Thread Michael Paquier
On Wed, Dec 23, 2015 at 12:15 PM, Thomas Munro wrote: > Review stuff I have moved this entry to next CF as review is quite recent. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2015-12-23 Thread Michael Paquier
On Tue, Dec 22, 2015 at 5:59 PM, Pavel Stehule wrote: > Hi > > 2015-12-21 16:21 GMT+01:00 Artur Zakirov : >> >> Hi. >> I have tried to do some review of this patch. Below are my comments. >> >> Introduction: >> >> This patch fixes and adds the

Re: [HACKERS] PATCH: index-only scans with partial indexes

2015-12-23 Thread Michael Paquier
On Mon, Dec 7, 2015 at 7:48 AM, Tomas Vondra wrote: > Hello Kyotaro-san, > > Sorry for the long delay since your response in this thread :-( > > On 10/14/2015 08:06 AM, Kyotaro HORIGUCHI wrote: >> >> >> The table t is referred to twice by different (alias) names

Re: [HACKERS] Commit fest status for 2015-11

2015-12-23 Thread Michael Paquier
On Tue, Dec 22, 2015 at 10:45 PM, Michael Paquier wrote: > On Tue, Dec 22, 2015 at 4:04 PM, Michael Paquier > wrote: >> OK, if those don't get addressed soon, they will be moved to the next >> CF with the same status. > > After a first pass,

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-12-23 Thread Pavel Stehule
2015-12-24 3:23 GMT+01:00 Michael Paquier : > On Thu, Dec 17, 2015 at 6:45 PM, Shulgin, Oleksandr > wrote: > > On Wed, Dec 16, 2015 at 8:39 PM, Tomas Vondra < > tomas.von...@2ndquadrant.com> > > wrote: > >> On 12/01/2015 10:34 AM, Shulgin,

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread Haribabu Kommi
On Wed, Dec 23, 2015 at 7:50 PM, David Rowley wrote: > This is just my serial format that I've come up with for NumericAggState, > which is basically: "N sumX maxScale maxScaleCount NaNcount". Perhaps we can > come up with something better, maybe just packing the

Re: [HACKERS] Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?

2015-12-23 Thread Tomas Vondra
Hi, On 12/23/2015 08:22 PM, Robert Haas wrote: On Wed, Dec 23, 2015 at 2:16 PM, Tomas Vondra wrote: Another point (which Jan Wieck made me think of) is that the optimal behavior here likely depends on whether xlog and data are on the same disk controller. If they

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread David Rowley
On 23 December 2015 at 21:50, David Rowley wrote: > Apart from the problems I listed above, I'm reasonably happy with the > patch now, and I'm ready for someone else to take a serious look at it. > I forgot to mention another situation where this patch might need a

Re: [HACKERS] proposal: function parse_ident

2015-12-23 Thread Michael Paquier
On Thu, Dec 3, 2015 at 5:31 AM, Pavel Stehule wrote: > There is: SplitIdentifierString or textToQualifiedNameList in varlena.c. My > first patch was based on these functions. But I cannot to use it. > > 1. major reason: The buildin parser is based on searching the dot "."

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-12-23 Thread Michael Paquier
On Tue, Nov 17, 2015 at 8:36 PM, Vladimir Borodin wrote: > > 14 нояб. 2015 г., в 10:50, Amit Kapila написал(а): > > On Wed, Sep 16, 2015 at 11:22 PM, Robert Haas wrote: >> On Wed, Sep 16, 2015 at 12:29 PM, Alexander Korotkov >>

Re: [HACKERS] A Typo in regress/sql/privileges.sql

2015-12-23 Thread Amit Langote
On 2015/12/23 8:45, Peter Geoghegan wrote: > On Tue, Dec 22, 2015 at 3:38 PM, Robert Haas wrote: >> In my opinion a term more closely coupled to the concrete syntax would >> be easier to understand. I have no objection to referring to the >> *process* of trying to deduce a

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-12-23 Thread Jeff Janes
On Wed, Dec 23, 2015 at 6:14 PM, Michael Paquier wrote: > On Wed, Nov 4, 2015 at 12:08 PM, Amit Kapila wrote: >> On Tue, Nov 3, 2015 at 8:07 PM, Simon Riggs wrote: >>> >>> On 3 November 2015 at 15:23, Amit Kapila

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2015-12-23 Thread Tomas Vondra
On 12/24/2015 03:45 AM, Michael Paquier wrote: On Wed, Sep 30, 2015 at 10:12 AM, David Rowley ... In the attached I've coded it to take the Min() selectivity for when the same quals are matched more than once. I know this is not correct, but since it seems impossible to obtain an exact

Re: [HACKERS] [BUGS] BUG #13741: vacuumdb does not accept valid password

2015-12-23 Thread Michael Paquier
On Thu, Dec 24, 2015 at 1:55 AM, Alvaro Herrera wrote: > Tom Lane wrote: > >> Sorry for having lost track of this. I think if we're going to do this, >> we should do it now not later, because it essentially reverts the >> connectDatabase() API change made in 83dec5a71

Re: [HACKERS] HINTing on UPDATE foo SET foo.bar = ..;

2015-12-23 Thread Michael Paquier
On Mon, Dec 7, 2015 at 9:14 PM, Michael Paquier wrote: > > > On Wed, Sep 2, 2015 at 6:19 AM, Marko Tiikkaja wrote: >> >> Hopefully nobody minds if I slip this to the commit fest that started >> today? The attached patch should address all the comments

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-12-23 Thread Michael Paquier
On Thu, Dec 17, 2015 at 6:45 PM, Shulgin, Oleksandr wrote: > On Wed, Dec 16, 2015 at 8:39 PM, Tomas Vondra > wrote: >> On 12/01/2015 10:34 AM, Shulgin, Oleksandr wrote: >>> >>> >>> I have the plans to make something from this on top of

Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-12-23 Thread Michael Paquier
On Thu, Dec 17, 2015 at 10:17 PM, David Rowley wrote: > On 17 December 2015 at 19:11, Simon Riggs wrote: >> >> On 17 December 2015 at 00:17, Tomas Vondra >> wrote: >>> >>> I'd go with match_first_tuple_only. >>

Re: [HACKERS] Tsvector editing functions

2015-12-23 Thread Michael Paquier
On Tue, Dec 15, 2015 at 12:07 PM, Tomas Vondra wrote: > Hi, > > On 12/07/2015 03:05 PM, Stas Kelvich wrote: >> >> Hello. >> >> Done with the list of suggestions. Also heavily edit delete function. >> > > I did a quick review of the updated patch. I'm not a

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

2015-12-23 Thread Peter Geoghegan
On Wed, Dec 23, 2015 at 1:03 PM, Jeff Janes wrote: > The regression I found when building an index on a column of > 400,000,000 md5(random()::text) with 64MB maintenance_work_mem was not > hard to find at all. I still don't understand what is going on with > it, but it is

Re: [HACKERS] Additional role attributes && superuser review

2015-12-23 Thread Noah Misch
On Tue, Dec 22, 2015 at 05:23:47PM -0500, Stephen Frost wrote: > > >> On Tue, Dec 22, 2015 at 1:41 AM, Stephen Frost > > >> wrote: > > >>> Updated and rebased patch attached which takes the 'pg_switch_xlog' > > >>> default role back out, leaving us with: > > >>> > > >>>

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

2015-12-23 Thread Haribabu Kommi
On Thu, Dec 24, 2015 at 2:37 AM, Tom Lane wrote: > "Shulgin, Oleksandr" writes: >> 1. Have you considered re-loading the HBA file upon call to this function >> in a local context instead of keeping it in the backends memory? > > Aside from the

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread David Rowley
On 24 December 2015 at 13:55, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 7:50 PM, David Rowley > wrote: > > One other part that I'm not too sure on how to deal with is how to set > the > > data type for the Aggrefs when we're not

Re: [HACKERS] COPY FREEZE and PD_ALL_VISIBLE

2015-12-23 Thread Michael Paquier
On Wed, Nov 4, 2015 at 12:08 PM, Amit Kapila wrote: > On Tue, Nov 3, 2015 at 8:07 PM, Simon Riggs wrote: >> >> On 3 November 2015 at 15:23, Amit Kapila wrote: >>> >>> On Fri, Oct 23, 2015 at 6:29 AM, Simon Riggs

Re: [HACKERS] Remove Windows crash dump support?

2015-12-23 Thread Craig Ringer
On 22 December 2015 at 23:48, Alex Ignatov wrote: > I think that you can debug crash dump since windbg exists. > Nobody in their right mind uses windbg though. Visual Studio is really where it's at and the Express versions make it much more practical. You can't even

Re: [HACKERS] Remove Windows crash dump support?

2015-12-23 Thread Joshua D. Drake
On 12/23/2015 06:14 PM, Craig Ringer wrote: On 22 December 2015 at 23:48, Alex Ignatov > wrote: I think that you can debug crash dump since windbg exists. Nobody in their right mind uses windbg though. Visual Studio is really

Re: [HACKERS] Remove Windows crash dump support?

2015-12-23 Thread Craig Ringer
On 22 December 2015 at 23:46, Tom Lane wrote: > > In which version(s) of Windows was this improvement added? Vista and Server 2008 (original, not R2). https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx Win7 and Server 2003 are already

Re: [HACKERS] pam auth - add rhost item

2015-12-23 Thread Michael Paquier
On Wed, Dec 16, 2015 at 2:53 AM, Tomas Vondra wrote: > Actually, one more thing - the patch should probably update the docs too, > because client-auth.sgml currently says this in the "auth-pam" section: > > > ... > PAM is used only to validate user

Re: [HACKERS] onlyvalue aggregate (was: First Aggregate Funtion?)

2015-12-23 Thread Michael Paquier
On Mon, Nov 23, 2015 at 6:29 PM, Dean Rasheed wrote: > On 21 November 2015 at 03:54, Marko Tiikkaja wrote: >> Here's v2 of the patch. How's this look? >> > > Here are some initial review comments: > > * My first thought on reading this patch is that it is

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-12-23 Thread Michael Paquier
On Sun, Dec 13, 2015 at 11:05 PM, Amit Kapila wrote: > On Fri, Dec 11, 2015 at 6:34 PM, Andres Freund wrote: >> >> On 2015-12-11 15:56:46 +0300, Alexander Korotkov wrote: >> > >> > Yes, there is a cycle with retries in LWLockAcquire function. The case

Re: [HACKERS] Spurious standby query cancellations

2015-12-23 Thread Michael Paquier
On Thu, Sep 24, 2015 at 3:33 PM, Jeff Janes wrote: > On Wed, Sep 16, 2015 at 2:44 PM, Simon Riggs wrote: >> >> On 14 September 2015 at 12:00, Jeff Janes wrote: >> It's now possible to fix this by putting a lock wait on

Re: [HACKERS] PATCH: index-only scans with partial indexes

2015-12-23 Thread Tomas Vondra
Hi, On 12/24/2015 04:05 AM, Michael Paquier wrote: On Mon, Dec 7, 2015 at 7:48 AM, Tomas Vondra wrote: ... Otherwise the reworked patch seems fine to me, but I'll give it a bit more testing over the next few days. Thanks for the help so far! Tomas, are you

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2015-12-23 Thread David Rowley
On 24 December 2015 at 16:32, Tomas Vondra wrote: > > > On 12/24/2015 03:45 AM, Michael Paquier wrote: > >> On Wed, Sep 30, 2015 at 10:12 AM, David Rowley >> > ... > >> In the attached I've coded it to take the Min() selectivity for when the >>> same quals are

Re: [HACKERS] Review: GiST support for UUIDs

2015-12-23 Thread Paul Jungwirth
On 12/23/2015 08:10 AM, Ildus Kurbangaliev wrote: There is a more improved version of the patch. Main idea is to present uuid as two uint64 values, and make comparisons and penalty calculation based on these values. This approach is much faster than using memcmp for uuid comparisons. Thank you

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-12-23 Thread Michael Paquier
On Thu, Dec 24, 2015 at 2:08 AM, Joe Conway wrote: > On 12/23/2015 05:45 AM, Michael Paquier wrote: >>> Yeah, the last version of the patch dates of August, and there is >>> visibly agreement that the information of pg_controldata provided at >>> SQL level is useful while the

Re: [HACKERS] Re: Reusing abbreviated keys during second pass of ordered [set] aggregates

2015-12-23 Thread Peter Geoghegan
On Tue, Dec 22, 2015 at 10:49 AM, Peter Geoghegan wrote: > On Tue, Dec 22, 2015 at 9:31 AM, Robert Haas wrote: >>> It has some nice properties, because unsigned integers are so simple >>> and flexible. For example, we can do it with int4 sometimes, and

Re: [HACKERS] Combining Aggregates

2015-12-23 Thread David Rowley
On 24 December 2015 at 14:07, Haribabu Kommi wrote: > On Wed, Dec 23, 2015 at 7:50 PM, David Rowley > wrote: > > This is just my serial format that I've come up with for NumericAggState, > > which is basically: "N sumX maxScale

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2015-12-23 Thread Michael Paquier
On Wed, Sep 30, 2015 at 10:12 AM, David Rowley wrote: > On 29 September 2015 at 01:59, Tomas Vondra > wrote: >> >> Hi, >> >> On 09/27/2015 02:00 PM, David Rowley wrote: >>> >>> I've been working on this again. I've put back the code

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-12-23 Thread Michael Paquier
On Mon, Nov 9, 2015 at 8:55 PM, Ashutosh Bapat wrote: > > > On Sat, Nov 7, 2015 at 12:07 AM, Robert Haas wrote: >> >> On Wed, Aug 12, 2015 at 6:25 AM, Ashutosh Bapat >> wrote: >> > The previous patch would

Re: [HACKERS] Experimental evaluation of PostgreSQL's query optimizer

2015-12-23 Thread Jim Nasby
On 12/21/15 7:49 PM, Craig Ringer wrote: CREATE JOIN STATISTICS ON t1 JOIN t2 USING (somecol); That way we let an admin who's tuning queries direct effort at problem areas. It's not automagical, but it's an area where tools could analyze pg_stat_statements to direct effort, much like is

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

2015-12-23 Thread Peter Geoghegan
On Wed, Dec 23, 2015 at 1:03 PM, Jeff Janes wrote: > If we do think it is important to almost never cause regressions at > the default maintenance_work_mem (I am agnostic on the importance of > that), then I think we have more work to do here. I just don't know > what that

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-23 Thread Jim Nasby
On 12/23/15 12:26 PM, Robert Haas wrote: What's the lightest-weight object I can create that has an owner, >and whose disappearance I can be notified of? Schema? I was thinking view or function, since then you can hide all of them in an internal-only schema. BTW, I've been pondering a very

Re: [HACKERS] parallel joins, and better parallel explain

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 2:34 AM, Dilip Kumar wrote: > Yeah right, After applying all three patches this problem is fixed, now > parallel hash join is faster than normal hash join. > > I have tested one more case which Amit mentioned, I can see in that case > parallel plan

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

2015-12-23 Thread Peter Geoghegan
On Wed, Dec 23, 2015 at 9:37 AM, Robert Haas wrote: > The point is, nobody can tell WHAT effects this is modeling. > Increasing the tuple size makes the crossover go up. Or down. There are multiple, competing considerations. > This analogy is faulty. It's true that when

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

2015-12-23 Thread Jeff Janes
On Mon, Dec 14, 2015 at 7:22 PM, Peter Geoghegan wrote: > On Mon, Dec 14, 2015 at 6:58 PM, Greg Stark wrote: >> I ran sorts with various parameters on my small NAS server. > > ... > >> without the extra memory optimizations. > > Thanks for taking the time to

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

2015-12-23 Thread Peter Geoghegan
On Wed, Dec 23, 2015 at 1:16 PM, Robert Haas wrote: > On Wed, Dec 23, 2015 at 3:31 PM, Peter Geoghegan wrote: >> On Wed, Dec 23, 2015 at 9:37 AM, Robert Haas wrote: >>> The point is, nobody can tell WHAT effects this is modeling.

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2015-12-23 Thread Jeff Janes
On Mon, Dec 21, 2015 at 11:51 AM, Tomas Vondra wrote: > > > On 12/21/2015 07:41 PM, Jeff Janes wrote: >> >> On Sat, Dec 19, 2015 at 3:19 PM, Tomas Vondra >> wrote: > > > ... > >>> So both patches seem to do the trick, but (2) is faster.

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

2015-12-23 Thread Robert Haas
On Wed, Dec 23, 2015 at 3:31 PM, Peter Geoghegan wrote: > On Wed, Dec 23, 2015 at 9:37 AM, Robert Haas wrote: >> The point is, nobody can tell WHAT effects this is modeling. >> Increasing the tuple size makes the crossover go up. Or down. > > There are

Re: [HACKERS] [POC] FETCH limited by bytes.

2015-12-23 Thread Jim Nasby
On 12/23/15 12:15 PM, Corey Huinker wrote: That's fair. I'm still at a loss for how to show that the fetch size was respected by the remote server, suggestions welcome! A combination of repeat() and generate_series()? I'm guessing it's not that obvious and that I'm missing something; can you

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

2015-12-23 Thread Fabien COELHO
Hello Michaël, If I read you correctly, I should cut it out into a new file and include it. Is it correct? Not really, I meant to see if it would be possible to include this set of routines directly in libpqcommon (as part of OBJS_FRONTEND). This way any client applications could easily

Re: [HACKERS] Additional role attributes && superuser review

2015-12-23 Thread Amit Langote
Hi, On 2015/12/23 7:23, Stephen Frost wrote: > Updated patch attached. I'll give it another good look and then commit > it, barring objections. Just a minor nitpick about a code comment - /* + * Check that the user is not trying to create a role in the reserved + * "pg_"

Re: [HACKERS] On-demand running query plans using auto_explain and signals

2015-12-23 Thread Michael Paquier
On Thu, Dec 24, 2015 at 1:57 PM, Pavel Stehule wrote: > > > 2015-12-24 3:23 GMT+01:00 Michael Paquier : >> >> On Thu, Dec 17, 2015 at 6:45 PM, Shulgin, Oleksandr >> wrote: >> > On Wed, Dec 16, 2015 at 8:39 PM,

  1   2   >