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 Details

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 Rajkumar

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: Improve coding pattern in Parallel Append code.

2018-06-21 Thread Amit Kapila
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 Modified Files

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

2018-08-02 Thread Amit Kapila
-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-7421

pgsql: Fix buffer usage stats for parallel nodes.

2018-08-03 Thread Amit Kapila
it 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-03 Thread Amit Kapila
it 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-03 Thread Amit Kapila
it 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-03 Thread Amit Kapila
it 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: Match the buffer usage tracking for leader and worker backends.

2018-08-02 Thread Amit Kapila
-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-7421

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

2018-08-02 Thread Amit Kapila
-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-7421

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

2018-08-02 Thread Amit Kapila
-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-7421

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: 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: 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: Fix the overrun in hash index metapage for smaller block sizes.

2018-09-05 Thread Amit Kapila
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.gmail.com Branch

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

2018-09-05 Thread Amit Kapila
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.gmail.com Branch

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

2018-09-05 Thread Amit Kapila
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.gmail.com Branch

pgsql: Fix pg_verify_checksums on Windows.

2018-08-31 Thread Amit Kapila
inary 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/762a16572bb5d9be6c9c53c9ecd292

pgsql: Fix pg_verify_checksums on Windows.

2018-08-31 Thread Amit Kapila
inary 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/bb60f2cb6ed8361fbf18b92d312776046d9b0103

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

2018-07-12 Thread Amit Kapila
: 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.postgresql.org/pg

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

2018-07-12 Thread Amit Kapila
: 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.postgresql.org/pg

pgsql: Fix the initialization of atomic variable introduced by the

2018-11-12 Thread Amit Kapila
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/d1a2fa3d9901c1e8f6bba1cecbb4ecdd64f4849e

pgsql: Fix the initialization of atomic variables introduced by the

2018-11-12 Thread Amit Kapila
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/commitdiff

pgsql: Fix the initialization of atomic variables introduced by the

2018-11-12 Thread Amit Kapila
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/commitdiff

pgsql: Fix the initialization of atomic variable introduced by the

2018-11-12 Thread Amit Kapila
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/1a8bde490c982cbdd9d174e72d42f6042e9bf4ee

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: MAXALIGN the target address where we store flattened value.

2018-10-02 Thread Amit Kapila
. 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/backend

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

2018-10-02 Thread Amit Kapila
. 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 -- src

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

2018-10-02 Thread Amit Kapila
. 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 -- src

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

2018-10-02 Thread Amit Kapila
. 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 -- src

pgsql: Test passing expanded-value representations to workers.

2018-10-01 Thread Amit Kapila
. 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.org/pg/commitdiff

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

2018-09-03 Thread Amit Kapila
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://postgr.es/m

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

2018-09-03 Thread Amit Kapila
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://postgr.es/m

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

2018-09-03 Thread Amit Kapila
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://postgr.es/m

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 assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
in 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: Fix assertion failure when updating full_page_writes for checkpo

2018-09-28 Thread Amit Kapila
in 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
in 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
in 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
in 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: 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: 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: Extend pg_stat_statements_reset to reset statistics specific to

2019-01-10 Thread Amit Kapila
the 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: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
it by 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
it by 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
it by 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
it by 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
it by 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

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

2018-09-13 Thread Amit Kapila
/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 --- https

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

2019-01-27 Thread Amit Kapila
. 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/cajvsvgwvb13pzpbleecfugfc5v2fso736bsdtakpipacdmm

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 anybody

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

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 >

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

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: Amit

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

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-

pgsql: During pg_upgrade, conditionally skip transfer of FSMs.

2019-03-14 Thread Amit Kapila
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 Details

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: Doc: Update the documentation for row movement behavior across p

2019-02-06 Thread Amit Kapila
to 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
to 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: 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
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.postgresql.org

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: 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: Doc: fix incorrect references in PG 12 release notes.

2019-05-25 Thread Amit Kapila
Doc: fix incorrect references in PG 12 release notes. Reported-by: Euler Taveira Author: Euler Taveira Discussion: https://postgr.es/m/cahe3wgjia8ddnuzh9wqblxdruvvjdkkndhx-mkeg9uv+htp...@mail.gmail.com Branch -- master Details ---

pgsql: Fix typos.

2019-05-26 Thread Amit Kapila
Fix typos. Reported-by: Alexander Lakhin Author: Alexander Lakhin Reviewed-by: Amit Kapila and Tom Lane Discussion: https://postgr.es/m/7208de98-add8-8537-91c0-f8b089e29...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix inconsistency in comments atop ExecParallelEstimate.

2019-06-06 Thread Amit Kapila
-by: Wu Fei Author: Wu Fei Reviewed-by: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/52E6E0843B9D774C8C73D6CF64402F0562215EB2@G08CNEXMBPEKD02.g08.fujitsu.local Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d8261595bc6f5189896cdce6861915ac23830e7c

pgsql: Fix inconsistency in comments atop ExecParallelEstimate.

2019-06-06 Thread Amit Kapila
-by: Wu Fei Author: Wu Fei Reviewed-by: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/52E6E0843B9D774C8C73D6CF64402F0562215EB2@G08CNEXMBPEKD02.g08.fujitsu.local Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix inconsistency in comments atop ExecParallelEstimate.

2019-06-06 Thread Amit Kapila
-by: Wu Fei Author: Wu Fei Reviewed-by: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/52E6E0843B9D774C8C73D6CF64402F0562215EB2@G08CNEXMBPEKD02.g08.fujitsu.local Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix inconsistency in comments atop ExecParallelEstimate.

2019-06-06 Thread Amit Kapila
-by: Wu Fei Author: Wu Fei Reviewed-by: Amit Kapila Backpatch-through: 9.6 Discussion: https://postgr.es/m/52E6E0843B9D774C8C73D6CF64402F0562215EB2@G08CNEXMBPEKD02.g08.fujitsu.local Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix assorted inconsistencies.

2019-06-07 Thread Amit Kapila
Fix assorted inconsistencies. There were a number of issues in the recent commits which include typos, code and comments mismatch, leftover function declarations. Fix them. Reported-by: Alexander Lakhin Author: Alexander Lakhin, Amit Kapila and Amit Langote Reviewed-by: Amit Kapila 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

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

2019-05-06 Thread Amit Kapila
On Tue, May 7, 2019 at 9:51 AM Tom Lane wrote: > > Amit Kapila writes: > > On Tue, May 7, 2019 at 9:44 AM Tom Lane wrote: > >> Shouldn't there be a catversion bump in this? > > > Won't the next vacuum run will create the FSM? > > If that's true, and if we do

Re: pgsql: docs: fist draft version of the PG 12 release notes

2019-05-06 Thread Amit Kapila
t; Still needs text markup, links, word wrap, and indenting. > > > > You can see the browser version at: > > > > Sorry, this is a better URL: > > http://momjian.us/pgsql_docs/release-12.html > Can you please remove below entry from release notes? Avoid creati

  1   2   3   4   5   6   7   8   9   10   >