pgsql: Make pg_dump emit ATTACH PARTITION instead of PARTITION OF

2019-04-24 Thread Alvaro Herrera
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF Using PARTITION OF can result in column ordering being changed from the database being dumped, if the partition uses a column layout different from the parent's. It's not pg_dump's job to editorialize on table definitions, so this is not

pgsql: Make pg_dump emit ATTACH PARTITION instead of PARTITION OF

2019-04-24 Thread Alvaro Herrera
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF Using PARTITION OF can result in column ordering being changed from the database being dumped, if the partition uses a column layout different from the parent's. It's not pg_dump's job to editorialize on table definitions, so this is not

pgsql: Make pg_dump emit ATTACH PARTITION instead of PARTITION OF

2019-04-24 Thread Alvaro Herrera
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF Using PARTITION OF can result in column ordering being changed from the database being dumped, if the partition uses a column layout different from the parent's. It's not pg_dump's job to editorialize on table definitions, so this is not

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

pgsql: Fix some minor postmaster-state-machine issues.

2019-04-24 Thread Tom Lane
Fix some minor postmaster-state-machine issues. In sigusr1_handler, don't ignore PMSIGNAL_ADVANCE_STATE_MACHINE based on pmState. The restriction is unnecessary (PostmasterStateMachine should work in any state), not future-proof (since it makes too many assumptions about why the signal might be s

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

2019-04-24 Thread Laurenz Albe
On Wed, 2019-04-24 at 14:25 +0100, Simon Riggs wrote: > On Wed, 24 Apr 2019 at 12:55, Etsuro Fujita > wrote: > > > > My point is that this should not be necessary. > > > > In my opinion, I think this is necessary... > > Could we decide by looking at what FDWs are known to exist? > I hope we a

pgsql: Unify error messages

2019-04-24 Thread Alvaro Herrera
Unify error messages ... for translatability purposes. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0a999e1290fc9d8708da61017e732380bc9239a3 Modified Files -- src/backend/storage/ipc/latch.c | 12 +--- src/backend/storage/ipc/signalfuncs

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

2019-04-24 Thread Simon Riggs
On Wed, 24 Apr 2019 at 12:55, Etsuro Fujita wrote: > > My point is that this should not be necessary. > > In my opinion, I think this is necessary... > Could we decide by looking at what FDWs are known to exist? I hope we are trying to avoid breakage in the smallest number of FDWs. -- Simon

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

2019-04-24 Thread Laurenz Albe
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. Sure, some more documentation wo

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

2019-04-24 Thread Etsuro Fujita
(2019/04/23 4:37), Laurenz Albe wrote: On Mon, 2019-04-22 at 21:45 +0900, Etsuro Fujita wrote: (2019/04/20 20:53), Laurenz Albe wrote: On Fri, 2018-04-06 at 23:24 +, Robert Haas wrote: Allow insert and update tuple routing and COPY for foreign tables. Also enable this for postgres_fdw. E

pgsql: postgres_fdw: Fix incorrect handling of row movement for remote

2019-04-24 Thread Etsuro Fujita
postgres_fdw: Fix incorrect handling of row movement for remote partitions. Commit 3d956d9562 added support for update row movement in postgres_fdw. This patch fixes the following issues introduced by that commit: * When a remote partition chosen to insert routed rows into was also an UPDATE su

pgsql: postgres_fdw: Fix incorrect handling of row movement for remote

2019-04-24 Thread Etsuro Fujita
postgres_fdw: Fix incorrect handling of row movement for remote partitions. Commit 3d956d9562 added support for update row movement in postgres_fdw. This patch fixes the following issues introduced by that commit: * When a remote partition chosen to insert routed rows into was also an UPDATE su