Re: jsonpath: Inconsistency of timestamp_tz() Output

2024-07-22 Thread Jeevan Chalke
arately. However, in the attached version, I have added some comments and also, fixed some indentation. Thanks > > Best, > > David > > -- *Jeevan Chalke* *Principal, ManagerProduct Development* enterprisedb.com <https://www.enterprisedb.com> v4-0001-Preserve-tz-when-converting-to-jsonb-timestamptz.patch Description: Binary data

Re: Shouldn't jsonpath .string() Unwrap?

2024-06-15 Thread Jeevan Chalke
`git commit > --all --amend --date now --reedit-message HEAD` and force-pushed (then > fixed the typo and fixed again). > > D > > > > -- *Jeevan Chalke* *Principal, ManagerProduct Development* enterprisedb.com <https://www.enterprisedb.com> v3-0001-Teach-jsonpath-string-to-unwrap-in-lax-mode.patch Description: Binary data

Re: More new SQL/JSON item methods

2024-02-27 Thread Jeevan Chalke
On Tue, Feb 27, 2024 at 12:40 PM Andrew Dunstan wrote: > > On 2024-02-02 Fr 00:31, Jeevan Chalke wrote: > > > > On Thu, Feb 1, 2024 at 11:25 AM Kyotaro Horiguchi > wrote: > >> At Thu, 1 Feb 2024 09:22:22 +0530, Jeevan Chalke < >> jeevan.cha...@enterprisedb

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-13 Thread Jeevan Chalke
On Sat, Feb 10, 2024 at 10:55 PM Andrew Dunstan wrote: > > On 2024-02-08 Th 21:02, Jeevan Chalke wrote: > > > > On Thu, Feb 8, 2024 at 2:22 PM jian he > wrote: > >> On Thu, Feb 8, 2024 at 1:27 PM Jeevan Chalke >> wrote: >> > >> > >

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-08 Thread Jeevan Chalke
On Thu, Feb 8, 2024 at 2:22 PM jian he wrote: > On Thu, Feb 8, 2024 at 1:27 PM Jeevan Chalke > wrote: > > > > > > > > On Wed, Feb 7, 2024 at 9:13 PM jian he > wrote: > >> > >> On Wed, Feb 7, 2024 at 7:36 PM Jeevan Chalke > >> wrote

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-07 Thread Jeevan Chalke
On Wed, Feb 7, 2024 at 9:13 PM jian he wrote: > On Wed, Feb 7, 2024 at 7:36 PM Jeevan Chalke > wrote: > > Added checkTimezoneIsUsedForCast() check where ever we are casting > timezoned to non-timezoned types and vice-versa. > > https://www.postgresql.org/docs/devel/functi

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-07 Thread Jeevan Chalke
7;::text from cte > union all > select jsonb_path_query(s, '$.date()')::text,'-8'::text, 'date'::text from > cte > union all > select jsonb_path_query(s, '$.time_tz()')::text,'-8'::text, > 'time_tz'::text from cte; > commit; > > > [0] > https://git.postgresql.org/cgit/postgresql.git/commit/?id=66ea94e8e606529bb334515f388c62314956739e > > > ouch. Good catch. Clearly we need to filter these like we do for the > .datetime() method. > > > cheers > > > andrew > > -- > Andrew Dunstan > EDB: https://www.enterprisedb.com > > -- Jeevan Chalke *Principal, ManagerProduct Development* edbpostgres.com preserve-immutability.patch Description: Binary data

Re: More new SQL/JSON item methods

2024-02-01 Thread Jeevan Chalke
On Thu, Feb 1, 2024 at 11:25 AM Kyotaro Horiguchi wrote: > At Thu, 1 Feb 2024 09:22:22 +0530, Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote in > > On Thu, Feb 1, 2024 at 7:24 AM Kyotaro Horiguchi < > horikyota@gmail.com> > > wrote: > > > &

Re: More new SQL/JSON item methods

2024-01-31 Thread Jeevan Chalke
ke out of range, not valid, invalid input, etc, etc. Also, we don't need separate error messages for string input as well, which currently has the following form: "string argument of jsonpath item method .%s() is not a valid representation.." Thanks > regards. > > -- > Kyotaro Horiguchi > NTT Open Source Software Center > -- Jeevan Chalke *Principal, ManagerProduct Development* edbpostgres.com

Re: More new SQL/JSON item methods

2024-01-31 Thread Jeevan Chalke
On Thu, Feb 1, 2024 at 7:20 AM Kyotaro Horiguchi wrote: > Thank you for the fix! > > At Tue, 30 Jan 2024 13:46:17 +0530, Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote in > > On Mon, Jan 29, 2024 at 11:03 AM Tom Lane wrote: > > > > > Kyotaro Hori

Re: More new SQL/JSON item methods

2024-01-30 Thread Jeevan Chalke
e should have error messages more specific. I tried that in the attached patch; please have your views. I have the following wordings for that error message: "NaN or Infinity is not allowed for jsonpath item method .%s()" Suggestions... Thanks -- Jeevan Chalke *Principal, ManagerProduct Development* edbpostgres.com improve_error_for_Nan_Infinity.patch.no Description: Binary data

Re: More new SQL/JSON item methods

2024-01-26 Thread Jeevan Chalke
= jperOk; > > > > is dead code and might as well get removed while you're at it. > > > > > > > OK, pushed those. Thanks. > Thank you all. > > > cheers > > > andrew > > -- > Andrew Dunstan > EDB: https://www.enterprisedb.com > > -- Jeevan Chalke *Principal, ManagerProduct Development* edbpostgres.com

Re: More new SQL/JSON item methods

2024-01-17 Thread Jeevan Chalke
in sql_features.txt. However, for documentation, it makes more sense to keep them in logical order than the alphabetical one. What are your views on this? Thanks -- Jeevan Chalke *Principal, ManagerProduct Development* edbpostgres.com

Re: More new SQL/JSON item methods

2024-01-07 Thread Jeevan Chalke
On Thu, Jan 4, 2024 at 2:34 AM Peter Eisentraut wrote: > On 03.01.24 13:01, Peter Eisentraut wrote: > > On 07.12.23 14:24, Jeevan Chalke wrote: > >> We have the same issue with integer conversion and need a fix. > >> > >> Unfortunately, I was using in

Re: More new SQL/JSON item methods

2023-11-01 Thread Jeevan Chalke
Hello, On Tue, Oct 24, 2023 at 6:41 PM Andrew Dunstan wrote: > > On 2023-10-19 Th 02:06, Jeevan Chalke wrote: > > Thanks, Peter for the comments. > > On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut > wrote: > >> On 29.08.23 09:05, Jeevan Chalke wrote: >>

Re: More new SQL/JSON item methods

2023-10-18 Thread Jeevan Chalke
On Wed, Oct 18, 2023 at 4:50 PM jian he wrote: > On Fri, Oct 6, 2023 at 7:47 PM Peter Eisentraut > wrote: > > > > On 29.08.23 09:05, Jeevan Chalke wrote: > > > v1-0001-Implement-jsonpath-.bigint-.integer-and-.number-m.patch > > > > > > This commit i

Re: More new SQL/JSON item methods

2023-10-18 Thread Jeevan Chalke
Thanks, Peter for the comments. On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut wrote: > On 29.08.23 09:05, Jeevan Chalke wrote: > > v1-0001-Implement-jsonpath-.bigint-.integer-and-.number-m.patch > > > > This commit implements jsonpath .bigint(), .integer(), and .numbe

Re: More new SQL/JSON item methods

2023-09-04 Thread Jeevan Chalke
make boolean from numeric > > than to serialize the numeric and parse an int? > Yeah, we can directly check the value = 0 for false, true otherwise. But looking at the PostgreSQL conversion to bool, it doesn't allow floating point values to be converted to boolean and only accepts int4. That's why I did the int4 conversion. Thanks -- Jeevan Chalke *Senior Staff SDE, Database Architect, and ManagerProduct Development* edbpostgres.com

Re: unrecognized node type while displaying a Path due to dangling pointer

2023-07-11 Thread Jeevan Chalke
Hi Tom, On Tue, Jul 11, 2023 at 4:30 PM Tom Lane wrote: > Jeevan Chalke writes: > > Attached patch. > > I would be astonished if this fixes anything. The code still doesn't > know which paths are referenced by which other ones, and so the place > where we free a p

Re: unrecognized node type while displaying a Path due to dangling pointer

2023-07-11 Thread Jeevan Chalke
On Tue, Jul 11, 2023 at 2:58 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Tue, Jul 11, 2023 at 1:19 PM Alvaro Herrera > wrote: > >> On 2023-Jul-11, Jeevan Chalke wrote: >> >> > 4. However, 2nd path was already sorted and passed as

Re: unrecognized node type while displaying a Path due to dangling pointer

2023-07-11 Thread Jeevan Chalke
On Tue, Jul 11, 2023 at 1:19 PM Alvaro Herrera wrote: > On 2023-Jul-11, Jeevan Chalke wrote: > > > 4. However, 2nd path was already sorted and passed as is to the > add_path(). > > 5. add_path() decides to reject this new path on some metrics. However, > in > > the

unrecognized node type while displaying a Path due to dangling pointer

2023-07-10 Thread Jeevan Chalke
be the correct fix. Suggestions? Thanks -- Jeevan Chalke *Senior Staff SDE, Database Architect, and ManagerProduct Development* edbpostgres.com

Re: WIP/PoC for parallel backup

2020-04-07 Thread Jeevan Chalke
test master. The > backup manifest is enabled > by default, so I have disabled it for parallel backup mode and have > generated a warning so that > user is aware of it and not expect it in the backup. > So, are you working on to make it work? I don't think a parallel backup feature

Re: WIP/PoC for parallel backup

2020-04-06 Thread Jeevan Chalke
Asif, After recent backup manifest addition, patches needed to rebase and reconsideration of a few things like making sure that parallel backup creates a manifest file correctly or not etc. -- Jeevan Chalke Associate Database Architect & Team Lead, Product Development EnterpriseDB Corpora

Re: WIP/PoC for parallel backup

2020-03-16 Thread Jeevan Chalke
server */ +if (backupinfo->activeworkers == 0) +{ +backupinfo->backupstate = PB_BACKUP_COMPLETE; +} +break; Why free_filelist() is not called in PB_FETCH_WAL_FILES case? Thanks -- Jeevan Chalke Associate Data

Re: WIP/PoC for parallel backup

2020-02-10 Thread Jeevan Chalke
bandwidth consumption data so that rate may be adjusted > according to data received by threads. > > [1] > https://www.postgresql.org/message-id/flat/521B4B29.20009%402ndquadrant.com#189bf840c87de5908c0b4467d31b50af > > -- > Asif Rehman > Highgo Software (Canada/China/Pakistan) > URL : www.

Re: backup manifests

2019-12-10 Thread Jeevan Chalke
On Tue, Dec 10, 2019 at 3:29 PM Rushabh Lathia wrote: > > Attaching another version of 0002 patch, as my collogue Jeevan Chalke > pointed > few indentation problem in 0002 patch which I sent earlier. Fixed the > same in > the latest patch. > I had a look over the new pa

Re: backup manifests

2019-12-08 Thread Jeevan Chalke
ature of various functions. Currently, we pass "StringInfo manifest" to all the required function, will it better to pass the struct variable instead? A struct may have members like, "StringInfo manifest" in it, checksum type (manifest_checksums), checksum label, etc. Thanks -- Jeevan Chalke Associate Database Architect & Team Lead, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: WIP/PoC for parallel backup

2019-11-27 Thread Jeevan Chalke
s in use, will there be a backup_manifest file created too? I am just visualizing what will be the scenario when both these features are checked-in. [1] https://www.postgresql.org/message-id/CA+TgmoZV8dw1H2bzZ9xkKwdrk8+XYa+DC9H=f7heo2zna5t...@mail.gmail.com > -- > Asif Rehman > Highgo Softw

Re: backup manifests

2019-11-21 Thread Jeevan Chalke
y and its entry in the manifest as manifest entry gives mtime from server file whereas the same file in the backup will have different mtime. But adding a few comments there will be good. 8. +charmdate[24]; should be mtime instead? Thanks -- Jeevan Chalke Associate Database Architect & Team Lead, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: backup manifests

2019-11-21 Thread Jeevan Chalke
provide manifest-with-checksums option then too I see that checksum is calculated for backup_manifest file itself. Is that intentional or missed? I think we should omit that too if this option is not provided. 6. Is it possible to get only a backup manifest from the server? A client like pg_baseba

Re: WIP/PoC for parallel backup

2019-10-18 Thread Jeevan Chalke
hat seems odd. How about adding a new option for that? 6. It will be good if we have some comments explaining what the function is actually doing in its prologue. For functions like: GetBackupFilesList() ReceiveFiles() create_workers_and_fetch() Thanks > > Thanks, > > -- > Asif Rehman &

Re: WIP/PoC for parallel backup

2019-10-03 Thread Jeevan Chalke
probably also a possibility that approach (2) would thrash the >> disk head back and forth between multiple files that are all being >> written at the same time, and approach (3) will therefore win by not >> thrashing the disk head. But, since spinning media are becoming less &

Re: backup manifests

2019-09-30 Thread Jeevan Chalke
t;if (PQExpBufferBroken(&buf)) > > Yes I too obeserved this warning. > pg_gmtime can fail in case of malloc failure: > + /* > + * Convert time to a string. Since it's not clear what time zone to use > + * and since time zone definitions can change, possibly causin

Re: block-level incremental backup

2019-09-12 Thread Jeevan Chalke
thing. I tried looking for any other DDL doing similar stuff like creating a new page with existing LSN. But I could not find any other commands than CREATE DATABASE and ALTER DATABASE .. SET TABLESPACE. Suggestions/thoughts? -- Jeevan Chalke Technical Architect, Product Development Enterpr

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
r documentation. I think we > should clarify it at both the places. > Added in doc. > > I think scan_directory() should be rather renamed as do_combinebackup(). > I am not sure about this renaming. scan_directory() is called recursively to scan each sub-directories too. I

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
On Tue, Sep 3, 2019 at 12:11 PM Dilip Kumar wrote: > On Fri, Aug 16, 2019 at 3:54 PM Jeevan Chalke > wrote: > > > 0003: > +/* > + * When to send the whole file, % blocks modified (90%) > + */ > +#define WHOLE_FILE_THRESHOLD 0.9 > > How this threshold

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
er but changed this per your suggestion. > > -- > Regards, > Dilip Kumar > EnterpriseDB: http://www.enterprisedb.com > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
On Tue, Aug 27, 2019 at 11:59 PM Robert Haas wrote: > On Fri, Aug 16, 2019 at 6:23 AM Jeevan Chalke > wrote: > > [ patches ] > > Reviewing 0002 and 0003: > > - Commit message for 0003 claims magic number and checksum are 0, but > that (fortunately) doesn't seem

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
nality is completed. > Yes. > Comment: > We can add a readme file with all the details regarding incremental > backup and combine backup. > Will have a look. > > Regards, > Vignesh > EnterpriseDB: http://www.enterprisedb.com > Thanks -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: block-level incremental backup

2019-09-09 Thread Jeevan Chalke
Hi, Attached new set of patches adding support for the tablespace handling. This patchset also fixes the issues reported by Vignesh, Robert, Jeevan Ladhe, and Dilip Kumar. Please have a look and let me know if I missed any comments to account. Thanks -- Jeevan Chalke Technical Architect

Re: basebackup.c's sendFile() ignores read errors

2019-09-05 Thread Jeevan Chalke
rt Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > Thanks -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company diff --git a/src/backend/replication/basebackup.c b/src/backend/replicati

Re: basebackup.c's sendFile() ignores read errors

2019-08-30 Thread Jeevan Chalke
th > + * zeros. > + */ > + if (feof(fp)) > > The if block does not do the truncation right away, so I think the comment > above can be reworded to explain why we reset cnt? > Fixed both comments in the attached patch. -- Jeevan Chalke Technical Architect, Product Development

Re: basebackup.c's sendFile() ignores read errors

2019-08-28 Thread Jeevan Chalke
ssue. Please have a look over the patch and let me know your views. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise

Re: block-level incremental backup

2019-08-16 Thread Jeevan Chalke
a number of > blocks, > rather than calculating this say RELSEG_SIZE(i.e. 131072) times in the > worst > case. > OK. Done. > Sorry if I am missing something, but, should not it be just: > > len = cnt; > Yeah. Done. > As I said earlier in my previous email, we now do

Re: block-level incremental backup

2019-08-16 Thread Jeevan Chalke
opinion too. > Regards, > Vignesh > EnterpriseDB: http://www.enterprisedb.com > Attached new sets of patches with refactoring done separately. Incremental backup patch became small now and hopefully more readable than the first version. -- Jeevan Chalke Technical Architect, Prod

Re: block-level incremental backup

2019-08-12 Thread Jeevan Chalke
On Mon, Aug 12, 2019 at 5:29 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Fri, Aug 9, 2019 at 11:56 PM Jeevan Ladhe < > jeevan.la...@enterprisedb.com> wrote: > >> Hi Robert, >> >> On Fri, Aug 9, 2019 at 6:40 PM Robert Haas wrote:

Re: block-level incremental backup

2019-08-12 Thread Jeevan Chalke
hey're not. Perhaps >> something like REFERENCE WAL LOCATION or REFERENCE WAL LOCATION FOR >> INCREMENTAL BACKUP would be clearer. >> > > Agree, how about INCREMENTAL BACKUP REFERENCE WAL LOCATION ? > +1 for INCREMENTAL BACKUP REFERENCE WA. > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: block-level incremental backup

2019-08-12 Thread Jeevan Chalke
On Fri, Aug 9, 2019 at 6:36 PM Robert Haas wrote: > On Wed, Aug 7, 2019 at 5:46 AM Jeevan Chalke > wrote: > > So, do you mean we should just do fread() and fwrite() for the whole > file? > > > > I thought it is better if it was done by the OS itself instead of > r

Re: block-level incremental backup

2019-08-07 Thread Jeevan Chalke
ole file? I thought it is better if it was done by the OS itself instead of reading 1GB into the memory and writing the same to the file. > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Jeevan Chalke Technical Archi

Re: block-level incremental backup

2019-08-01 Thread Jeevan Chalke
On Tue, Jul 30, 2019 at 9:39 AM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > > I am almost done writing the patch for pg_combinebackup and will post soon. > Attached patch which implements the pg_combinebackup utility used to combine full basebackup with on

Re: block-level incremental backup

2019-07-29 Thread Jeevan Chalke
ng another way round to avoid over-writing and other issues as I explained earlier. I am almost done writing the patch for pg_combinebackup and will post soon. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > Thanks

Re: block-level incremental backup

2019-07-17 Thread Jeevan Chalke
On Wed, Jul 17, 2019 at 7:38 PM Ibrar Ahmed wrote: > > > On Wed, Jul 17, 2019 at 6:43 PM Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote: > >> On Wed, Jul 17, 2019 at 2:15 PM Ibrar Ahmed >> wrote: >> >>> >>> At what stage y

Re: block-level incremental backup

2019-07-17 Thread Jeevan Chalke
us, the last incremental backup will have the final WAL files which will be copied as-is in the combined full-backup and they will get apply automatically if that the data directory is used to start the server. > -- > Ibrar Ahmed > -- Jeevan Chalke Technical Architect, Product Dev

Re: block-level incremental backup

2019-07-16 Thread Jeevan Chalke
On Thu, Jul 11, 2019 at 5:00 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > Hi Anastasia, > > On Wed, Jul 10, 2019 at 11:47 PM Anastasia Lubennikova < > a.lubennik...@postgrespro.ru> wrote: > >> 23.04.2019 14:08, Anastasia Lubennikova wrote: >&

Re: block-level incremental backup

2019-07-11 Thread Jeevan Chalke
- then the data blocks We are also working on combining these incremental back-ups with the full backup and for that, we are planning to add a new utility called pg_combinebackup. Will post the details on that later once we have on the same page for taking backup. Thanks -- Jeevan Chalke Tech

Re: Statistical aggregate functions are not working with partitionwise aggregate

2019-05-03 Thread Jeevan Chalke
; > 0 > (1 row) > postgres=# SELECT regr_avgx(b, a), regr_avgy(b, a) FROM tbl; > regr_avgx | regr_avgy > ---+--- >| > (1 row) > postgres=# SELECT corr(b, a) FROM tbl; > corr > -- > > (1 row) > > Thanks & Regar

Re: cache lookup failed for collation 0

2019-04-14 Thread Jeevan Chalke
On Fri, Apr 12, 2019 at 1:26 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2019-04-11 17:04, Jeevan Chalke wrote: > > The error is coming from get_collation_isdeterministic() when colloid > > passed is 0. I think like we do in get_collation_name(), we sh

Re: cache lookup failed for collation 0

2019-04-11 Thread Jeevan Chalke
On Thu, Apr 11, 2019 at 10:50 PM Tom Lane wrote: > Jeevan Chalke writes: > > Do you mean, the code in get_collation_isdeterministic() should look like > > something like below? > > > If colloid = InvalidOid then > > return TRUE > > ELSE IF tuple is valid t

Re: cache lookup failed for collation 0

2019-04-11 Thread Jeevan Chalke
On Thu, Apr 11, 2019 at 9:07 PM Tom Lane wrote: > Jeevan Chalke writes: > > Following test-sequence causing an error "cache lookup failed for > collation 0"; > > postgres:5432 [42106]=# create table foobar(a bytea primary key, b int); > > CREATE TABLE >

cache lookup failed for collation 0

2019-04-11 Thread Jeevan Chalke
fully understood the code changes done by the said commit and thus the current behavior i.e. cache lookup error, might be the expected one. But if that's the case, I kindly request to please explain why that is expected. Thanks -- Jeevan Chalke Technical Architect, Product Development Ent

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-26 Thread Jeevan Chalke
needs a better > comment explaining why it's correct, because there isn't anything > obvious in set_append_rel_pathlist that keeps IS_DUMMY_REL() from > being true for every child. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-21 Thread Jeevan Chalke
Hi, Off-list Ashutosh Bapat has suggested using a flag instead of counting number of dummy rels and then manipulating on it. That will be simple and smoother. I agree with his suggestion and updated my patch accordingly. Thanks -- Jeevan Chalke Technical Architect, Product Development

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-21 Thread Jeevan Chalke
On Wed, Jun 20, 2018 at 7:11 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Tue, Jun 19, 2018 at 2:13 PM, Jeevan Chalke > wrote: > > > > > > In the reported testcase, parallel_workers is set to 0 for all partition > > (child) relations. Wh

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-20 Thread Jeevan Chalke
On Tue, Jun 19, 2018 at 7:14 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > In the reported testcase, parallel_workers is set to 0 for all partition >> (child) relations. Which means partial parallel paths are not possible for >> child rels. However, the

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-19 Thread Jeevan Chalke
On Tue, Jun 19, 2018 at 2:13 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Mon, Jun 18, 2018 at 9:27 PM, Andres Freund wrote: > >> On 2018-06-18 17:10:12 +0530, Jeevan Chalke wrote: >> > On Mon, Jun 18, 2018 at 5:02 PM, Rajkumar Rag

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-19 Thread Jeevan Chalke
On Mon, Jun 18, 2018 at 9:27 PM, Andres Freund wrote: > On 2018-06-18 17:10:12 +0530, Jeevan Chalke wrote: > > On Mon, Jun 18, 2018 at 5:02 PM, Rajkumar Raghuwanshi < > > rajkumar.raghuwan...@enterprisedb.com> wrote: > > > > > Hi, > >

Re: Server crashed with TRAP: FailedAssertion("!(parallel_workers > 0)" when partitionwise_aggregate true.

2018-06-18 Thread Jeevan Chalke
68798 "EXPLAIN (COSTS OFF)\nSELECT > AVG(t2.c1),SUM(t1.c1) FROM part t1 INNER JOIN part t2 ON (t1.c1 = t2.c1) > GROUP BY t1.c1, t2.c1 HAVING SUM(t1.c1) % 125 = 0 ORDER BY 1,2;") at > postgres.c:1122 > #20 0x008c8dbf in PostgresMain (argc=1, argv=0x1c922a0, > dbname=0x1c92100 "postgres", username=0x1c65298 "edb") at postgres.c:4153 > #21 0x00826703 in BackendRun (port=0x1c8a060) at postmaster.c:4361 > #22 0x00825e71 in BackendStartup (port=0x1c8a060) at > postmaster.c:4033 > #23 0x00822253 in ServerLoop () at postmaster.c:1706 > #24 0x00821b85 in PostmasterMain (argc=3, argv=0x1c631f0) at > postmaster.c:1379 > #25 0x00748d64 in main (argc=3, argv=0x1c631f0) at main.c:228 > > Thanks & Regards, > Rajkumar Raghuwanshi > QMG, EnterpriseDB Corporation > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [sqlsmith] Failed assertion in create_gather_path

2018-04-11 Thread Jeevan Chalke
On Tue, Apr 10, 2018 at 11:14 PM, Robert Haas wrote: > On Tue, Apr 10, 2018 at 2:59 AM, Jeevan Chalke > wrote: > > I actually wanted to have rel->consider_parallel in the condition (yes, > for > > additional safety) as we are adding a partial path into rel. But then >

Re: [HACKERS] Partition-wise aggregation/grouping

2018-04-10 Thread Jeevan Chalke
On Tue, Apr 10, 2018 at 7:30 PM, David Steele wrote: > Hi Jeevan, > > On 4/2/18 10:57 AM, Robert Haas wrote: > > On Thu, Mar 29, 2018 at 9:02 AM, Jeevan Chalke > > wrote: > >> Yep, I see the risk. > > > > Committed 0001 last week and 0002 just now. I d

Re: [sqlsmith] Failed assertion in create_gather_path

2018-04-10 Thread Jeevan Chalke
On Mon, Apr 9, 2018 at 5:52 PM, Amit Kapila wrote: > On Sun, Apr 8, 2018 at 1:04 PM, Jeevan Chalke > wrote: > > Hi, > > > > At some places, I have observed that we are adding a partial path even > when > > rel's consider_parallel is false. D

Re: [sqlsmith] Failed assertion in create_gather_path

2018-04-08 Thread Jeevan Chalke
27;s the version he happened to be testing. > > Right. I'm not testing often enough yet to be able to report on commit > granularity :-). I'll try for a less ambiguos wording in future > reports. > > -- Jeevan Chalke Technical Architect, Product Development EnterpriseD

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-29 Thread Jeevan Chalke
of remote_conds/local_conds just because its available and then there > is risk of these three lists going out of sync. > Yep, I see the risk. > > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-29 Thread Jeevan Chalke
On Wed, Mar 28, 2018 at 7:21 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Tue, Mar 27, 2018 at 2:43 PM, Jeevan Chalke > wrote: > > > I am not sure on what we should Assetrt here. Note that we end-up here > only > > when doing grouping, and

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-27 Thread Jeevan Chalke
On Mon, Mar 26, 2018 at 5:24 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Fri, Mar 23, 2018 at 4:35 PM, Jeevan Chalke > wrote: > > > > Changes related to postgres_fdw which allows pushing aggregate on the > > foreign server is not yet committe

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-26 Thread Jeevan Chalke
On Tue, Mar 27, 2018 at 3:33 AM, Andres Freund wrote: > Hi, > > On 2018-03-23 17:01:54 +0530, Jeevan Chalke wrote: > > Attached patch which fixes that. > > Thanks, will push. For the future, I'd be more likely to notice if you > CC me ;) > Sure. Thanks. > &

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-23 Thread Jeevan Chalke
stable regression run with installcheck having local settings. For example, If I have enabale_hashagg = false locally; I will definitely see failures. ISTM, that I am missing Andres point here. Thanks -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-23 Thread Jeevan Chalke
On Thu, Mar 22, 2018 at 10:28 PM, Robert Haas wrote: > On Thu, Mar 22, 2018 at 6:15 AM, Jeevan Chalke > wrote: > > Leeks cleaner now. Thanks for refactoring it. > > > > I have merged these changes and flatten all previuos changes into the > main > > patch.

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-22 Thread Jeevan Chalke
we need this while working on Aggregate PushDown, and in [1] Tom Lane opposed the idea of setting the relids in grouped_rel. If we want to go with this, then I think it should be done as a separate stand-alone patch. [1] https://www.postgresql.org/message-id/CAFjFpRdUz6h6cmFZFYAngmQAX8Zvo+MZsPXidZ0

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-22 Thread Jeevan Chalke
On Thu, Mar 22, 2018 at 3:26 AM, Robert Haas wrote: > On Wed, Mar 21, 2018 at 11:33 AM, Jeevan Chalke > wrote: > > Let me try to explain this: > > 1. GROUPING_CAN_PARTITIONWISE_AGG > > 2. extra->is_partial_aggregation > > 3. extra->perform_partial_parti

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-21 Thread Jeevan Chalke
On Wed, Mar 21, 2018 at 7:46 PM, Robert Haas wrote: > On Wed, Mar 21, 2018 at 8:01 AM, Jeevan Chalke > wrote: > >> In the patch as proposed, create_partial_grouping_paths() can get > >> called even if GROUPING_CAN_PARTIAL_AGG is not set. I think that's > >>

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-21 Thread Jeevan Chalke
On Wed, Mar 21, 2018 at 2:04 AM, Robert Haas wrote: > On Tue, Mar 20, 2018 at 10:46 AM, Jeevan Chalke > wrote: > > I have added all these three patches in the attached patch-set and > rebased > > my changes over it. > > > > However, I have not yet

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-20 Thread Jeevan Chalke
ctoring patches. 0006 adds a GroupPathExtraData which stores mostly child variant data and costs. 0007 is main partitionwise aggregation patch which is then rebased accordingly. 0008 contains testcase and 0009 contains FDW changes. Let me know if I missed any point to consider while rebasing. -- J

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-15 Thread Jeevan Chalke
r refactoring, we no more try to create partitionwise paths, rather if possible we do create them. So inlined with create_grouping_paths() I have renamed it to create_partitionwise_grouping_paths() in attached patch-set. Thanks > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company partition-wise-agg-v20.tar.gz Description: application/gzip

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-14 Thread Jeevan Chalke
On Tue, Mar 13, 2018 at 7:43 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > Hi, > > The patch-set is complete now. But still, there is a scope of some comment > improvements due to all these refactorings. I will work on it. Also, need > to update few documentat

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-13 Thread Jeevan Chalke
< ashutosh.ba...@enterprisedb.com> wrote: > On Mon, Mar 12, 2018 at 7:49 PM, Jeevan Chalke > wrote: > > > > > > On Mon, Mar 12, 2018 at 6:07 PM, Ashutosh Bapat > > wrote: > >> > >> On Fri, Mar 9, 2018 at 4:21 PM, Ashutosh Bapat > >> > We d

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Jeevan Chalke
;t investigate it further. > I fixed it. We need to pass is_partial_agg instead of extra->partial_partitionwise_grouping while calling add_paths_to_partial_grouping_rel() in case of parallelism. > With those two things remaining I am posting this patch, so that > Jeevan Chalke can m

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Jeevan Chalke
I > haven't tried it in this patch. > > With this patch there's a failure in partition_aggregation where the > patch is creating paths with MergeAppend with GatherMerge underneath. > I think this is related to the call > add_paths_to_partial_grouping_rel() when try_paralle

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-08 Thread Jeevan Chalke
On Thu, Mar 8, 2018 at 7:49 PM, Robert Haas wrote: > On Thu, Mar 8, 2018 at 9:15 AM, Jeevan Chalke > wrote: > > I am not sure why we don't set reltarget into the grouped_rel too. > > > > But if we do so like we did in partially_grouped_rel, then it will be lot

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-08 Thread Jeevan Chalke
On Thu, Mar 8, 2018 at 1:15 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Wed, Mar 7, 2018 at 8:07 PM, Jeevan Chalke > wrote: > Here are some more review comments esp. on > try_partitionwise_grouping() function. BTW name of that function > do

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Jeevan Chalke
On Wed, Mar 7, 2018 at 1:45 AM, Robert Haas wrote: > On Tue, Mar 6, 2018 at 5:31 AM, Jeevan Chalke > wrote: > > This is in-lined with enable_hashagg GUC. Do you think > > enable_partitionwise_aggregate seems better? But it will be not > consistent > > with other GU

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Jeevan Chalke
refactoring patch and rebased my changes over it. Yes, it removed this block and other few conditions too. > > static PathTarget * > -make_partial_grouping_target(PlannerInfo *root, PathTarget > *grouping_target) > +make_partial_grouping_target(PlannerInfo *root, > + PathTarget *grouping_target, > + Node *havingQual) > This looks like a refactoring change. Should go to one of the refactoring > patches or in a patch of its own. > OK. Refactored into separate patch. Will post a new patchset with these changes included. > > This isn't full review. I will continue reviewing this further. > Sure. > > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Jeevan Chalke
sts; > +} > > I think, with the refactoring, we can get rid of the last two lines here. I > think we can get rid of this block entirely, but I have not reviewed the > entire > code to confirm that. > > static PathTarget * > -make_partial_grouping_target(PlannerInfo *root, PathTarget > *grouping_target) > +make_partial_grouping_target(PlannerInfo *root, > + PathTarget *grouping_target, > + Node *havingQual) > This looks like a refactoring change. Should go to one of the refactoring > patches or in a patch of its own. > > This isn't full review. I will continue reviewing this further. > > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Jeevan Chalke
On Tue, Mar 6, 2018 at 2:29 AM, Robert Haas wrote: > On Mon, Mar 5, 2018 at 3:56 AM, Jeevan Chalke > wrote: > > However, to perform Gather or Gather Merge once we have all partial paths > > ready, and to avoid too many existing code rearrangement, I am calling > > tr

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-05 Thread Jeevan Chalke
d then existing code will do required finalization along with any Gather or Gather Merge, if required. Please have a look over attached patch-set and let me know if it needs further changes. Thanks > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise Po

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-05 Thread Jeevan Chalke
On Fri, Mar 2, 2018 at 3:22 AM, Robert Haas wrote: > On Thu, Mar 1, 2018 at 5:34 AM, Jeevan Chalke > wrote: > > Attached new patchset after rebasing my changes over these changes and on > > latest HEAD. > > +* We have already created a Gather or Gather Me

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-01 Thread Jeevan Chalke
p://www.enterprisedb.com > The Enterprise PostgreSQL Company > Thanks -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company partition-wise-agg-v14.tar.gz Description: GNU Zip compressed data

Re: Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Jeevan Chalke
On Tue, Feb 27, 2018 at 4:55 PM, Andreas Joseph Krogh wrote: > På tirsdag 27. februar 2018 kl. 12:16:42, skrev Jeevan Chalke < > jeevan.cha...@enterprisedb.com>: > > Hi, > > On Tue, Feb 27, 2018 at 3:46 PM, Andreas Joseph Krogh > wrote: >> >> $subject >

Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Jeevan Chalke
stgresql.org/message-id/CAM2+6=x9kxqol2zqz00e6asbt9z+rfywbomhxj0+8fpaymz...@mail.gmail.com ) Can you please check if that fixes your test-case or not? Thanks > > -- > Andreas Joseph Krogh > ​ > > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-27 Thread Jeevan Chalke
ix. Thanks > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company diff --git a/src/backend/optimizer/plan/planner.c b/src

  1   2   >