[HACKERS] Typo fix

2016-02-27 Thread Amit Langote
Attached fixes a typo: /* the extra unit accounts for the autovacuum launcher */ MaxBackends = MaxConnections + autovacuum_max_workers + 1 + - +max_worker_processes; + max_worker_processes; Thanks, Amit typo.patch Description: Binary data -- Sent via pgsql-hackers maili

Re: [HACKERS] Declarative partitioning

2016-02-28 Thread Amit Langote
Hi Ildar, On 2016/02/29 7:14, Ildar Musin wrote: > 16/02/16 07:46, Amit Langote wrote: >> On 2016/02/16 11:41, Josh berkus wrote: >>> We're not going to use CE for the new partitioning long-term, are we? This >>> is just the first version, right? >> Ye

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-02-29 Thread Amit Langote
Hi Thomas, On 2016/02/29 15:20, Thomas Munro wrote: > Thanks for looking at the patch! Here is a new version with the > following changes: > > 1. Some draft user documentation has been added, as requested. Just to clarify, in: + servers. A transaction that is run with causal_reads s

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-02-29 Thread Amit Langote
Hi, On 2016/02/29 18:05, Thomas Munro wrote: > On Mon, Feb 29, 2016 at 9:05 PM, Amit Langote wrote: >> + servers. A transaction that is run with >> causal_reads set >> + to on is guaranteed either to see the effects of all >> + completed tran

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

2016-03-04 Thread Amit Langote
On Sat, Mar 5, 2016 at 7:11 AM, Robert Haas wrote: > On Fri, Feb 26, 2016 at 3:28 AM, wrote: >> Thank you for your comments. >> Please find attached patch addressing following comments. > > I'm positive I've said this at least once before while reviewing this > patch, and I think more than once:

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

2016-03-04 Thread Amit Langote
On Sat, Mar 5, 2016 at 4:24 PM, Amit Langote wrote: > So, I took the Vinayak's latest patch and rewrote it a little ... > I broke it into two: > > 0001-Provide-a-way-for-utility-commands-to-report-progres.patch > 0002-Implement-progress-reporting-for-VACUUM-command.patch Oo

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

2016-03-06 Thread Amit Langote
Horiguchi-san, Thanks a lot for taking a look! On 2016/03/07 13:02, Kyotaro HORIGUCHI wrote: > At Sat, 5 Mar 2016 16:41:29 +0900, Amit Langote wrote: >> On Sat, Mar 5, 2016 at 4:24 PM, Amit Langote wrote: >>> So, I took the Vinayak's latest patch and rewrote it a littl

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

2016-03-07 Thread Amit Langote
Horiguchi-san, Thanks for a quick reply, :) On 2016/03/07 18:18, Kyotaro HORIGUCHI wrote: > At Mon, 7 Mar 2016 16:16:30 +0900, Amit Langote wrote: >> On 2016/03/07 13:02, Kyotaro HORIGUCHI wrote: >>> The 0001-P.. adds the following interface functions. >>> >>&

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

2016-03-07 Thread Amit Langote
On 2016/03/07 19:11, Amit Langote wrote: > we should re-introduce[1] a fixed-size char st_progress_message[] field. Sorry, that [1] does not refer to anything, just a leftover from my draft. I thought I had a link handy for an email where some sort of justification was given as to

Re: [HACKERS] Declarative partitioning

2016-03-07 Thread Amit Langote
Hi Corey, Sorry for replying so late. On 2016/02/25 3:31, Corey Huinker wrote: > [ ... ] > So I would assume that we'd use a syntax that presumed the columns were in > a composite range type. > > Which means your creates would look like (following Robert Haas's implied > suggestion that we l

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

2016-03-08 Thread Amit Langote
On 2016/03/07 23:48, Robert Haas wrote: > On Sun, Mar 6, 2016 at 11:02 PM, Kyotaro HORIGUCHI > wrote: >> The 0001-P.. adds the following interface functions. >> >> +extern void pgstat_progress_set_command(BackendCommandType cmdtype); >> +extern void pgstat_progress_set_command_target(Oid objid); >

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

2016-03-08 Thread Amit Langote
On Wed, Mar 9, 2016 at 12:24 AM, Robert Haas wrote: > This patch has been worked on by so many people and reviewed by so > many people that I can't keep track of who should be credited when it > gets committed. Could someone provide a list of author(s) and > reviewer(s)? Original authors are Rah

Re: [HACKERS] Declarative partitioning

2016-03-08 Thread Amit Langote
Hi, On 2016/03/09 9:17, Corey Huinker wrote: >> >> Sorry for replying so late. > No worries! We have jobs to do aside from this. Thanks! >> Everything seemed to go dandy until I tried FOR VALUES (blah , blah], >> where psql wouldn't send the command string without accepting the closing >> paren

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

2016-03-08 Thread Amit Langote
On 2016/03/09 0:24, Robert Haas wrote: > On Tue, Mar 8, 2016 at 3:02 AM, Amit Langote > wrote: >> Updated versions attached. >> >> * changed st_progress_param to int64 and so did the argument of >> pgstat_progress_update_param(). Likewise changed param1..param10 o

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

2016-03-08 Thread Amit Langote
and, ah, I forgot to add myself as a > reviewer. I have also reviewed this for last few CFs. > > So, as looking into CF app, it seems not so inconsistent with the > persons who appears in this thread for thses three CFs. > > Authors: Vinayak Pokale, Rahila Syed, Amit Langote &g

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

2016-03-08 Thread Amit Langote
Horiguchi-san, Thanks for the review! On 2016/03/08 18:19, Kyotaro HORIGUCHI wrote: >> Updated versions attached. >> >> * changed st_progress_param to int64 and so did the argument of >> pgstat_progress_update_param(). Likewise changed param1..param10 of >> pg_stat_get_progress_info()'s output

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

2016-03-08 Thread Amit Langote
> On 2016/03/08 18:19, Kyotaro HORIGUCHI wrote: >> + WHEN 0 THEN 100::numeric(5, 2) >> + ELSE ((S.param3 + 1)::numeric / S.param2 * >> 100)::numeric(5, 2) >> >> This usage of numeric seems overkill to me. > > Hmm, how could this rather be written? OK, ag

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

2016-03-08 Thread Amit Langote
On 2016/03/09 10:11, Amit Langote wrote: > The attached revision addresses above and one of Horiguchi-san's comments > in his email yesterday. I fixed one more issue in 0002 per Horiguchi-san's comment. Sorry about so many versions. Thanks, Amit >From 9473230af72e0a0e3b60a

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

2016-03-09 Thread Amit Langote
On 2016/03/10 2:16, Robert Haas wrote: > On Wed, Mar 9, 2016 at 2:37 AM, Amit Langote > wrote: >> On 2016/03/09 10:11, Amit Langote wrote: >>> The attached revision addresses above and one of Horiguchi-san's comments >>> in his email yesterday. >> >&g

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

2016-03-09 Thread Amit Langote
On 2016/03/10 14:29, Amit Langote wrote: > I rebased remainder patches (attached). > > 0001 is a small patch to fix issues reported by Tomas and Vinayak. 0002 > and 0003 are WIP patches to implement progress reporting for vacuum. Oops, in 0002, I wrongly joined with pg_class in th

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_ge

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 > pgstat_progr

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 >> switches this on and runs the regression tests. I

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

2016-03-10 Thread Amit Langote
On 2016/03/10 23:29, Robert Haas wrote: > On Thu, Mar 10, 2016 at 3:08 AM, Amit Langote > wrote: >> Hi Vinayak, >> >> Thanks for the quick review! > > Committed 0001 earlier this morning. Thanks! > On 0002: > > + /* total_index_blks */ >

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

2016-03-10 Thread Amit Langote
On 2016/03/11 13:16, Robert Haas wrote: > On Thu, Mar 10, 2016 at 9:04 PM, Amit Langote > wrote: >> So, from what I understand here, we should not put total count of index >> pages into st_progress_param; rather, have the client (reading >> pg_stat_progress_vacuum) derive

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

2016-03-12 Thread Amit Langote
On Fri, Mar 11, 2016 at 2:31 PM, Amit Langote wrote: > On 2016/03/11 13:16, Robert Haas wrote: >> On Thu, Mar 10, 2016 at 9:04 PM, Amit Langote >> wrote: >>> So, from what I understand here, we should not put total count of index >>> pages into st_progress_param;

Re: [HACKERS] pg_stat_get_progress_info(NULL) blows up

2016-03-13 Thread Amit Langote
On 2016/03/14 10:54, Thomas Munro wrote: > Hi > > I guess pg_stat_get_progress_info should either be strict (see > attached) or check for NULL. Thanks a lot for reporting and the patch. I think that's an oversight. Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

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

2016-03-14 Thread Amit Langote
Hi, Thanks for taking a look at the patch. On Mon, Mar 14, 2016 at 6:55 PM, Rahila Syed wrote: > Hello, > > While I am still looking at this WIP patch, I had one suggestion. > > Instead of making changes in the index AM API can we have a call to update > the shared state using pgstat_progress* A

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

2016-03-14 Thread Amit Langote
On 2016/03/15 3:41, Robert Haas wrote: > On Sat, Mar 12, 2016 at 7:49 AM, Amit Langote wrote: >> Instead, the attached patch adds a IndexBulkDeleteProgressCallback >> which AMs should call for every block that's read (say, right before a >> call to ReadBufferExtended)

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

2016-03-14 Thread Amit Langote
On 2016/03/12 6:31, Peter Geoghegan wrote: > On Thu, Mar 10, 2016 at 9:18 AM, Tomas Vondra > wrote: >> 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 (inc

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

2016-03-15 Thread Amit Langote
Hi Peter, On 2016/03/15 16:11, Peter Geoghegan wrote: > On Mon, Mar 14, 2016 at 11:48 PM, Amit Langote > wrote: >>> Dunno about that. It's defining characteristic is that it checks child >>> pages against their parent IMV. Things are not often defined in terms >

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

2016-03-15 Thread Amit Langote
On 2016/03/15 16:42, Peter Geoghegan wrote: > On Tue, Mar 15, 2016 at 12:31 AM, Amit Langote > wrote: >> By the way, one request (as a non-native speaker of English language, who >> ends up looking up quite a few words regularly) - >> >> Could we use "conform&q

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

2016-03-15 Thread Amit Langote
On 2016/03/16 2:33, Robert Haas wrote: > On Tue, Mar 15, 2016 at 1:16 AM, Amit Langote > wrote: >> On 2016/03/15 3:41, Robert Haas wrote: >>> Well, I think you need to study the index AMs and figure this out. >> >> OK. I tried to put calls to the callback in ap

[HACKERS] Typo in monitoring.sgml

2016-03-15 Thread Amit Langote
Attached fixes a minor typo as follows: s/index vacuums cycles/index vacuum cycles/g Thanks, Amit diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 7055c37..cb22afb 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -2594,7 +2594,7 @@ SELE

Re: [HACKERS] Declarative partitioning

2016-03-19 Thread Amit Langote
Hi Alexander, Thanks a lot for taking a look! On Wed, Mar 16, 2016 at 10:56 PM, Alexander Korotkov wrote: > I tried to apply your patch. It still applies, but has some duplicate oids. Actually, a reworked version I will post hopefully early next week will have fixed this. > After fixing dupli

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] about google summer of code 2016

2016-03-22 Thread Amit Langote
On 2016/03/23 9:19, Álvaro Hernández Tortosa wrote: > - Regarding GSoC: it looks to me that we failed to submit in time. Is this > what happened, or we weren't selected? If the former (and no criticism > here, just realizing a fact) what can we do next year to avoid this > happening again? Is anyon

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

2016-03-24 Thread Amit Langote
On 2016/03/24 22:01, Robert Haas wrote: > On Thu, Mar 24, 2016 at 8:45 AM, Rahila Syed wrote: >> >> - values[i+3] = >> UInt32GetDatum(beentry->st_progress_param[i]); >> + values[i+3] = >> Int64GetDatum(beentry->st_progress_param[i]); >> >

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

2016-03-28 Thread Amit Langote
On 2016/03/28 17:50, Kyotaro HORIGUCHI wrote: > > # LISPers don't hesitate to dive into Sea of Parens. Sorry in advance to be off-topic: https://xkcd.com/297 :) Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] A question on systable_beginscan()

2016-03-28 Thread Amit Langote
Hi, On 2016/03/25 23:49, Onder Kalaci wrote: > Hi hackers, > > As it's documented in the source code, systable_beginscan() could be used > to on non-system tables as well. My question is that, is it possible to > write a C code with systable_beginscan(), systable_getnext() and ScanKeys > which i

Re: [HACKERS] [postgresSQL] [bug] Two or more different types of constraints with same name creates ambiguity while drooping.

2016-03-30 Thread Amit Langote
On 2016/03/30 15:16, Harshal Dhumal wrote: > Hi Team, > > While I was working on constraints node in pgadmin4 I came across this > scenario. Please let me know if it's correct behaviour or a bug. > > *Scenario:* > > If we create two different type of constrains (lets say primary key and > forei

Re: [HACKERS] [GENERAL] pg_restore casts check constraints differently

2016-03-30 Thread Amit Langote
On Thu, Mar 31, 2016 at 1:00 AM, Tom Lane wrote: > I wrote: >> Amit Langote writes: >>> destdb=# ALTER TABLE c ADD CONSTRAINT p_a_check CHECK (a IN ('a', 'b', >>> 'c')); >>> destdb=# \d c >>> ... >>> Check con

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

2016-01-12 Thread Amit Langote
On 2016/01/12 11:28, Vinayak Pokale wrote: > On Jan 12, 2016 11:22 AM, "Amit Langote" > wrote: >> >> On 2016/01/12 10:30, Amit Langote wrote: >>> I'm slightly concerned that the latest patch doesn't incorporate any >>> revisions to t

[HACKERS] About get_relation_constraints and include_notnull

2016-01-13 Thread Amit Langote
Why does the argument include_notnull argument exist if get_relation_constraints() is being called from only one place? Perhaps we could remove it and add the IS NOT NULL test expression unconditionally if there are any NOT NULL columns. Thanks, Amit -- Sent via pgsql-hackers mailing list (pg

Re: [HACKERS] About get_relation_constraints and include_notnull

2016-01-14 Thread Amit Langote
On 2016/01/14 23:36, Tom Lane wrote: > Amit Langote writes: >> Why does the argument include_notnull argument exist if >> get_relation_constraints() is being called from only one place? Perhaps we >> could remove it and add the IS NOT NULL test expression unconditionally if

[HACKERS] Comment thinko in expand_inherited_rtentry()

2016-01-14 Thread Amit Langote
Hi, Attached fixes what looks like a thinko in a comment: It is the child relations that are "non-local" temp tables that are skipped from being included the inheritance set. The comment in question as it stands, doesn't note that. Thanks, Amit diff --git a/src/backend/optimizer/prep/prepunion.c

Re: [HACKERS] Declarative partitioning

2016-01-15 Thread Amit Langote
itful) code review could be done. Please feel free to post your thoughts about design, syntax, etc. On 2015/12/22 10:51, Amit Langote wrote: > On 2015/12/18 3:56, Robert Haas wrote: >> On Mon, Dec 14, 2015 at 2:14 AM, Amit Langote wrote: >>> Syntax to create a partitioned t

Re: [HACKERS] [PoC] Asynchronous execution again (which is not parallel)

2016-01-21 Thread Amit Langote
Hi! On 2016/01/21 18:26, Kyotaro HORIGUCHI wrote: >>> Then, suppose we add a function bool ExecStartAsync(PlanState *target, >>> ExecCallback callback, PlanState *cb_planstate, void *cb_context). >>> For non-async-aware plan nodes, this just returns false. async-aware >>> plan nodes should initi

Re: [HACKERS] Declarative partitioning

2016-01-21 Thread Amit Langote
Hi, On 2016/01/17 9:47, Corey Huinker wrote: >> If we have a CREATE statement for each partition, how do we generalize >> that to partitions at different levels? For example, if we use something >> like the following to create a partition of parent_name: >> >> CREATE PARTITION partition_name OF p

Re: [HACKERS] Declarative partitioning

2016-01-25 Thread Amit Langote
Hi, On 2016/01/23 3:42, Corey Huinker wrote: >> So for now, you create an empty partitioned table specifying all the >> partition keys without being able to define any partitions in the same >> statement. Partitions (and partitions thereof, if any) will be created >> using CREATE PARTITION state

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

2016-01-25 Thread Amit Langote
Hi Vinayak, On 2016/01/25 20:58, Vinayak Pokale wrote: > Hi, > > Please find attached updated patch with an updated interface. > Thanks for updating the patch. > I added the below interface to update the > scanned_heap_pages,scanned_index_pages and index_scan_count only. > void pgstat_report_

Re: [HACKERS] Declarative partitioning

2016-01-28 Thread Amit Langote
Hi Tomas, Thanks for your comments and sorry for replying so late. On 2016/01/22 22:54, Tomas Vondra wrote: > thanks for working on this. Seems the last version of the patch was > submitted more than 2 months ago and I believe large parts of it will get > reworked based on the extensive discussi

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

2016-01-28 Thread Amit Langote
Hi, On Thu, Jan 28, 2016 at 7:38 PM, Rahila Syed wrote: >>+if(!scan_all) >>+scanned_heap_pages = scanned_heap_pages + >>next_not_all_visible_block; > >>I don't want to be too much of a stickler for details here, but it >>seems to me that this is an outright lie

Re: [HACKERS] thanks for FOSDEM/PGDay 2016 Developer Meeting

2016-01-28 Thread Amit Langote
On Friday, 29 January 2016, Oleg Bartunov wrote: > I read > https://wiki.postgresql.org/wiki/FOSDEM/PGDay_2016_Developer_Meeting and > would like to say thanks for such nice review of meeting. > +many Thanks, Amit

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

2016-01-28 Thread Amit Langote
On 2016/01/28 23:53, Robert Haas wrote: > On Thu, Jan 28, 2016 at 8:41 AM, Amit Langote wrote: >> Or keep scanned_heap_pages as is and add a skipped_pages (or >> skipped_heap_pages). I guess the latter would be updated not only for >> all visible skipped pages but also pin s

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

2016-01-31 Thread Amit Langote
On 2016/01/29 21:02, Rahila Syed wrote: >> Okay, I agree that reporting just the current blkno is simple and good >> enough. How about numbers of what we're going to report as the "Vacuuming >> Index and Heap" phase? I guess we can still keep the scanned_index_pages >> and index_scan_count So we ha

Re: [HACKERS] Way to check whether a particular block is on the shared_buffer?

2016-02-01 Thread Amit Langote
KaiGai-san, On 2016/02/01 10:38, Kouhei Kaigai wrote: > As an aside, background of my motivation is the slide below: > http://www.slideshare.net/kaigai/sqlgpussd-english > (LT slides in JPUG conference last Dec) > > I'm under investigation of SSD-to-GPU direct feature on top of > the custom-scan

[HACKERS] Minor typo in syncrep.c

2016-02-03 Thread Amit Langote
Attached patch removes an extraneous word in the comment above SyncRepReleaseWaiters() in syncrep.c - * Other policies are possible, which would change what we do here and what + * Other policies are possible, which would change what we do here and * perhaps also which information we store as we

Re: [HACKERS] Minor typo in syncrep.c

2016-02-03 Thread Amit Langote
On 2016/02/03 17:50, Amit Langote wrote: > Attached patch removes an extraneous word in the comment above I kept reading and found one place in a comment within the function where a word is most probably missing, Attached fixes it. /* * If this WALSender is serving a standby that

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-02-03 Thread Amit Langote
Hi Thomas, On 2016/01/20 13:12, Thomas Munro wrote: > That one conflicts with b1a9bad9e744857291c7d5516080527da8219854, so > here is a new version. -if (walsndctl->lsn[SYNC_REP_WAIT_WRITE] < MyWalSnd->write) +if (is_highest_priority_sync_standby) [ ... ] -if (walsndctl->lsn[SYNC_RE

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

2016-02-07 Thread Amit Langote
Hi Vinayak, Thanks for updating the patch, a couple of comments: On 2016/02/05 17:15, poku...@pm.nttdata.co.jp wrote: > Hello, > > Please find attached updated patch. >> The point of having pgstat_report_progress_update_counter() is so that >> you can efficiently update a single counter withou

Re: [HACKERS] 2016-01 Commitfest

2016-02-08 Thread Amit Langote
On 2016/02/09 6:46, Magnus Hagander wrote: > On Mon, Feb 8, 2016 at 10:19 PM, Alvaro Herrera > wrote: > >> Hi everybody, >> >> I just closed the last few remaining items in the commitfest. This is >> the final summary: >> >> Committed: 32. >> Moved to next CF: 32. >> Rejected: 2. >> Returned

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

2016-02-08 Thread Amit Langote
Hi Suraj, On 2016/02/09 12:16, kharagesuraj wrote: > Hello, > > >>> I agree with first version, and attached the updated patch which are >>> modified so that it supports simple multiple sync replication you >>> suggested. >>> (but test cases are not included yet.) > > I have tried for some bas

Re: [HACKERS] Declarative partitioning

2016-02-15 Thread Amit Langote
Hi Corey, On 2016/02/16 5:15, Corey Huinker wrote: >> >> The individual patches have commit messages that describe code changes. >> This is registered in the upcoming CF. Feedback and review is greatly >> welcomed! >> > We have a current system that is currently a mix of tables, each of which > i

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

2016-02-15 Thread Amit Langote
Hello, On 2016/02/15 20:21, Kyotaro HORIGUCHI wrote: > At Mon, 8 Feb 2016 11:37:17 +0900, Amit Langote wrote: >> On 2016/02/05 17:15, poku...@pm.nttdata.co.jp wrote: >>> Please find attached updated patch. [ ... ] >> >> Instead of passing the array of char *'

Re: [HACKERS] Declarative partitioning

2016-02-15 Thread Amit Langote
Hi Josh, On 2016/02/16 11:41, Josh berkus wrote: > On 02/15/2016 04:28 PM, Amit Langote wrote: >> Also, you won't see any optimizer and executor changes. Queries will still >> use the same plans as existing inheritance-based partitioned tables, >> although as I menti

Re: [HACKERS] Declarative partitioning

2016-02-16 Thread Amit Langote
On 2016/02/15 10:55, Amit Langote wrote: > required. There is also basic planner support but no support yet to enable > constraint exclusion on partitions (which will be fulfilled shortly by > installing equivalent check constraints on partitions). Just to follow up on this - attached

Re: [HACKERS] On Conflict Do nothing errors IF conflict and there is a data type length or check failure

2016-02-16 Thread Amit Langote
Hi, On 2016/02/17 14:34, Regina Obe wrote: > I'm guessing this is by design but just wanted to confirm that since it > makes this feature not as useful for us. > > It also wasn't absolutely clear to me from the documentation. > > We are running PostgreSQL 9.5.1 and if we do something like: >

Re: [HACKERS] about google summer of code 2016

2016-02-16 Thread Amit Langote
Hi Shubham, On 2016/02/17 16:27, Shubham Barai wrote: > Hello everyone, > > I am currently pursuing my bachelor of engineering in computer science > at Maharashtra > Institute of Technology, Pune ,India. I am very excited about contributing > to postgres through google summer of code program. >

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

2016-02-16 Thread Amit Langote
Hi, On 2016/02/16 18:25, Kyotaro HORIGUCHI wrote: > At Tue, 16 Feb 2016 10:39:27 +0900, Amit Langote wrote: >> On 2016/02/15 20:21, Kyotaro HORIGUCHI wrote: >>> CREATE FUNCTION >>> pg_stat_get_command_progress(IN cmdtype integer) >>> RETURNS SETOF integ

Re: [HACKERS] Declarative partitioning

2016-02-17 Thread Amit Langote
On 2016/02/16 21:57, Robert Haas wrote: > On Fri, Jan 15, 2016 at 5:48 AM, Amit Langote > wrote: >> If we have a CREATE statement for each partition, how do we generalize >> that to partitions at different levels? For example, if we use something >> like the following

Re: [HACKERS] a raft of parallelism-related bug fixes

2016-02-18 Thread Amit Langote
On 2016/02/18 16:38, Craig Ringer wrote: > I should resurrect Abhijit's patch to allow the isolationtester to talk to > multiple servers. We'll want that when we're doing tests like "assert that > this change isn't visible on the replica before it becomes visible on the > master". (Well, except we

Re: [HACKERS] about google summer of code 2016

2016-02-18 Thread Amit Langote
On 2016/02/18 22:44, Alexander Korotkov wrote: > On Wed, Feb 17, 2016 at 10:40 AM, Amit Langote wrote: >> I didn't find for 2016 but here is the PostgreSQL wiki page for the last >> year's GSoC page: https://wiki.postgresql.org/wiki/GSoC_2015#Project_Ideas > > &g

Re: [HACKERS] Declarative partitioning

2016-02-19 Thread Amit Langote
On Sat, Feb 20, 2016 at 1:41 PM, Peter Eisentraut wrote: > On 2/16/16 9:56 PM, Amit Langote wrote: >> From now on, instead of attaching multiple files like in the previous >> message, I will send a single tar.gz which will contain patches created by >> git-format-patch. >

Re: [HACKERS] Declarative partitioning

2016-02-24 Thread Amit Langote
On 2016/02/20 5:06, Corey Huinker wrote: > On Thu, Feb 18, 2016 at 12:41 AM, Amit Langote wrote: > >> START [ EXCL ] (startval) END [ INCL ] (endval) >> >> That is, in range type notation, '[startval, endval)' is the default >> behavior. So for each pa

Re: [HACKERS] Declarative partitioning

2016-02-25 Thread Amit Langote
On 2016/02/23 22:51, Robert Haas wrote: > On Thu, Feb 18, 2016 at 11:11 AM, Amit Langote wrote: >> Some might think that writing potentially the same PARTITION BY clause 100 >> times for 100 level-1 partitions could be cumbersome. That is what >> SUBPARTITION BY notation may b

Re: [HACKERS] Declarative partitioning

2016-02-25 Thread Amit Langote
Hi, Thanks for your feedback. On 2016/02/26 0:43, Jean-Pierre Pelletier wrote: > Why not based it on "Exclusion Constraint" ? > > Most discussions as of late seems to focus on Range overlaps which appeal > (I would think) is that it supports both "equality" and "overlaps", two > popular partiti

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

2016-02-26 Thread Amit Langote
Hi Vinayak, Thanks for updating the patch! A quick comment: On 2016/02/26 17:28, poku...@pm.nttdata.co.jp wrote: >> CREATE VIEW pg_stat_vacuum_progress AS >> SELECT S.s[1] as pid, >> S.s[2] as relid, >> CASE S.s[3] >>WHEN 1 THEN 'Scanning Heap' >>

Re: [HACKERS] Fix comment in ATExecValidateConstraint

2016-08-18 Thread Amit Langote
On 2016/07/25 17:18, Amit Langote wrote: > The comment seems to have been copied from ATExecAddColumn, which says: > > /* > * If we are told not to recurse, there had better not be any > - * child tables; else the addition would put them out of step. > > For ATExecV

Re: [HACKERS] Fix comment in ATExecValidateConstraint

2016-08-18 Thread Amit Langote
On 2016/08/19 5:35, Robert Haas wrote: > On Thu, Aug 18, 2016 at 5:15 AM, Amit Langote > wrote: >> On 2016/07/25 17:18, Amit Langote wrote: >>> The comment seems to have been copied from ATExecAddColumn, which says: >>> >>> /* >>> * If we are

Re: [HACKERS] Declarative partitioning - another take

2016-08-24 Thread Amit Langote
On 2016/08/22 13:51, Ashutosh Bapat wrote: > The parent-child relationship of multi-level partitioned tables is not > retained when creating the AppendRelInfo nodes. We create RelOptInfo nodes > for all the leaf and intermediate tables. The AppendRelInfo nodes created > for these RelOptInfos set th

Re: [HACKERS] Declarative partitioning - another take

2016-08-26 Thread Amit Langote
On 2016/08/18 5:23, Robert Haas wrote: > On Wed, Aug 17, 2016 at 2:21 AM, Amit Langote > wrote: >> I am slightly tempted to eliminate the pg_partition catalog and associated >> syscache altogether and add a column to pg_class as Robert suggested. >> That way, all relid_i

Re: [HACKERS] Declarative partitioning - another take

2016-08-31 Thread Amit Langote
On 2016/08/29 20:53, Robert Haas wrote: > On Fri, Aug 26, 2016 at 1:33 PM, Amit Langote > wrote: >> We do take a lock on the parent because we would be changing its partition >> descriptor (relcache). I changed MergeAttributes() such that an >> Access

Re: [HACKERS] Declarative partitioning - another take

2016-08-31 Thread Amit Langote
On 2016/08/31 16:17, Robert Haas wrote: > On Wed, Aug 31, 2016 at 12:37 PM, Amit Langote wrote: >> What I was trying to understand is why this would not be possible >> with a design where partition bound is stored in the catalog as a property >> of individual partitions inst

Re: [HACKERS] Aggregate Push Down - Performing aggregation on foreign server

2016-08-31 Thread Amit Langote
On 2016/08/31 16:42, Pavel Stehule wrote: > 2016-08-31 9:00 GMT+02:00 Robert Haas : > >> On Wed, Aug 31, 2016 at 11:56 AM, Pavel Stehule >> wrote: >>> It is pity - lot of performance issues are related to this missing >> feature. >> >> I don't think you are being very clear about what feature you

Re: [HACKERS] Declarative partitioning - another take

2016-08-31 Thread Amit Langote
On 2016/08/25 16:15, Ashutosh Bapat wrote: > On Thu, Aug 25, 2016 at 12:22 PM, Amit Langote wrote: >> b) >> when accumulating append subpaths, do not flatten a subpath that is itself >> an append when ((AppendPath *) subpath)->path.parent is a RelOptInfo with >> non

Re: [HACKERS] pgbench - allow to store select results into variables

2016-09-01 Thread Amit Langote
Hi Fabien, On 2016/07/16 1:33, Fabien COELHO wrote: > Here is a v2 with more or less this approach, although \into does not end > the query, but applies to the current or last sql command. A query is > still terminated with a ";". This patch needs to be rebased because of commit 64710452 (on 201

Re: [HACKERS] Declarative partitioning - another take

2016-09-01 Thread Amit Langote
On 2016/09/02 14:38, Ashutosh Bapat wrote: > Here's something I observed with your set of patches posted in June. I have > not checked the latest set of patches. So, if it's something fixed, please > ignore the mail and sorry for me being lazy. > > prt1 is partitioned table and it shows following

Re: [HACKERS] Declarative partitioning - another take

2016-09-01 Thread Amit Langote
On 2016/09/02 15:22, Ashutosh Bapat wrote: >> >> >>> 2. A combination of constraints on the partitions should be applicable to >>> the parent. We aren't doing that. >> >> How about on seeing that a RELOPT_OTHER_MEMBER_REL is partitioned parent >> table, we can have get_relation_constraints() includ

Re: [HACKERS] Declarative partitioning - another take

2016-09-02 Thread Amit Langote
On 2016/09/02 15:57, Ashutosh Bapat wrote: > On Fri, Sep 2, 2016 at 12:23 PM, Amit Langote wrote: >> Getting rid of the parent table in the append list by other means may be a >> way to go. We know that the table is empty and safe to just drop. >> > Ok. Does a constraint (

Re: [HACKERS] Surprising behaviour of \set AUTOCOMMIT ON

2016-09-02 Thread Amit Langote
Hi, Some minor comments. + + + Autocommit cannot be set on inside a transaction, the ongoing + transaction has to be ended by entering COMMIT or + ROLLBACK before setting autocommit on. + + I guess: "cannot be set *to* on" and likewise for

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-02 Thread Amit Langote
Hi Corey, Here are some comments and a review of the patch. On 2016/06/03 5:48, Corey Huinker wrote: > A while back, there was a push to make COPY gzip-aware. That didn't happen, > but COPY FROM PROGRAM did, and it scratches the same itch. > > I have a similar need, but with file_fdw foreign tab

Re: [HACKERS] pgbench - allow to store select results into variables

2016-09-05 Thread Amit Langote
Hi Fabien, On 2016/09/03 2:47, Fabien COELHO wrote: >> This patch needs to be rebased because of commit 64710452 (on 2016-08-19). > > Here it is! Thanks for sending the updated patch. Here are some (mostly cosmetic) comments. Before the comments, let me confirm whether the following result is

[HACKERS] Comment Typo

2016-09-05 Thread Amit Langote
Attached fixes a typo in header comment in libpq-be.h. s/libpq_be.h/libpq-be.h/g Thanks, Amit diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index ecdfbc6..b91eca5 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -1,6 +1,6 @@ /*---

Re: [HACKERS] Declarative partitioning - another take

2016-09-06 Thread Amit Langote
Hi, On Tue, Sep 6, 2016 at 8:15 PM, Rajkumar Raghuwanshi wrote: > Hi, > > I have applied updated patches given by you, and observe below. > > here in the given example, t6_p3 partition is not allowed to have null, but > I am able to insert it, causing two nulls in the table. > > --create a partit

Re: [HACKERS] Declarative partitioning - another take

2016-09-06 Thread Amit Langote
On Tue, Sep 6, 2016 at 9:19 PM, Robert Haas wrote: > On Wed, Aug 31, 2016 at 1:05 PM, Amit Langote > wrote: >>> However, it seems a lot better to make it a property of the parent >>> from a performance point of view. Suppose there are 1000 partitions. >>> Readi

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-06 Thread Amit Langote
On 2016/09/07 3:12, Corey Huinker wrote: > On Fri, Sep 2, 2016 at 5:07 AM, Amit Langote wrote: >> I am not familiar with win32 stuff too, so I don't have much to say about >> that. Maybe someone else can chime in to help with that. > > The regressions basically *can

Re: [HACKERS] Let file_fdw access COPY FROM PROGRAM

2016-09-06 Thread Amit Langote
On 2016/09/07 12:29, Corey Huinker wrote: > On Tue, Sep 6, 2016 at 9:46 PM, Amit Langote wrote: >> OK. > Well...maybe not, depending on what Craig and other can do to educate me > about the TAP tests. Sure. >>> Changing table-level options requires superuser privileges,

Re: [HACKERS] Declarative partitioning - another take

2016-09-07 Thread Amit Langote
Hi, On 2016/09/07 17:56, Rajkumar Raghuwanshi wrote: > Hi, > > I have a query regarding list partitioning, > > For example if I want to store employee data in a table, with "IT" dept > employee in emp_p1 partition, "HR" dept employee in emp_p2 partition and if > employee belongs to other than t

Re: [HACKERS] Declarative partitioning - another take

2016-09-08 Thread Amit Langote
On 2016/09/08 21:38, Rajkumar Raghuwanshi wrote: > On Wed, Sep 7, 2016 at 3:58 PM, Amit Langote wrote: >> On 2016/09/07 17:56, Rajkumar Raghuwanshi wrote: >>> >>> In this case not sure how to create partition table. Do we have something >>> like we have UNBOUNDE

  1   2   3   4   5   6   7   8   9   10   >