Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

2019-04-25 Thread Etsuro Fujita
Amit-san, (2019/04/26 13:20), Amit Langote wrote: On 2019/04/25 22:17, Etsuro Fujita wrote: (2019/04/24 22:04), Laurenz Albe wrote: Before PostgreSQL v11, a foreign data wrapper could be certain that BeginForeignModify is always called before ExecForeignInsert. This is no longer tr

Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

2019-04-25 Thread Amit Langote
Fujita-san, On 2019/04/25 22:17, Etsuro Fujita wrote: > (2019/04/24 22:04), Laurenz Albe wrote: >>    Before PostgreSQL v11, a foreign data wrapper could be certain that >>    BeginForeignModify is always called before ExecForeignInsert. >>    This is no longer true. > > OK, how about something l

pgsql: Sanitize line pointers within contrib/amcheck.

2019-04-25 Thread Peter Geoghegan
Sanitize line pointers within contrib/amcheck. Adopt a more defensive approach to accessing index tuples in contrib/amcheck: verify that each line pointer looks sane before accessing associated tuple using pointer arithmetic based on line pointer's offset. This avoids undefined behavior and asser

pgsql: Fix partitioned index attachment

2019-04-25 Thread Alvaro Herrera
Fix partitioned index attachment When an existing index in a partition is attached to a new index on its parent, we forgot to set the "relispartition" flag correctly, which meant that it was not possible to find the index in various operations, such as adding a foreign key constraint that referenc

pgsql: Fix partitioned index attachment

2019-04-25 Thread Alvaro Herrera
Fix partitioned index attachment When an existing index in a partition is attached to a new index on its parent, we forgot to set the "relispartition" flag correctly, which meant that it was not possible to find the index in various operations, such as adding a foreign key constraint that referenc

pgsql: Fix file path in comment.

2019-04-25 Thread Fujii Masao
Fix file path in comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c247ae09226eeb1c3a77bb54a0736ed7da5622b5 Modified Files -- src/bin/pg_checksums/pg_checksums.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix function names in comments.

2019-04-25 Thread Fujii Masao
Fix function names in comments. Commit 3eb77eba5a renamed some functions, but forgot to update some comments referencing to those functions. This commit fixes those function names in the comments. Kyotaro Horiguchi Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/97

pgsql: Fix tablespace inheritance for partitioned rels

2019-04-25 Thread Alvaro Herrera
Fix tablespace inheritance for partitioned rels Commit ca4103025dfe left a few loose ends. The most important one (broken pg_dump output) is already fixed by virtue of commit 3b23552ad8bb, but some things remained: * When ALTER TABLE rewrites tables, the indexes must remain in the tablespace t

Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

2019-04-25 Thread Laurenz Albe
On Thu, 2019-04-25 at 22:17 +0900, Etsuro Fujita wrote: > > The documentation of ExecForeignInsert should mention something like: > > > >ExecForeignInsert is called for INSERT statements as well > >as for COPY FROM and tuples that are inserted into a foreign table > >because it is a par

Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

2019-04-25 Thread Etsuro Fujita
(2019/04/24 22:04), Laurenz Albe wrote: On Wed, 2019-04-24 at 20:54 +0900, Etsuro Fujita wrote: How about adding to the documentation for BeginForeignInsert a mention that if an FDW doesn't support COPY FROM and/or routable foreign tables, it must throw an error in BeginForeignInsert accordingly