Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Michael Paquier
On Thu, Mar 10, 2016 at 4:58 PM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs wrote: >> On 10 March 2016 at 06:53, Michael Paquier >> wrote: >>> >>> On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera >>>

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 8:58 AM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs > wrote: > > On 10 March 2016 at 06:53, Michael Paquier > > wrote: > >> > >> On Wed, Mar 9, 2016 at 12:13 AM, Alvaro

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Tom Lane
Alexey Grishchenko writes: > One scenario when the problem occurs, is when you are calling the same > set-returning function in a single query twice. This way they share the > same "globals" which is not a bad thing, but when one function finishes > execution and

Re: [HACKERS] Optimizer questions

2016-03-10 Thread Tom Lane
konstantin knizhnik writes: > But right now the rule for cost estimation makes it not possible to apply > this optimization for simple expressions like this: ... > I wonder is there any advantages of earlier evaluation of such simple > expressions if them are not

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Alvaro Herrera
Corey Huinker wrote: > New patch for Alvaro's consideration. Thanks. As I said, it will be a few days before I get to this; any further reviews in the meantime are welcome. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training

Re: [HACKERS] unexpected result from to_tsvector

2016-03-10 Thread Dmitrii Golub
2016-03-08 0:46 GMT+03:00 Artur Zakirov : > Hello, > > On 07.03.2016 23:55, Dmitrii Golub wrote: > >> >> >> Hello, >> >> Should we added tests for this case? >> > > I think we should. I have added tests for teo...@123-stack.net and > 1...@stack.net emails. > > >>

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
I agree that passing function parameters through globals is not the best solution It works in a following way - executing custom code (in our case Python function invocation) in Python is made with PyEval_EvalCode . As an input to this C function you

Re: [HACKERS] Is there a way around function search_path killing SQL function inlining?

2016-03-10 Thread Tom Lane
Robert Haas writes: > Hmm. The meaning of funcs.inline depends on the search_path, not just > during dump restoration but all the time. So anything uses it under a > different search_path setting than the normal one will have this kind > of problem; not just dump/restore.

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 9:30 AM, Michael Paquier wrote: > On Thu, Mar 10, 2016 at 4:58 PM, Robert Haas > wrote: > > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs > wrote: > >> On 10 March 2016 at 06:53, Michael Paquier

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
No, my fix handles this well. In fact, with the first function call you allocate global variables representing Python function input parameters, call the function and receive iterator over the function results. Then in a series of Postgres calls to PL/Python handler you just fetch next value from

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-10 Thread Tomas Vondra
Hi, I've looked at this patch today, mostly to educate myself, so this probably should not count as a full review. Anyway, the patch seems in excellent shape - it'd be great if all patches (including those written by me) had this level of comments/docs. On Mon, 2016-02-29 at 16:09 -0800, Peter

Re: [HACKERS] Explain [Analyze] produces parallel scan for select Into table statements.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 4:43 AM, Amit Kapila wrote: > There should be a white space between 0:CURSOR_OPT_PARALLEL_OK. Also I > don't see this comment is required as similar other usage doesn't have any > such comment. Fixed these two points in the attached patch. > > In

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-10 Thread Petr Jelinek
On 10/03/16 17:07, Tom Lane wrote: Petr Jelinek writes: The comment above errhidefromclient says "Only log levels below ERROR can be hidden from the client." but use of the errhidefromclient(true) actually does hide the error message from client, client just gets failed

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-10 Thread Tom Lane
Petr Jelinek writes: > The comment above errhidefromclient says "Only log levels below ERROR > can be hidden from the client." but use of the errhidefromclient(true) > actually does hide the error message from client, client just gets > failed query without any message

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Tom Lane
Alexey Grishchenko writes: > No, my fix handles this well. > In fact, with the first function call you allocate global variables > representing Python function input parameters, call the function and > receive iterator over the function results. Then in a series of

Re: [HACKERS] Tsvector editing functions

2016-03-10 Thread Teodor Sigaev
Thanks! Fixed and added tests. Thank you! I did some patch cleanup/fix, but I have some doubt with function's names: 1 to_tsvector: # \df to_tsvector List of functions Schema |Name | Result data type | Argument data types | Type

Re: [HACKERS] Relation extension scalability

2016-03-10 Thread Dilip Kumar
On Thu, Mar 10, 2016 at 7:55 AM, Petr Jelinek wrote: Thanks for the comments.. > Hmm, why did you remove the comment above the call to > UnlockRelationForExtension? While re factoring I lose this comment.. Fixed it > It still seems relevant, maybe with some minor

[HACKERS] Floating point timestamps

2016-03-10 Thread Thomas Munro
Hi, Is the plan to remove support for floating point timestamps at some stage? If so, what is that waiting on, and would it provide sufficient warning if (say) 9.6 were documented as the last major release to support that build option? Thanks! -- Thomas Munro http://www.enterprisedb.com --

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-10 Thread Amit Langote
Hi Vinayak, Thanks for the quick review! On 2016/03/10 16:22, poku...@pm.nttdata.co.jp wrote: >> On 2016/03/10 14:29, Amit Langote wrote: >> Updated patches attached. > In 0002- [ snip ] > I think we need to use datid instead of datname. > Robert added datid in pg_stat_get_progress_info() and

[HACKERS] utils/misc: Simplify search of end of argv in save_ps_display_args()

2016-03-10 Thread Alexander Kuleshov
Hello, Attached patch provides trivial simplification of the search of end of the argv[] area by replacing for() loop with calculation based on argc. diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 892a810..d8f2105 100644 ---

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2016-03-10 Thread Amit Kapila
On Thu, Mar 10, 2016 at 1:04 PM, Mithun Cy wrote: > > > On Thu, Mar 3, 2016 at 11:50 PM, Robert Haas > wrote: > >What if you apply both this and Amit's clog control log patch(es)? Maybe > the combination of the two helps substantially more

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-10 Thread Simon Riggs
On 10 March 2016 at 06:27, Michael Paquier wrote: > On Thu, Mar 10, 2016 at 1:29 AM, David Steele wrote: > > On 1/8/16 9:34 AM, Alvaro Herrera wrote: > >> Simon Riggs wrote: > >>> > >>> On 8 January 2016 at 13:36, Alvaro Herrera

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-10 Thread pokurev
Hi Amit, Thank you for updating the patch. > -Original Message- > From: Amit Langote [mailto:langote_amit...@lab.ntt.co.jp] > Sent: Thursday, March 10, 2016 5:09 PM > To: SPS ポクレ ヴィナヤック(三技術) ; > robertmh...@gmail.com > Cc: horiguchi.kyot...@lab.ntt.co.jp;

Re: [HACKERS] Is there a way around function search_path killing SQL function inlining?

2016-03-10 Thread Regina Obe
-Original Message- > From: Andreas Karlsson [mailto:andr...@proxel.se] > Sent: Tuesday, March 08, 2016 10:43 PM > To: Regina Obe ; 'Robert Haas' > Cc: pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Is there a way around function search_path

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

2016-03-10 Thread Etsuro Fujita
On 2016/03/10 19:51, Robert Haas wrote: On Wed, Mar 9, 2016 at 3:30 PM, Tom Lane wrote: Robert Haas writes: Just taking a guess here, you might be thinking that instead of something like this... Update on public.ft2 -> Foreign Update on

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-10 Thread Michael Paquier
On Thu, Mar 10, 2016 at 10:00 AM, Vladimir Borodin wrote: > Let’s do immediately after you will send a new version of your patch? Or > even better after testing your patch? Don’t get me wrong, but rejecting my > patch without tangible work on your patch may lead to forgiving

Re: [HACKERS] Explain [Analyze] produces parallel scan for select Into table statements.

2016-03-10 Thread Amit Kapila
On Wed, Mar 9, 2016 at 8:18 PM, Mithun Cy wrote: > > Hi All, > > Explain [Analyze] Select Into table. produces the plan which uses parallel scans. > > Possible Fix: > > I tried to make a patch to fix this. Now in ExplainOneQuery if into clause is > > defined then

Re: [HACKERS] Optimizer questions

2016-03-10 Thread konstantin knizhnik
On Mar 10, 2016, at 1:56 AM, Tom Lane wrote: > Konstantin Knizhnik writes: >> I think that the best approach is to generate two different paths: >> original one, when projection is always done before sort and another one >> with postponed projection of non-trivial

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-10 Thread Robert Haas
On Wed, Mar 9, 2016 at 9:09 AM, Masahiko Sawada wrote: > * 001 patch : Incorporated the documentation suggestions and updated > logic a little. This 001 patch looks so little like what I was expecting that I decided to start over from scratch. The new version I wrote is

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

2016-03-10 Thread Robert Haas
On Wed, Mar 9, 2016 at 3:30 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Mar 9, 2016 at 1:12 PM, Tom Lane wrote: >>> I hadn't been paying any attention to this thread, but I wonder whether >>> this entire approach isn't

Re: [HACKERS] Is there a way around function search_path killing SQL function inlining?

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 3:21 AM, Regina Obe wrote: > When you back up the database, it would create a backup with this line: > > SET search_path = public, pg_catalog; > --your create materialized view here > > When you restore even if your database has search_paths set, your >

Re: [HACKERS] psql completion for ids in multibyte string

2016-03-10 Thread Kyotaro HORIGUCHI
Hello, At Mon, 7 Mar 2016 12:34:15 -0500, Robert Haas wrote in > >> Fix pushed. > > > > Thank you for committing this. I can see only one commit for this > > in the repository but I believe it is the

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

2016-03-10 Thread Fujii Masao
On Fri, Mar 4, 2016 at 3:40 AM, Masahiko Sawada wrote: > On Thu, Mar 3, 2016 at 11:30 PM, Masahiko Sawada > wrote: >> Hi, >> >> Thank you so much for reviewing this patch! >> >> All review comments regarding document and comment are fixed. >>

Re: [HACKERS] Small patch for pgstat.c: fix comment + pgindent

2016-03-10 Thread Amit Langote
Hi, Thanks for the report. On 2016/03/10 18:05, Aleksander Alekseev wrote: > Hello > > I noticed: > > http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b6fb6471f6afaf649e52f38269fd8c5c60647669 > > ... that comments for procedures pgstat_progress_update_param and >

Re: [HACKERS] create opclass documentation outdated

2016-03-10 Thread Emre Hasegeli
>> In create_opclass.sgml, not only do we have the list of AMs supporting >> STORAGE, but there is also a paragraph describing which AMs do what >> for input datatypes of FUNCTION members (around line 175). > > I placed BRIN together with gist/gin/spgist here, namely that the optype > defaults to

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-10 Thread Simon Riggs
On 10 March 2016 at 09:22, Michael Paquier wrote: > On Thu, Mar 10, 2016 at 10:00 AM, Vladimir Borodin > wrote: > > Let’s do immediately after you will send a new version of your patch? Or > > even better after testing your patch? Don’t get me wrong,

[HACKERS] Small patch for pgstat.c: fix comment + pgindent

2016-03-10 Thread Aleksander Alekseev
Hello I noticed: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b6fb6471f6afaf649e52f38269fd8c5c60647669 ... that comments for procedures pgstat_progress_update_param and pgstat_progress_end_command are identical. Here is a patch that fixes this. Also one empty line added

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-10 Thread Kyotaro HORIGUCHI
Hi, At Thu, 10 Mar 2016 08:21:36 +, wrote in <8e09c2fe530d4008aa0019e38c1d5...@mp-msgss-mbx007.msg.nttdata.co.jp> > > > So maybe we can add datname as separate column in > > pg_stat_progress_vacuum, I think it's not required only datid is sufficient. > > > Any

Re: [HACKERS] Parallel Aggregate

2016-03-10 Thread David Rowley
On 9 March 2016 at 04:06, Robert Haas wrote: > On Mon, Mar 7, 2016 at 5:15 PM, David Rowley > wrote: >> 3. Nothing in create_grouping_paths() looks at the force_parallel_mode >> GUC. I had a quick look at this GUC and was a bit surprised to

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-10 Thread Vladimir Borodin
> 10 марта 2016 г., в 11:50, Simon Riggs написал(а): > > On 10 March 2016 at 06:27, Michael Paquier > wrote: > On Thu, Mar 10, 2016 at 1:29 AM, David Steele

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-03-10 Thread Simon Riggs
On 9 March 2016 at 23:11, David Steele wrote: > There hasn't been any movement on this patch in a while. Will you have a > new tests ready for review soon? > I see the value in this feature, but the patch itself needs work and probably some slimming down/reality and a

Re: [HACKERS] pam auth - add rhost item

2016-03-10 Thread Grzegorz Sampolski
Hi. In attchment new patch with updated documentation and with small change to coding style as you suggested. Regards. Grzegorz. On 03/09/2016 08:30 AM, Haribabu Kommi wrote: > On Tue, Mar 8, 2016 at 10:43 PM, Grzegorz Sampolski > wrote: >> Hi Hari.

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-10 Thread Masahiko Sawada
On Thu, Mar 10, 2016 at 3:27 PM, Masahiko Sawada wrote: > Thank you for reviewing! > Attached updated patch. > > > On Thu, Mar 10, 2016 at 3:37 AM, Robert Haas wrote: >> On Wed, Mar 9, 2016 at 9:09 AM, Masahiko Sawada >>

[HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
Hello There is a bug in implementation of set-returning functions in PL/Python. When you call the same set-returning function twice in a single query, the executor falls to infinite loop which causes OOM. Here is a simple reproduction for this issue: CREATE OR REPLACE FUNCTION func(iter int)

Re: [HACKERS] Reduce lock levels others reloptions in ALTER TABLE

2016-03-10 Thread Simon Riggs
On 1 March 2016 at 19:00, Robert Haas wrote: > On Mon, Feb 29, 2016 at 12:58 PM, Fabrízio de Royes Mello > wrote: > > Some time ago we added [1] the infrastructure to allow different lock > levels > > for relation options. > > > > So per

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-10 Thread Pavan Deolasee
On Wed, Mar 9, 2016 at 7:56 PM, Petr Jelinek wrote: > Hi, > > I wonder why you define the gidlen as uint32 when it would fit into uint8 > which in the current TwoPhaseFileHeader struct should be win of 8 bytes on > padding (on 64bit). I think that's something worth

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-10 Thread Tomas Vondra
Hi Teodor, I've looked into v2 of the patch you sent a few days ago. Firstly, I definitely agree that being able to use OR conditions with an index is definitely a cool idea. I do however agree with David that the patch would definitely benefit from comments documenting various bits that are

Re: [HACKERS] Identifying a message in emit_log_hook.

2016-03-10 Thread David Steele
Hi Simon, On 3/10/16 7:26 AM, Simon Riggs wrote: Can you add this to the CF? It was submitted before deadline. I presume you have access to do that? No problem - here it is: https://commitfest.postgresql.org/9/576/ -- -David da...@pgmasters.net -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 3:08 AM, Amit Langote wrote: > Hi Vinayak, > > Thanks for the quick review! Committed 0001 earlier this morning. On 0002: + /* total_index_blks */ + current_index_blks = (BlockNumber *) palloc(nindexes * sizeof(BlockNumber)); +

Re: [HACKERS] Identifying a message in emit_log_hook.

2016-03-10 Thread Simon Riggs
On 25 February 2016 at 07:42, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, > > At Wed, 17 Feb 2016 09:13:01 +, Simon Riggs > wrote in < > canp8+jlbge_ybxulgzxvce44oob8v0t93e5_inhvbde2pxk...@mail.gmail.com> > > On 17 February 2016 at 08:34,

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-10 Thread David Steele
On 3/9/16 7:37 PM, Petr Jelinek wrote: On 03/02/16 05:02, Robert Haas wrote: On Mon, Feb 1, 2016 at 7:24 PM, David Steele wrote: I have attached a patch that adds an ereport() macro to suppress client output for a single report call (applies cleanly on 1d0c3b3). I'll

Re: [HACKERS] Parallel Aggregate

2016-03-10 Thread Amit Langote
On Thu, Mar 10, 2016 at 10:55 PM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 6:42 AM, David Rowley > wrote: >> The one reason that I asked about force_parallel_mode was that I >> assumed there was some buildfarm member running somewhere that

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 6:10 AM, Kyotaro HORIGUCHI wrote: > So, I have looked into system_views.sql and picked up what > catalogs/views shows objects in such way, that is, showing both > object id and its name. > > Show by name: pg_policies, pg_rules,

[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-10 Thread Amit Kapila
On Wed, Mar 9, 2016 at 5:46 PM, Haribabu Kommi wrote: > On Wed, Mar 9, 2016 at 10:06 PM, Amit Kapila wrote: > > On Wed, Mar 9, 2016 at 11:46 AM, Haribabu Kommi < kommi.harib...@gmail.com> > > wrote: > >> > >> > >> I tried replacing the random()

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-10 Thread Magnus Hagander
On Wed, Mar 9, 2016 at 5:48 AM, Christian Ullrich wrote: > * Peter Eisentraut wrote: > > On 2/12/16 11:24 AM, Christian Ullrich wrote: >> > > Otherwise, it may be time to update the manual (15.6 Supported >>> Platforms) where it says PostgreSQL "can be expected to work on

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

2016-03-10 Thread Tomas Vondra
Hi, On Mon, 2015-12-28 at 15:03 -0800, Peter Geoghegan wrote: > On Fri, Dec 18, 2015 at 11:57 AM, Peter Geoghegan wrote: > > BTW, I'm not necessarily determined to make the new special-purpose > > allocator work exactly as proposed. It seemed useful to prioritize > > simplicity,

[HACKERS] Small patch: fix warnings during compilation on FreeBSD

2016-03-10 Thread Aleksander Alekseev
Hello I noticed that master branch of PostgreSQL currently compiles with warnings on FreeBSD 10.2 RELEASE: ``` pg_locale.c:1290:12: warning: implicit declaration of function 'wcstombs_l' is invalid in C99 [-Wimplicit-function-declaration] result = wcstombs_l(to, from, tolen, locale);

Re: [HACKERS] Parallel Aggregate

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 6:42 AM, David Rowley wrote: > Hmm, it appears I only looked as far as the enum declaration, which I > expected to have something. Perhaps I'm just not used to looking up > the manual for things relating to code. I don't mind adding some

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-10 Thread Christian Ullrich
* Magnus Hagander wrote: I did notice the #ifdef's are actually different in the header and body section of the patch, which seems wrong. I used the one from the actual implementation (_M_AMD64) for the header includes as, and also merged the #ifdef's together to a single #if in each section.

Re: [HACKERS] Endless loop calling PL/Python set returning functions

2016-03-10 Thread Alexey Grishchenko
Tom Lane wrote: > Alexey Grishchenko > writes: > > No, my fix handles this well. > > In fact, with the first function call you allocate global variables > > representing Python function input parameters, call the function and > > receive

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

2016-03-10 Thread Peter Geoghegan
On Thu, Mar 10, 2016 at 5:40 AM, Tomas Vondra wrote: > I was thinking about running some benchmarks on this patch, but the > thread is pretty huge so I want to make sure I'm not missing something > and this is indeed the most recent version. Wait 24 - 48 hours,

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Corey Huinker
removed leftover development comment On Thu, Mar 10, 2016 at 11:02 AM, Corey Huinker wrote: > On Thu, Mar 10, 2016 at 10:58 AM, Robert Haas > wrote: > >> On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs >> wrote: >> > On 10

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Andres Freund
Hi Tom, On 2016-02-28 15:03:28 -0500, Tom Lane wrote: > diff --git a/src/include/optimizer/planmain.h > b/src/include/optimizer/planmain.h > index eaa642b..cd7338a 100644 > *** a/src/include/optimizer/planmain.h > --- b/src/include/optimizer/planmain.h > *** extern RelOptInfo

Re: [HACKERS] Relation extension scalability

2016-03-10 Thread Petr Jelinek
On 10/03/16 09:57, Dilip Kumar wrote: On Thu, Mar 10, 2016 at 7:55 AM, Petr Jelinek > wrote: Thanks for the comments.. Hmm, why did you remove the comment above the call to UnlockRelationForExtension? While re factoring I lose this

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-10 Thread Masahiko Sawada
On Fri, Mar 11, 2016 at 1:03 AM, Robert Haas wrote: > This 001 patch looks so little like what I was expecting that I > decided to start over from scratch. The new version I wrote is > attached here. I don't understand why your version tinkers with the > logic for setting

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

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 12:18 AM, Amit Kapila wrote: > On Wed, Mar 9, 2016 at 7:17 PM, Robert Haas wrote: >> >> On Wed, Mar 9, 2016 at 8:31 AM, Amit Kapila >> wrote: >> > Thanks for the suggestion. I have updated the

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-10 Thread Petr Jelinek
On 10/03/16 13:43, Pavan Deolasee wrote: On Wed, Mar 9, 2016 at 7:56 PM, Petr Jelinek > wrote: Hi, I wonder why you define the gidlen as uint32 when it would fit into uint8 which in the current TwoPhaseFileHeader struct should be

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 1:41 PM, Masahiko Sawada wrote: > On Fri, Mar 11, 2016 at 1:03 AM, Robert Haas wrote: >> This 001 patch looks so little like what I was expecting that I >> decided to start over from scratch. The new version I wrote is >>

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

2016-03-10 Thread Greg Stark
On Thu, Mar 10, 2016 at 1:40 PM, Tomas Vondra wrote: > I was thinking about running some benchmarks on this patch, but the > thread is pretty huge so I want to make sure I'm not missing something > and this is indeed the most recent version. I also ran some

Re: [HACKERS] pg_rewind just doesn't fsync *anything*?

2016-03-10 Thread Andres Freund
Hi, On 2016-03-10 08:47:16 +0100, Michael Paquier wrote: > Still, I think that we had better fsync only entries that are modified > by pg_rewind, and files that got updated, and not the whole directory Why? If any files in there are dirty, they need to be fsynced. If they're not dirty, fsync's

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Tom Lane
Andres Freund writes: > I see that you made a lot of formerly externally visible make_* routines > static. The Citus extension (which will be open source in a few days) > uses several of these (make_agg, make_sort_from_sortclauses, make_limit > at least). > Can we please

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-10 Thread Igal @ Lucee.org
On 3/8/2016 4:42 PM, Craig Ringer wrote: On 9 March 2016 at 05:40, Igal @ Lucee.org > wrote: I will try to gather more information about the other DBMSs and drivers and will post my findings here when I have them. Thanks. I know that's not the

[HACKERS] Adjusting the API of pull_var_clause()

2016-03-10 Thread Tom Lane
Over in the "Optimizer questions" thread, it's become apparent that we need to fix pull_var_clause() to offer multiple behaviors for WindowFunc nodes that are parallel to the ones it has for Aggrefs (viz, reject, recurse, or include in result). This should've been done when window functions were

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 11:33 AM, David G. Johnston wrote: > I tend to think we err toward this too much. This seems like development > concerns trumping usability. Consider that anything someone took the time > to write and polish to make committable to core was

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Andres Freund
On 2016-03-10 13:48:31 -0500, Tom Lane wrote: > Andres Freund writes: > > I see that you made a lot of formerly externally visible make_* routines > > static. The Citus extension (which will be open source in a few days) > > uses several of these (make_agg,

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Tom Lane
Andres Freund writes: > On 2016-03-10 13:48:31 -0500, Tom Lane wrote: >> That was intentional: in my opinion, nothing outside createplan.c ought >> to be making Plan nodes anymore. The expectation is that you make a >> Path describing what you want. Can you explain why, in

Re: [HACKERS] pg_rewind just doesn't fsync *anything*?

2016-03-10 Thread Michael Paquier
On Thu, Mar 10, 2016 at 7:52 PM, Andres Freund wrote: >> a target data folder should be stopped properly to be able to rewind, >> and it is better to avoid dependencies between utilities if that's not >> strictly necessary. initdb is likely to be installed side-by-side >>

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

2016-03-10 Thread Peter Geoghegan
On Thu, Mar 10, 2016 at 10:39 AM, Greg Stark wrote: > I want to rerun these on a dedicated machine and with trace_sort > enabled so that we can see how many merge passes were actually > happening and how much I/O was actually happening. Putting the results in context, by keeping

Re: [HACKERS] proposal: function parse_ident

2016-03-10 Thread Pavel Stehule
2016-03-10 15:34 GMT+01:00 Teodor Sigaev : > select >> >> parse_ident(E'X\rXX'); >> >> >> I am sending updated patch - I used json function for correct escaping - >> the >> escaping behave is same. >> > > Hmm, it doesn't

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-10 Thread Thomas Munro
On Fri, Mar 11, 2016 at 8:50 AM, Simon Riggs wrote: > On 3 February 2016 at 23:12, Thomas Munro > wrote: > >> >> It quacks suspiciously like a bug. > > > Agreed > > What's more important is that is very publicly a bug in the eyes of others >

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-10 Thread Simon Riggs
On 10 March 2016 at 20:36, Thomas Munro wrote: > On Fri, Mar 11, 2016 at 8:50 AM, Simon Riggs > wrote: > > On 3 February 2016 at 23:12, Thomas Munro > > > wrote: > > > >> > >> It quacks suspiciously like a

Re: [HACKERS] [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 3:44 PM, Pavel Stehule wrote: > I am trying to test this feature, and there I see not actual data. Maybe > this behave is not related to this patch: > > create table foo(a int); > insert into foo values(10); > > session one: > > begin; select *

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 2:41 PM, Andres Freund wrote: > ISTM, that there's good enough reasons to go either way; I don't see > what we're gaining by making these private. That just encourages > copy-paste coding. +1. Frustrating Citus's attempt to open-source their stuff is

Re: [HACKERS] auto_explain sample rate

2016-03-10 Thread Petr Jelinek
On 10/03/16 20:59, Julien Rouhaud wrote: On 10/03/2016 04:37, Petr Jelinek wrote: On 17/02/16 01:17, Julien Rouhaud wrote: Agreed, it's too obscure. Attached v4 fixes as you said. Seems to be simple enough patch and works. However I would like documentation to say that the range is 0 to 1

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 2:35 PM, Simon Riggs wrote: > But I still don't know "meh" means. Maybe this helps? https://en.wikipedia.org/wiki/Meh -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-10 Thread Gilles Darold
Le 10/03/2016 16:26, Tom Lane a écrit : > Robert Haas writes: >> On Wed, Mar 9, 2016 at 12:32 PM, Gilles Darold >> wrote: >>> I choose to allow the log collector to write his current log file name >>> into the lock file 'postmaster.pid'. >> Gosh,

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Peter Geoghegan
On Thu, Mar 10, 2016 at 11:45 AM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 2:41 PM, Andres Freund wrote: >> ISTM, that there's good enough reasons to go either way; I don't see >> what we're gaining by making these private. That just encourages >>

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Magnus Hagander
On Thu, Mar 10, 2016 at 8:45 PM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 2:41 PM, Andres Freund wrote: > > ISTM, that there's good enough reasons to go either way; I don't see > > what we're gaining by making these private. That just encourages >

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread David G. Johnston
On Thu, Mar 10, 2016 at 11:45 AM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 11:33 AM, David G. Johnston > wrote: > > I tend to think we err toward this too much. This seems like development > > concerns trumping usability. Consider that

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-10 Thread Simon Riggs
On 3 February 2016 at 23:12, Thomas Munro wrote: > It quacks suspiciously like a bug. > Agreed What's more important is that is very publicly a bug in the eyes of others and should be fixed and backpatched soon. We have a maintenance release coming in a couple

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Tom Lane
Andres Freund writes: > On 2016-03-10 14:16:03 -0500, Tom Lane wrote: >> I don't deny that you *could* continue to do things that way, but >> I dispute that it's a good idea. Why can't you generate a Path tree >> and then ask create_plan() to convert it? > Primarily because

Re: [HACKERS] checkpointer continuous flushing - V18

2016-03-10 Thread Andres Freund
On 2016-03-08 09:28:15 +0100, Fabien COELHO wrote: > > >>>Now I cannot see how having one context per table space would have a > >>>significant negative performance impact. > >> > >>The 'dirty data' etc. limits are global, not per block device. By having > >>several contexts with unflushed dirty

Re: [HACKERS] pg_rewind just doesn't fsync *anything*?

2016-03-10 Thread Andres Freund
On 2016-03-10 20:31:55 +0100, Michael Paquier wrote: > On Thu, Mar 10, 2016 at 7:52 PM, Andres Freund wrote: > > Having to backpatch a single system() invocation + find_other_exec() > > call, and backporting a more general FRONTEND version of initdb's > > fsync_pgdata() are

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Igal @ Lucee.org
On 3/10/2016 11:44 AM, Robert Haas wrote: On Thu, Mar 10, 2016 at 2:35 PM, Simon Riggs wrote: But I still don't know "meh" means. Maybe this helps? https://en.wikipedia.org/wiki/Meh LOL https://en.wikipedia.org/wiki/LOL -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Gavin Flower
On 11/03/16 08:48, Igal @ Lucee.org wrote: On 3/10/2016 11:44 AM, Robert Haas wrote: On Thu, Mar 10, 2016 at 2:35 PM, Simon Riggs wrote: But I still don't know "meh" means. Maybe this helps? https://en.wikipedia.org/wiki/Meh LOL https://en.wikipedia.org/wiki/LOL

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Simon Riggs
On 10 March 2016 at 18:45, Robert Haas wrote: > On Thu, Mar 10, 2016 at 11:33 AM, David G. Johnston > wrote: > > I tend to think we err toward this too much. This seems like development > > concerns trumping usability. Consider that anything

Re: [HACKERS] WIP: Upper planner pathification

2016-03-10 Thread Andres Freund
On 2016-03-10 14:16:03 -0500, Tom Lane wrote: > Andres Freund writes: > > In Citus' case a full PlannedStmt is generated on the master node, to > > combine the data generated on worker nodes (where the bog standard > > postgres planner is used). It's not the only way to do

Re: [HACKERS] auto_explain sample rate

2016-03-10 Thread Julien Rouhaud
On 10/03/2016 04:37, Petr Jelinek wrote: > On 17/02/16 01:17, Julien Rouhaud wrote: >> >> Agreed, it's too obscure. Attached v4 fixes as you said. >> > > Seems to be simple enough patch and works. However I would like > documentation to say that the range is 0 to 1 and represents fraction of >

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-10 Thread Tom Lane
Gilles Darold writes: > Then, should I have to use an alternate file to store the information or > implement a bidirectional communication with the syslogger? I'd just define a new single-purpose file $PGDATA/log_file_name or some such. regards,

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-10 Thread Robert Haas
On Thu, Mar 10, 2016 at 1:41 PM, Masahiko Sawada wrote: > On Fri, Mar 11, 2016 at 1:03 AM, Robert Haas wrote: >> This 001 patch looks so little like what I was expecting that I >> decided to start over from scratch. The new version I wrote is >>

  1   2   >