Re: pgsql: Allow UPDATE to move rows between partitions.

2018-01-23 Thread Amit Kapila
erform Delete operation which is not aware of this special behavior (execute before update trigger for this case). -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com

pgsql: Don't consider parallel append for parallel unsafe paths.

2018-06-19 Thread Amit Kapila
Don't consider parallel append for parallel unsafe paths. Commit ab72716778 allowed Parallel Append paths to be generated for a relation that is not parallel safe. Prevent that from happening. Initial analysis by Tom Lane. Reported-by: Rajkumar Raghuwanshi Author: Amit Kapila and Raj

pgsql: Improve coding pattern in Parallel Append code.

2018-06-21 Thread Amit Kapila
the code behave consistently. Reported-by: Tom Lane Author: Tom Lane Reviewed-by: Amit Khandekar and Amit Kapila Discussion: https://postgr.es/m/32365.1528994...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/98d476a965eefb52af53f4fb55dbfead0ede9282

pgsql: Cosmetic improvements for faster column addition.

2018-06-26 Thread Amit Kapila
Cosmetic improvements for faster column addition. Changed the name of few structure members for the sake of clarity and removed spurious whitespace. Reported-by: Amit Kapila Author: Amit Kapila, based on suggestion by Andrew Dunstan Reviewed-by: Alvaro Herrera Discussion: https://postgr.es/m

pgsql: Fix thinko in comments.

2018-06-27 Thread Amit Kapila
Fix thinko in comments. A slot can not be stored in a tuple but it's vice versa. Reported-by: Ashutosh Bapat Author: Ashutosh Bapat Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/cafjfprchhnhxdegyjv3kkdwrwo1_nb_kyzm_zsdemozal1a...@mail.gmail.com Branch -- master De

pgsql: Fix thinko in comments.

2018-06-27 Thread Amit Kapila
Fix thinko in comments. A slot can not be stored in a tuple but it's vice versa. Reported-by: Ashutosh Bapat Author: Ashutosh Bapat Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/cafjfprchhnhxdegyjv3kkdwrwo1_nb_kyzm_zsdemozal1a...@mail.gmail.com Branch -- REL_10_STABLE De

pgsql: Allow using the updated tuple while moving it to a different par

2018-07-12 Thread Amit Kapila
see Author: Amit Khandekar, with minor changes by me Reviewed-by: Dilip Kumar, Amit Kapila and Alvaro Herrera Backpatch-through: 11 Discussion: https://postgr.es/m/CAJ3gD9fRbEzDqdeDq1jxqZUb47kJn+tQ7=bcgjc8quqksdv...@mail.gmail.com Branch -- REL_11_STABLE Details --- https://git.postgre

pgsql: Allow using the updated tuple while moving it to a different par

2018-07-12 Thread Amit Kapila
see Author: Amit Khandekar, with minor changes by me Reviewed-by: Dilip Kumar, Amit Kapila and Alvaro Herrera Backpatch-through: 11 Discussion: https://postgr.es/m/CAJ3gD9fRbEzDqdeDq1jxqZUb47kJn+tQ7=bcgjc8quqksdv...@mail.gmail.com Branch -- master Details --- https://git.postgre

Re: pgsql: Allow using the updated tuple while moving it to a different par

2018-07-12 Thread Amit Kapila
On Thu, Jul 12, 2018 at 1:29 PM, Michael Paquier wrote: > On Thu, Jul 12, 2018 at 07:33:54AM +0000, Amit Kapila wrote: >> Allow using the updated tuple while moving it to a different partition. >> >> An update that causes the tuple to be moved to a different partition was

pgsql: Fix the buffer release order for parallel index scans.

2018-07-26 Thread Amit Kapila
-by: Thomas Munro and Amit Kapila Author: Amit Kapila Reviewed-by: Thomas Munro Tested-By: Thomas Munro and Victor Yegorov Backpatch-through: 10 where parallel index scans were introduced Discussion: https://postgr.es/m/153228422922.1395.1746424054206154...@wrigleys.postgresql.org Branch

pgsql: Fix the buffer release order for parallel index scans.

2018-07-26 Thread Amit Kapila
-by: Thomas Munro and Amit Kapila Author: Amit Kapila Reviewed-by: Thomas Munro Tested-By: Thomas Munro and Victor Yegorov Backpatch-through: 10 where parallel index scans were introduced Discussion: https://postgr.es/m/153228422922.1395.1746424054206154...@wrigleys.postgresql.org Branch

pgsql: Fix the buffer release order for parallel index scans.

2018-07-26 Thread Amit Kapila
-by: Thomas Munro and Amit Kapila Author: Amit Kapila Reviewed-by: Thomas Munro Tested-By: Thomas Munro and Victor Yegorov Backpatch-through: 10 where parallel index scans were introduced Discussion:https://postgr.es/m/153228422922.1395.1746424054206154...@wrigleys.postgresql.org Branch

pgsql: Match the buffer usage tracking for leader and worker backends.

2018-08-02 Thread Amit Kapila
d non-parallel query. Change the code so that worker backend also starts tracking buffer usage after ExecutorStart. Author: Amit Kapila and Robert Haas Reviewed-by: Robert Haas and Andres Freund Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9

pgsql: Match the buffer usage tracking for leader and worker backends.

2018-08-02 Thread Amit Kapila
d non-parallel query. Change the code so that worker backend also starts tracking buffer usage after ExecutorStart. Author: Amit Kapila and Robert Haas Reviewed-by: Robert Haas and Andres Freund Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9

pgsql: Match the buffer usage tracking for leader and worker backends.

2018-08-02 Thread Amit Kapila
d non-parallel query. Change the code so that worker backend also starts tracking buffer usage after ExecutorStart. Author: Amit Kapila and Robert Haas Reviewed-by: Robert Haas and Andres Freund Backpatch-through: 9.6 where this code was introduced Discussion:https://postgr.es/m/86137f17-1dfb-42f9

pgsql: Match the buffer usage tracking for leader and worker backends.

2018-08-02 Thread Amit Kapila
d non-parallel query. Change the code so that worker backend also starts tracking buffer usage after ExecutorStart. Author: Amit Kapila and Robert Haas Reviewed-by: Robert Haas and Andres Freund Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9

pgsql: Fix buffer usage stats for parallel nodes.

2018-08-02 Thread Amit Kapila
completes the execution. In the passing fix the gather node code to allow workers to shut down as soon as we find that all the tuples from the workers have been retrieved. The original code use to do that, but is accidently removed by commit 01edb5c7fc. Reported-by: Adrien Nayrat Author: Amit Kapila

pgsql: Fix buffer usage stats for parallel nodes.

2018-08-02 Thread Amit Kapila
completes the execution. In the passing fix the gather node code to allow workers to shut down as soon as we find that all the tuples from the workers have been retrieved. The original code use to do that, but is accidently removed by commit 01edb5c7fc. Reported-by: Adrien Nayrat Author: Amit Kapila

pgsql: Fix buffer usage stats for parallel nodes.

2018-08-02 Thread Amit Kapila
completes the execution. In the passing fix the gather node code to allow workers to shut down as soon as we find that all the tuples from the workers have been retrieved. The original code use to do that, but is accidently removed by commit 01edb5c7fc. Reported-by: Adrien Nayrat Author: Amit Kapila

pgsql: Fix buffer usage stats for parallel nodes.

2018-08-02 Thread Amit Kapila
completes the execution. In the passing fix the gather node code to allow workers to shut down as soon as we find that all the tuples from the workers have been retrieved. The original code use to do that, but is accidently removed by commit 01edb5c7fc. Reported-by: Adrien Nayrat Author: Amit Kapila

pgsql: Prohibit shutting down resources if there is a possibility of ba

2018-08-12 Thread Amit Kapila
backward. Fix that by disallowing the shutting down of resources in such cases. Reported-by: Robert Haas Analysed-by: Robert Haas and Amit Kapila Author: Amit Kapila Reviewed-by: Robert Haas Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Prohibit shutting down resources if there is a possibility of ba

2018-08-12 Thread Amit Kapila
backward. Fix that by disallowing the shutting down of resources in such cases. Reported-by: Robert Haas Analysed-by: Robert Haas and Amit Kapila Author: Amit Kapila Reviewed-by: Robert Haas Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Prohibit shutting down resources if there is a possibility of ba

2018-08-12 Thread Amit Kapila
backward. Fix that by disallowing the shutting down of resources in such cases. Reported-by: Robert Haas Analysed-by: Robert Haas and Amit Kapila Author: Amit Kapila Reviewed-by: Robert Haas Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Prohibit shutting down resources if there is a possibility of ba

2018-08-12 Thread Amit Kapila
backward. Fix that by disallowing the shutting down of resources in such cases. Reported-by: Robert Haas Analysed-by: Robert Haas and Amit Kapila Author: Amit Kapila Reviewed-by: Robert Haas Backpatch-through: 9.6 where this code was introduced Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Adjust comment atop ExecShutdownNode.

2018-08-12 Thread Amit Kapila
Adjust comment atop ExecShutdownNode. After commits a315b967cc and b805b63ac2, part of the comment atop ExecShutdownNode is redundant. Adjust it. Author: Amit Kapila Backpatch-through: 10 where both the mentioned commits are present. Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Adjust comment atop ExecShutdownNode.

2018-08-12 Thread Amit Kapila
Adjust comment atop ExecShutdownNode. After commits a315b967cc and b805b63ac2, part of the comment atop ExecShutdownNode is redundant. Adjust it. Author: Amit Kapila Backpatch-through: 10 where both the mentioned commits are present. Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Adjust comment atop ExecShutdownNode.

2018-08-12 Thread Amit Kapila
Adjust comment atop ExecShutdownNode. After commits a315b967cc and b805b63ac2, part of the comment atop ExecShutdownNode is redundant. Adjust it. Author: Amit Kapila Backpatch-through: 10 where both the mentioned commits are present. Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421

pgsql: Fix pg_verify_checksums on Windows.

2018-08-31 Thread Amit Kapila
the binary mode. Author: Amit Kapila Reviewed-by: Magnus Hagander Backpatch-through: 11 Discussion: https://postgr.es/m/caa4ek1+lonzod+h85fgmyjwzxky-xv1fyweyp-tky2wpd5c...@mail.gmail.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/762a16572bb5d9be6c9c53c9e

pgsql: Fix pg_verify_checksums on Windows.

2018-08-31 Thread Amit Kapila
the binary mode. Author: Amit Kapila Reviewed-by: Magnus Hagander Backpatch-through: 11 Discussion: https://postgr.es/m/caa4ek1+lonzod+h85fgmyjwzxky-xv1fyweyp-tky2wpd5c...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bb60f2cb6ed8361fbf18b92d312776046d9

pgsql: During the split, set checksum on an empty hash index page.

2018-09-03 Thread Amit Kapila
se we don't have an easy way to test it in prior versions. Another reason is that the hash-index code is changed heavily in 10, so it is not advisable to push the fix without testing it in prior versions. Author: Amit Kapila Reviewed-by: Yugo Nagata Backpatch-through: 10 Discussion: https://p

pgsql: During the split, set checksum on an empty hash index page.

2018-09-03 Thread Amit Kapila
se we don't have an easy way to test it in prior versions. Another reason is that the hash-index code is changed heavily in 10, so it is not advisable to push the fix without testing it in prior versions. Author: Amit Kapila Reviewed-by: Yugo Nagata Backpatch-through: 10 Discussion: https://p

pgsql: During the split, set checksum on an empty hash index page.

2018-09-03 Thread Amit Kapila
se we don't have an easy way to test it in prior versions. Another reason is that the hash-index code is changed heavily in 10, so it is not advisable to push the fix without testing it in prior versions. Author: Amit Kapila Reviewed-by: Yugo Nagata Backpatch-through: 10 Discussion: https://p

pgsql: Prohibit pushing subqueries containing window function calculati

2018-09-03 Thread Amit Kapila
them as parallel-restricted. In the passing, improve the coding pattern in max_parallel_hazard_walker so that it has a chain of mutually-exclusive if ... else if ... else if ... else if ... IsA tests. Reported-by: Marko Tiikkaja Bug: 15324 Author: Amit Kapila Reviewed-by: Tom Lane Backpatch

pgsql: Prohibit pushing subqueries containing window function calculati

2018-09-03 Thread Amit Kapila
them as parallel-restricted. In the passing, improve the coding pattern in max_parallel_hazard_walker so that it has a chain of mutually-exclusive if ... else if ... else if ... else if ... IsA tests. Reported-by: Marko Tiikkaja Bug: 15324 Author: Amit Kapila Reviewed-by: Tom Lane Backpatch

pgsql: Prohibit pushing subqueries containing window function calculati

2018-09-03 Thread Amit Kapila
them as parallel-restricted. In the passing, improve the coding pattern in max_parallel_hazard_walker so that it has a chain of mutually-exclusive if ... else if ... else if ... else if ... IsA tests. Reported-by: Marko Tiikkaja Bug: 15324 Author: Amit Kapila Reviewed-by: Tom Lane Backpatch

pgsql: Prohibit pushing subqueries containing window function calculati

2018-09-03 Thread Amit Kapila
them as parallel-restricted. In the passing, improve the coding pattern in max_parallel_hazard_walker so that it has a chain of mutually-exclusive if ... else if ... else if ... else if ... IsA tests. Reported-by: Marko Tiikkaja Bug: 15324 Author: Amit Kapila Reviewed-by: Tom Lane Backpatch

pgsql: Fix the overrun in hash index metapage for smaller block sizes.

2018-09-05 Thread Amit Kapila
allows us not to change the behavior in any case that currently works, so there's really no reason for a HASH_VERSION bump. Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/caa4ek1ltf4vmu4mx_+i72ff1mdnz8xajmgkt2hv8+uswcn8...@mail.gm

pgsql: Fix the overrun in hash index metapage for smaller block sizes.

2018-09-05 Thread Amit Kapila
allows us not to change the behavior in any case that currently works, so there's really no reason for a HASH_VERSION bump. Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/caa4ek1ltf4vmu4mx_+i72ff1mdnz8xajmgkt2hv8+uswcn8...@mail.gm

pgsql: Fix the overrun in hash index metapage for smaller block sizes.

2018-09-05 Thread Amit Kapila
allows us not to change the behavior in any case that currently works, so there's really no reason for a HASH_VERSION bump. Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/caa4ek1ltf4vmu4mx_+i72ff1mdnz8xajmgkt2hv8+uswcn8...@mail.gm

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
ensuring that XLogInsertRecord performs a recomputation when the given record is generated with FPW as off but found that the flag has been turned on while actually inserting the record. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila Backpatch-through: 9.5 where

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
ensuring that XLogInsertRecord performs a recomputation when the given record is generated with FPW as off but found that the flag has been turned on while actually inserting the record. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila Backpatch-through: 9.5 where

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
ensuring that XLogInsertRecord performs a recomputation when the given record is generated with FPW as off but found that the flag has been turned on while actually inserting the record. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila Backpatch-through: 9.5 where

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
ensuring that XLogInsertRecord performs a recomputation when the given record is generated with FPW as off but found that the flag has been turned on while actually inserting the record. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila Backpatch-through: 9.5 where

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
ensuring that XLogInsertRecord performs a recomputation when the given record is generated with FPW as off but found that the flag has been turned on while actually inserting the record. Reported-by: Kyotaro Horiguchi Author: Kyotaro Horiguchi Reviewed-by: Amit Kapila Backpatch-through: 9.5 where

pgsql: Back-patch "Fix parallel hash join path search."

2018-09-13 Thread Amit Kapila
Back-patch "Fix parallel hash join path search." Back-patch commit 655393a022bd653e2b48dbf20b69236981e35195 to 9.6. This synchronizes the relavant code and helps in generating parallel paths in some cases in 9.6. This also helps in back-patch of future patches where we can get the same plan in a

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
LIMIT/OFFSET within sub-selects to workers. Reported-by: Andrew Fletcher Bug: 15324 Author: Amit Kapila Reviewed-by: Dilip Kumar Backpatch-through: 9.6 Discussion: https://postgr.es/m/153417684333.10284.11356259990921828...@wrigleys.postgresql.org Branch -- REL_11_STABLE Details ---

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
LIMIT/OFFSET within sub-selects to workers. Reported-by: Andrew Fletcher Bug: 15324 Author: Amit Kapila Reviewed-by: Dilip Kumar Backpatch-through: 9.6 Discussion: https://postgr.es/m/153417684333.10284.11356259990921828...@wrigleys.postgresql.org Branch -- REL9_6_STABLE Details ---

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
LIMIT/OFFSET within sub-selects to workers. Reported-by: Andrew Fletcher Bug: 15324 Author: Amit Kapila Reviewed-by: Dilip Kumar Backpatch-through: 9.6 Discussion: https://postgr.es/m/153417684333.10284.11356259990921828...@wrigleys.postgresql.org Branch -- REL_10_STABLE Details ---

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
LIMIT/OFFSET within sub-selects to workers. Reported-by: Andrew Fletcher Bug: 15324 Author: Amit Kapila Reviewed-by: Dilip Kumar Backpatch-through: 9.6 Discussion: https://postgr.es/m/153417684333.10284.11356259990921828...@wrigleys.postgresql.org Branch -- master Details ---

pgsql: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
RecoveryInProgress code path. Reported-by: Dilip Kumar Author: Dilip Kumar Reviewed-by: Michael Paquier and Amit Kapila Backpatch-through: 9.5 Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stck...@mail.gmail.com Branch -- REL9_6_STABLE Details --- https://git.postgresql.org

pgsql: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
RecoveryInProgress code path. Reported-by: Dilip Kumar Author: Dilip Kumar Reviewed-by: Michael Paquier and Amit Kapila Backpatch-through: 9.5 Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stck...@mail.gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org

pgsql: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
RecoveryInProgress code path. Reported-by: Dilip Kumar Author: Dilip Kumar Reviewed-by: Michael Paquier and Amit Kapila Backpatch-through: 9.5 Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stck...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
RecoveryInProgress code path. Reported-by: Dilip Kumar Author: Dilip Kumar Reviewed-by: Michael Paquier and Amit Kapila Backpatch-through: 9.5 Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stck...@mail.gmail.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org

pgsql: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
RecoveryInProgress code path. Reported-by: Dilip Kumar Author: Dilip Kumar Reviewed-by: Michael Paquier and Amit Kapila Backpatch-through: 9.5 Discussion: https://postgr.es/m/CAFiTN-u4BA8KXcQUWDPNgaKAjDXC=C2whnzBM8TAcv=stck...@mail.gmail.com Branch -- REL9_5_STABLE Details --- https://git.postgresql.org

pgsql: Test passing expanded-value representations to workers.

2018-10-01 Thread Amit Kapila
hardware. This commit will test that aspect and can lead to failure on some of the buildfarm machines which we will fix in the later commit. Author: Tom Lane and Amit Kapila Discussion: https://postgr.es/m/11629.1536550...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.or

pgsql: MAXALIGN the target address where we store flattened value.

2018-10-02 Thread Amit Kapila
usage. Diagnosed-by: Tom Lane Author: Tom Lane and Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/11629.1536550...@sss.pgh.pa.us Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/dca44d07c585637d8245a46a29be732241fa40bf Modified Files -

pgsql: MAXALIGN the target address where we store flattened value.

2018-10-02 Thread Amit Kapila
usage. Diagnosed-by: Tom Lane Author: Tom Lane and Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/11629.1536550...@sss.pgh.pa.us Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/ca5ca25d08710d7f5aaf0e390aae284bc594a6da Modified Files -

pgsql: MAXALIGN the target address where we store flattened value.

2018-10-02 Thread Amit Kapila
usage. Diagnosed-by: Tom Lane Author: Tom Lane and Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/11629.1536550...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9bc9f72b28fe4d2c22244f3443af8f1b98b56474 Modified Files -- src/ba

pgsql: MAXALIGN the target address where we store flattened value.

2018-10-02 Thread Amit Kapila
usage. Diagnosed-by: Tom Lane Author: Tom Lane and Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/11629.1536550...@sss.pgh.pa.us Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9718c93f532c3cfb6c39679452149dba711d12af Modified Files -

pgsql: Fix the initialization of atomic variable introduced by the

2018-11-12 Thread Amit Kapila
ame during postmaster startup. Reported-by: Andres Freund Author: Amit Kapila Backpatch-through: 9.6 Discussion:https://postgr.es/m/20181027104138.qmbbelopvy7cw...@alap3.anarazel.de Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d1a2fa3d9901c1e8f6bba1cecbb4ec

pgsql: Fix the initialization of atomic variables introduced by the

2018-11-12 Thread Amit Kapila
ix that by initializing them during postmaster startup. Reported-by: Andres Freund Author: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/20181027104138.qmbbelopvy7cw...@alap3.anarazel.de Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/

pgsql: Fix the initialization of atomic variables introduced by the

2018-11-12 Thread Amit Kapila
ix that by initializing them during postmaster startup. Reported-by: Andres Freund Author: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/20181027104138.qmbbelopvy7cw...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/

pgsql: Fix the initialization of atomic variable introduced by the

2018-11-12 Thread Amit Kapila
ame during postmaster startup. Reported-by: Andres Freund Author: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/20181027104138.qmbbelopvy7cw...@alap3.anarazel.de Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1a8bde490c982cbdd9d174e72d42f6

pgsql: Fix the omission in docs.

2018-11-14 Thread Amit Kapila
Fix the omission in docs. Commit 5373bc2a08 has added type for background workers but forgot to update at one place in the documentation. Reported-by: John Naylor Author: John Naylor Reviewed-by: Amit Kapila Backpatch-through: 11 Discussion: https://postgr.es/m

pgsql: Fix the omission in docs.

2018-11-14 Thread Amit Kapila
Fix the omission in docs. Commit 5373bc2a08 has added type for background workers but forgot to update at one place in the documentation. Reported-by: John Naylor Author: John Naylor Reviewed-by: Amit Kapila Backpatch-through: 11 Discussion: https://postgr.es/m

pgsql: Fix typo.

2018-11-29 Thread Amit Kapila
Fix typo. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dcfdf56e89a8d0b41874d495a44a4485e341f8c8 Modified Files -- src/backend/executor/execTuples.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra semicolons.

2018-12-17 Thread Amit Kapila
Remove extra semicolons. Reported-by: David Rowley Author: David Rowley Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/cakjs1f8eneeyyzzvdjahvz6gbahfkhbsfb5m_c0y6tujs9d...@mail.gmail.com Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg

pgsql: Remove extra semicolons.

2018-12-17 Thread Amit Kapila
Remove extra semicolons. Reported-by: David Rowley Author: David Rowley Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/cakjs1f8eneeyyzzvdjahvz6gbahfkhbsfb5m_c0y6tujs9d...@mail.gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg

pgsql: Remove extra semicolons.

2018-12-17 Thread Amit Kapila
Remove extra semicolons. Reported-by: David Rowley Author: David Rowley Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/cakjs1f8eneeyyzzvdjahvz6gbahfkhbsfb5m_c0y6tujs9d...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg

pgsql: Extend pg_stat_statements_reset to reset statistics specific to

2019-01-10 Thread Amit Kapila
existing statistics. Author: Haribabu Kommi, with few additional changes by me Reviewed-by: Michael Paquier, Amit Kapila and Fujii Masao Discussion: https://postgr.es/m/cajrrpgcyh-gkfswyc6c661k6cknl0xknqvt0sqt2mfnmr4h...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org

pgsql: In bootstrap mode, don't allow the creation of files if they don

2019-01-27 Thread Amit Kapila
es the need for same. This was harmless code till now but with an upcoming feature where we don't allow to create FSM for small tables, this will needlessly create FSM files. Author: John Naylor Reviewed-by: Amit Kapila Discussion: https://www.postgresql.org/message-id/cajvsvgwvb13pzpbleecfug

pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
en if somebody deletes all the rows from the corresponding relation. We don't think it is a useful optimization as it is quite likely that relation will again grow to the same size. Author: John Naylor with design inputs and some code contribution by Amit Kapila Reviewed-by: Amit Kapila Tested-by:

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
On Mon, Jan 28, 2019 at 8:17 AM Amit Kapila wrote: > > Avoid creation of the free space map for small heap relations. > It seems there is some failure due to this on build farm machines. I will investigate! -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
On Mon, Jan 28, 2019 at 8:49 AM Amit Kapila wrote: > > On Mon, Jan 28, 2019 at 8:17 AM Amit Kapila wrote: > > > > Avoid creation of the free space map for small heap relations. > > > > It seems there is some failure due to this on build farm machines. I > will

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
On Mon, Jan 28, 2019 at 10:25 AM Andrew Gierth wrote: > > >>>>> "Amit" == Amit Kapila writes: > > Amit> One possibility is that autovacuum has triggered to perform > Amit> truncation of some other relation (remove pages at the end) which > Am

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
On Mon, Jan 28, 2019 at 11:18 AM Tom Lane wrote: > > Amit Kapila writes: > > Yes, so this could be the cause of the problem. I think we need to > > change the tests added by the patch such that they don't rely on > > vacuum to remove dead-row versions? Do you or an

Re: pgsql: Avoid creation of the free space map for small heap relations.

2019-01-27 Thread Amit Kapila
On Mon, Jan 28, 2019 at 11:10 AM Andrew Gierth wrote: > > >>>>> "Amit" == Amit Kapila writes: > > Amit> Yes, so this could be the cause of the problem. I think we need > Amit> to change the tests added by the patch such that they don't rely

pgsql: Revert "Avoid creation of the free space map for small heap rela

2019-01-27 Thread Amit Kapila
Revert "Avoid creation of the free space map for small heap relations." This reverts commit ac88d2962a96a9c7e83d5acfc28fe49a72812086. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a23676503b746b7f1588cd2ab0c60411032d32da Modified Files -- contrib/page

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid possible deadlock while locking multiple heap pages.

2019-02-02 Thread Amit Kapila
re-acquire locks in bufferId order whereas the intention was to acquire in blockid order. This commit ensures that we will always acquire locks on heap pages in blockid order. Reported-by: Nishant Fnu Author: Nishant Fnu Reviewed-by: Amit Kapila and Robert Haas Backpatch-through: 9.4 Discussion

pgsql: Avoid creation of the free space map for small heap relations, t

2019-02-03 Thread Amit Kapila
even if somebody deletes all the rows from the corresponding relation. We don't think it is a useful optimization as it is quite likely that relation will again grow to the same size. Author: John Naylor, Amit Kapila Reviewed-by: Amit Kapila Tested-by: Mithun C Y Discussion: https://www.post

pgsql: Make FSM test portable.

2019-02-03 Thread Amit Kapila
of tuples. This commit removes the dependency on FSM contents. Author: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1KADF6K1bagr0--mGv3dMcZ%3DH_Z-Qtvdfbp5PjaC6PJJA%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Doc: Update the documentation for row movement behavior across p

2019-02-06 Thread Amit Kapila
another, there is a chance that another concurrent UPDATE or DELETE misses this row. However, now we raise a serialization failure error in such a case. Reported-by: David Rowley Author: David Rowley and Amit Kapila Backpatch-through: 11 where it was introduced Discussion: https://postgr.es/m

pgsql: Doc: Update the documentation for row movement behavior across p

2019-02-06 Thread Amit Kapila
another, there is a chance that another concurrent UPDATE or DELETE misses this row. However, now we raise a serialization failure error in such a case. Reported-by: David Rowley Author: David Rowley and Amit Kapila Backpatch-through: 11 where it was introduced Discussion: https://postgr.es/m

pgsql: Doc: Update the documentation for FSM behavior for small tables.

2019-02-20 Thread Amit Kapila
has not been triggered to update FSM. This commit updates the comments in code and documentation to reflect this behavior. Author: John Naylor Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CACPNZCtba-3m1q3A8gxA_vxg=t7gqf7gmbpr4ciy5lnty-j...@mail.gmail.com Branch -- master Details

pgsql: Clear the local map when not used.

2019-02-28 Thread Amit Kapila
. However, we miss to clear it when we didn't find any pages to try from the map which leads to an assertion failure when we later tried to use it after relation extension. In the passing, I have improved some comments in this area. Reported-by: Tom Lane based on buildfarm results Author:

Re: pgsql: tableam: introduce table AM infrastructure.

2019-03-10 Thread Amit Kapila
On Wed, Mar 6, 2019 at 11:31 PM Andres Freund wrote: > > tableam: introduce table AM infrastructure. > Thanks for this work. I noticed a few typos in this commit. The patch for the same is attached. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com 0001-Fix

pgsql: Add more tests for FSM.

2019-03-11 Thread Amit Kapila
, put the fsm regression test in a parallel group. Author: John Naylor Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1L=qwp_bj5atc9+fy4ewx2lpalwy-rbr4a60g_rupc...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: During pg_upgrade, conditionally skip transfer of FSMs.

2019-03-14 Thread Amit Kapila
take advantage of commit b0eaa4c51b where we have avoided creation of the free space map for small heap relations. Author: John Naylor Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g%40mail.gmail.com Branch -- master De

pgsql: Improve code comments in b0eaa4c51b.

2019-03-15 Thread Amit Kapila
Improve code comments in b0eaa4c51b. Author: John Naylor Discussion: https://postgr.es/m/CACPNZCswjyGJxTT=mxHgK=Z=mJ9uJ4WEx_UO=bnwpr_i0ea...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/06c8a5090ed9ec188557a86d4de11384f5128ec0 Modified Files

pgsql: Update copyright year in files added by 1bb5e78218.

2019-03-16 Thread Amit Kapila
Update copyright year in files added by 1bb5e78218. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f27314ff9a0eb60b75bb576c3629c8849f7698c1 Modified Files -- src/backend/partitioning/partdesc.c | 2 +- src/include/partitioning/partdesc.h | 2 +- 2 files c

pgsql: Avoid counting transaction stats for parallel worker cooperating

2019-04-09 Thread Amit Kapila
fix, we need to decide how we want to show all the transactions that are started internally for various operations and that is a matter of separate patch. Reported-by: Haribabu Kommi Author: Haribabu Kommi Reviewed-by: Amit Kapila, Jamison Kirk and Rahila Syed Backpatch-through: 9.6 Discussion

pgsql: Avoid counting transaction stats for parallel worker cooperating

2019-04-09 Thread Amit Kapila
fix, we need to decide how we want to show all the transactions that are started internally for various operations and that is a matter of separate patch. Reported-by: Haribabu Kommi Author: Haribabu Kommi Reviewed-by: Amit Kapila, Jamison Kirk and Rahila Syed Backpatch-through: 9.6 Discussion

pgsql: Avoid counting transaction stats for parallel worker cooperating

2019-04-09 Thread Amit Kapila
fix, we need to decide how we want to show all the transactions that are started internally for various operations and that is a matter of separate patch. Reported-by: Haribabu Kommi Author: Haribabu Kommi Reviewed-by: Amit Kapila, Jamison Kirk and Rahila Syed Backpatch-through: 9.6 Discussion

pgsql: Avoid counting transaction stats for parallel worker cooperating

2019-04-09 Thread Amit Kapila
fix, we need to decide how we want to show all the transactions that are started internally for various operations and that is a matter of separate patch. Reported-by: Haribabu Kommi Author: Haribabu Kommi Reviewed-by: Amit Kapila, Jamison Kirk and Rahila Syed Backpatch-through: 9.6 Discussion

pgsql: Revert "Avoid the creation of the free space map for small heap

2019-05-06 Thread Amit Kapila
Revert "Avoid the creation of the free space map for small heap relations". This feature was using a process local map to track the first few blocks in the relation. The map was reset each time we get the block with enough freespace. It was discussed that it would be better to track this map on

  1   2   3   4   5   6   7   8   9   10   >