Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-08-22 Thread Michael Paquier
On Wed, Aug 23, 2017 at 3:04 PM, Masahiko Sawada wrote: > It seems to me that we should discuss whether we want to keep the some > syntax such as 'a,b', 'N(a,b)' before thinking whether or not that > making the quorum commit the default behavior of 'N(a,b)' syntax. If > we plan to remove such synt

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2017-08-22 Thread Masahiko Sawada
On Sat, Aug 19, 2017 at 12:28 AM, Robert Haas wrote: > On Thu, Aug 17, 2017 at 1:13 AM, Michael Paquier > wrote: >> I had in mind a ereport(WARNING) in create_syncrep_config. Extra >> thoughts/opinions welcome. > > I think for v10 we should just document the behavior we've got; I > think it's too

Re: [HACKERS] POC: Sharing record typmods between backends

2017-08-22 Thread Andres Freund
On 2017-08-22 16:41:23 -0700, Andres Freund wrote: > On 2017-08-21 11:02:52 +1200, Thomas Munro wrote: > > On Mon, Aug 21, 2017 at 6:17 AM, Andres Freund wrote: > > > Pushing 0001, 0002 now. > > > > > > - rebased after conflicts > > > - fixed a significant number of too long lines > > > - removed

Re: [HACKERS] Pluggable storage

2017-08-22 Thread Haribabu Kommi
On Mon, Aug 21, 2017 at 7:25 PM, Amit Kapila wrote: > On Mon, Aug 21, 2017 at 12:58 PM, Haribabu Kommi > wrote: > > > > On Sun, Aug 13, 2017 at 5:17 PM, Amit Kapila > > wrote: > >> > >> > >> Also, it is quite possible that some of the storage Am's don't even > >> want to return bool as a parame

Re: [HACKERS] Pluggable storage

2017-08-22 Thread Haribabu Kommi
On Tue, Aug 15, 2017 at 4:53 PM, Andres Freund wrote: > Hi, > > > On 2017-06-13 11:50:27 +1000, Haribabu Kommi wrote: > > Here I attached WIP patches to support pluggable storage. The patch > series > > are may not work individually. Still so many things are under > development. > > These patches

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-08-22 Thread Dilip Kumar
On Tue, Aug 22, 2017 at 8:40 PM, Alexander Kumenkov wrote: > Hi Dilip, > > Recently I was thinking about this too, when working on the index-only > count(*) patch for indexes supporting amgetbitmap [1]. That patch teaches > bitmap heap scan node to skip heap fetches under certain conditions. Exact

Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log

2017-08-22 Thread Masahiko Sawada
On Tue, Aug 22, 2017 at 3:23 PM, Simon Riggs wrote: > On 15 August 2017 at 02:27, Masahiko Sawada wrote: > >> Is there any reasons why we don't >> write an explicit name in vacuum verbose logs? > > None. Sounds like a good idea. > >> If not, can we add >> schema names to be more clearly? > > Yes,

Re: [HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running

2017-08-22 Thread Michael Paquier
On Wed, Aug 23, 2017 at 2:28 AM, Marco Nenciarini wrote: > I have noticed that after the 9.4.13 release PostgreSQL reliably fails > to shutdown with smart and fast method if there is a running walsender. > > The postmaster continues waiting forever for the walsender termination. > > It works perfe

[HACKERS] obsolete code in pg_upgrade

2017-08-22 Thread Peter Eisentraut
It seems to me that this code in pg_upgrade/check.c has been useless since at least version 9.1: /* Is it 9.0 but without tablespace directories? */ if (GET_MAJOR_VERSION(new_cluster.major_version) == 900 && new_cluster.controldata.cat_ver < TABLE_SPACE_SUBDIRS_CAT_VER) pg_

[HACKERS] scan-build plpython stuff

2017-08-22 Thread Peter Eisentraut
I wanted to make some progress cleaning up some of the warnings produced by scan-build, so I grabbed plpython and fixed all the warnings there. Attached are two patches, one that decorates PLy_elog() with compiler hints similar to elog(), and one with some very minor tweaks. This fixes all 13 or

Re: [HACKERS] POC: Sharing record typmods between backends

2017-08-22 Thread Andres Freund
On 2017-08-21 11:02:52 +1200, Thomas Munro wrote: > On Mon, Aug 21, 2017 at 6:17 AM, Andres Freund wrote: > > Pushing 0001, 0002 now. > > > > - rebased after conflicts > > - fixed a significant number of too long lines > > - removed a number of now superflous linebreaks > > Thanks! Please find a

[HACKERS] Blessed TupleDescs and constraints

2017-08-22 Thread Andres Freund
Hi, while reviewing the "shared record typmod" patchseries I noticed that that the last version [1] of the patchset didn't consider the constraint in the computed hashvalue, but comparison did. In the ensuing IM discussion Thomas and I noticed that assign_record_type_typmod() already doesn't prope

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

2017-08-22 Thread Alik Khilazhev
Hello, Fabien I am attaching patch v7. > Yes, I agree. a >= 1 does not make much sense... If you want uniform you > should use random(), not call random_zipfian with a = 1. Basically it > suggests that too large values of "a" should be rejected. Not sure where to > put the limit, thoug

Re: [HACKERS] initdb failure on Debian sid/mips64el in EventTriggerEndCompleteQuery

2017-08-22 Thread Christoph Berg
Re: Tom Lane 2017-08-13 <14517.1502638...@sss.pgh.pa.us> > I suspect you could work around this with > > boolisCompleteQuery = (context <= PROCESS_UTILITY_QUERY); > - boolneedCleanup; > + volatile bool needCleanup; > boolcommandCollected =

Re: [HACKERS] coverage analysis improvements

2017-08-22 Thread Peter Eisentraut
On 8/21/17 01:23, Michael Paquier wrote: > Patch 0001 fails to apply as of c629324. Updated patches attached. > Which versions of lcov and gcov did you use for your tests? LCOV version 1.13, and gcc-7 and gcc-6 -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development

[HACKERS] Regression stoping PostgreSQL 9.4.13 if a walsender is running

2017-08-22 Thread Marco Nenciarini
I have noticed that after the 9.4.13 release PostgreSQL reliably fails to shutdown with smart and fast method if there is a running walsender. The postmaster continues waiting forever for the walsender termination. It works perfectly with all the other major releases. I bisected the issue to com

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-08-22 Thread Alexander Kumenkov
Hi Dilip, Recently I was thinking about this too, when working on the index-only count(*) patch for indexes supporting amgetbitmap [1]. That patch teaches bitmap heap scan node to skip heap fetches under certain conditions. Exact tidbitmap pages are a prerequisite for this, so the lossines of

Re: [HACKERS] [PATCH] Push limit to sort through a subquery

2017-08-22 Thread Konstantin Knizhnik
On 18.08.2017 04:33, Robert Haas wrote: It seems like a somewhat ad-hoc approach; it supposes that we can take any query produced by deparseSelectStmtForRel() and stick a LIMIT clause onto the very end and all will be well. Maybe that's not a problematic assumption, not sure. The grammar

Re: [HACKERS] Page Scan Mode in Hash Index

2017-08-22 Thread Ashutosh Sharma
On Tue, Aug 22, 2017 at 3:55 PM, Amit Kapila wrote: > On Tue, Aug 22, 2017 at 2:28 PM, Ashutosh Sharma > wrote: >> On Sat, Aug 19, 2017 at 11:37 AM, Amit Kapila >> wrote: >>> On Fri, Aug 11, 2017 at 6:51 PM, Ashutosh Sharma >>> wrote: > > 7. > _hash_kill_items(IndexScanDesc scan)

Re: [HACKERS] Updating line length guidelines

2017-08-22 Thread Stephen Frost
Craig, all, * Craig Ringer (cr...@2ndquadrant.com) wrote: > On 21 August 2017 at 10:36, Michael Paquier > wrote: > > On Mon, Aug 21, 2017 at 11:30 AM, Robert Haas > > wrote: > > > On Sun, Aug 20, 2017 at 10:49 AM, Andres Freund > > wrote: > > >> We currently still have the guideline that code s

Fwd: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-08-22 Thread Markus Sintonen
I also encountered this when I built it with different configuration. I attached updated patch with the correct number of arguments to 'similar_escape'. I also added preliminary documentation to the patch. (Unfortunately unable to currently compile the documentation for testing purpose on Windows p

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2017-08-22 Thread Sokolov Yura
Simplified a bit and more commented patch version is in attach. Algorithm were switched to linear probing, it makes code simpler and clearer. Flag usages were toggled: now it indicates that hash table were built, it also makes code clearer. XidInXip and some other functions got comments. -- With

Re: [HACKERS] Hash Functions

2017-08-22 Thread amul sul
On Fri, Aug 18, 2017 at 11:01 PM, Robert Haas wrote: > On Fri, Aug 18, 2017 at 1:12 PM, amul sul wrote: > > I have a small query, what if I want a cache entry with extended hash > > function instead standard one, I might require that while adding > > hash_array_extended function? Do you think w

Re: [HACKERS] Default Partition for Range

2017-08-22 Thread Beena Emerson
On Tue, Aug 22, 2017 at 4:20 PM, Beena Emerson wrote: > Hi Jeevan, > > On Tue, Aug 22, 2017 at 7:53 AM, Jeevan Ladhe > wrote: >> >> >> 4. >> static List * >> -get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) >> +get_qual_for_range(Relation parent, PartitionBoundSpec *spec, >> +

Re: [HACKERS] Default Partition for Range

2017-08-22 Thread Beena Emerson
Hi Jeevan, On Tue, Aug 22, 2017 at 7:53 AM, Jeevan Ladhe wrote: > > Hi Beena, > > On Thu, Aug 17, 2017 at 4:59 PM, Beena Emerson > wrote: >> >> PFA the patch rebased over v25 patches of default list partition [1] > > > Thanks for rebasing. > > Range partition review: Thank you for your review.

Re: [HACKERS] Page Scan Mode in Hash Index

2017-08-22 Thread Amit Kapila
On Tue, Aug 22, 2017 at 2:28 PM, Ashutosh Sharma wrote: > On Sat, Aug 19, 2017 at 11:37 AM, Amit Kapila wrote: >> On Fri, Aug 11, 2017 at 6:51 PM, Ashutosh Sharma >> wrote: 7. _hash_kill_items(IndexScanDesc scan) { .. + /* + * If page LSN differs it means that

Re: [HACKERS] proposal: psql command \graw

2017-08-22 Thread Pavel Stehule
2017-08-22 10:36 GMT+02:00 Aleksander Alekseev : > Hi Pavel, > > > I am thinking about printing graphs in psql (mainly some histograms). I > > found so gnuplot is able do very good graphs in console. The one issue is > > user friendly (with less steps) generating data in good format for this > > a

Re: [HACKERS] proposal: psql command \graw

2017-08-22 Thread Pavel Stehule
2017-08-22 10:46 GMT+02:00 Fabien COELHO : > > Hello Pavel, > > One my idea is introduction new simple output format and execution command >> with result in this format. >> >> It should work something like >> >> \setenv GNUPLOT_OPTION '..' >> SELECT * FROM data >> \graw | gnuplot ... >> > > I

Re: [HACKERS] Page Scan Mode in Hash Index

2017-08-22 Thread Ashutosh Sharma
On Sat, Aug 19, 2017 at 11:37 AM, Amit Kapila wrote: > On Fri, Aug 11, 2017 at 6:51 PM, Ashutosh Sharma > wrote: >>> >>> 7. >>> _hash_kill_items(IndexScanDesc scan) >>> { >>> .. >>> + /* >>> + * If page LSN differs it means that the page was modified since the >>> + * last read. killedItems coul

Re: [HACKERS] proposal: psql command \graw

2017-08-22 Thread Fabien COELHO
Hello Pavel, One my idea is introduction new simple output format and execution command with result in this format. It should work something like \setenv GNUPLOT_OPTION '..' SELECT * FROM data \graw | gnuplot ... I understand that it is kind of a shortcut for: \pset fieldsep ' ' \p

Re: [HACKERS] Updating line length guidelines

2017-08-22 Thread Alvaro Herrera
Andres Freund wrote: > We currently still have the guideline that code should fit into an 80 > character window. But an increasing amount of the code, and code > submissions, don't adhere to that (e.g. copy.c, which triggered me to > write this email). And I mean outside of accepted "exceptions" l

Re: [HACKERS] proposal: psql command \graw

2017-08-22 Thread Aleksander Alekseev
Hi Pavel, > I am thinking about printing graphs in psql (mainly some histograms). I > found so gnuplot is able do very good graphs in console. The one issue is > user friendly (with less steps) generating data in good format for this > application. > > One my idea is introduction new simple outpu

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-22 Thread Fabien COELHO
Why not allow -I as a short option for --custom-initialize? Other options for similar purpose such as --foreign-keys also have only a long option. Since I think --custom-initialize option is in the same context as other options I didn't add short option to it for now. Because the options name

[HACKERS] proposal: psql command \graw

2017-08-22 Thread Pavel Stehule
Hi I am thinking about printing graphs in psql (mainly some histograms). I found so gnuplot is able do very good graphs in console. The one issue is user friendly (with less steps) generating data in good format for this application. One my idea is introduction new simple output format and execut

Re: [HACKERS] why not parallel seq scan for slow functions

2017-08-22 Thread Simon Riggs
On 21 August 2017 at 11:42, Amit Kapila wrote: >> or of 2) >> treating cost = speed, so we actually reduce the cost of a parallel >> plan rather than increasing it so it is more likely to be picked. >> > > Yeah, this is what is being currently followed for costing of parallel > plans and this pat