pgsql: Change pg_restore -f- to dump to stdout instead of to ./-

2019-11-05 Thread Alvaro Herrera
Change pg_restore -f- to dump to stdout instead of to ./- Starting with PostgreSQL 12, pg_restore refuses to run when neither -d nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -" mean the old implicit behavior of dumping to stdout. However, older branches write to a file c

pgsql: Change pg_restore -f- to dump to stdout instead of to ./-

2019-11-05 Thread Alvaro Herrera
Change pg_restore -f- to dump to stdout instead of to ./- Starting with PostgreSQL 12, pg_restore refuses to run when neither -d nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -" mean the old implicit behavior of dumping to stdout. However, older branches write to a file c

pgsql: Change pg_restore -f- to dump to stdout instead of to ./-

2019-11-05 Thread Alvaro Herrera
Change pg_restore -f- to dump to stdout instead of to ./- Starting with PostgreSQL 12, pg_restore refuses to run when neither -d nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -" mean the old implicit behavior of dumping to stdout. However, older branches write to a file c

pgsql: Change pg_restore -f- to dump to stdout instead of to ./-

2019-11-05 Thread Alvaro Herrera
Change pg_restore -f- to dump to stdout instead of to ./- Starting with PostgreSQL 12, pg_restore refuses to run when neither -d nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -" mean the old implicit behavior of dumping to stdout. However, older branches write to a file c

pgsql: Change pg_restore -f- to dump to stdout instead of to ./-

2019-11-05 Thread Alvaro Herrera
Change pg_restore -f- to dump to stdout instead of to ./- Starting with PostgreSQL 12, pg_restore refuses to run when neither -d nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -" mean the old implicit behavior of dumping to stdout. However, older branches write to a file c

Re: pgsql: doc: Further clarify how recovery target parameters are applied

2019-11-05 Thread Alvaro Herrera
On 2019-Oct-18, Fujii Masao wrote: > > Thanks for improving the documentation. > > > > + In this mode, the parameters from both this section and > + linkend="runtime-config-wal-recovery-target"/> will be used. > > Parameters > > + from will not be > > + used. > > > > The latter

pgsql: Generate EquivalenceClass members for partitionwise child join r

2019-11-05 Thread Tom Lane
Generate EquivalenceClass members for partitionwise child join rels. Commit d25ea0127 got rid of what I thought were entirely unnecessary derived child expressions in EquivalenceClasses for EC members that mention multiple baserels. But it turns out that some of the child expressions that code cr

pgsql: Generate EquivalenceClass members for partitionwise child join r

2019-11-05 Thread Tom Lane
Generate EquivalenceClass members for partitionwise child join rels. Commit d25ea0127 got rid of what I thought were entirely unnecessary derived child expressions in EquivalenceClasses for EC members that mention multiple baserels. But it turns out that some of the child expressions that code cr

pgsql: Fix "unexpected relkind" error when denying permissions on toast

2019-11-05 Thread Tom Lane
Fix "unexpected relkind" error when denying permissions on toast tables. get_relkind_objtype, and hence get_object_type, failed when applied to a toast table. This is not a good thing, because it prevents reporting of perfectly legitimate permissions errors. (At present, these functions are in f

pgsql: Fix "unexpected relkind" error when denying permissions on toast

2019-11-05 Thread Tom Lane
Fix "unexpected relkind" error when denying permissions on toast tables. get_relkind_objtype, and hence get_object_type, failed when applied to a toast table. This is not a good thing, because it prevents reporting of perfectly legitimate permissions errors. (At present, these functions are in f

pgsql: Fix "unexpected relkind" error when denying permissions on toast

2019-11-05 Thread Tom Lane
Fix "unexpected relkind" error when denying permissions on toast tables. get_relkind_objtype, and hence get_object_type, failed when applied to a toast table. This is not a good thing, because it prevents reporting of perfectly legitimate permissions errors. (At present, these functions are in f

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Tweak some authentication debug messages to follow project style

2019-11-05 Thread Tom Lane
Tweak some authentication debug messages to follow project style. Avoid initial capital, since that's not how we do it. Discussion: https://postgr.es/m/CACP=ajbrFFYUrLyJBLV8=q+encapa1xdeyvxhmoyrnphs-x...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdi

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Avoid logging complaints about abandoned connections when using

2019-11-05 Thread Tom Lane
Avoid logging complaints about abandoned connections when using PAM. For a long time (since commit aed378e8d) we have had a policy to log nothing about a connection if the client disconnects when challenged for a password. This is because libpq-using clients will typically do that, and then come

pgsql: Split all OBJS style lines in makefiles into one-line-per-entry

2019-11-05 Thread Andres Freund
Split all OBJS style lines in makefiles into one-line-per-entry style. When maintaining or merging patches, one of the most common sources for conflicts are the list of objects in makefiles. Especially when the split across lines has been changed on both sides, which is somewhat common due to atte

pgsql: Make StringInfo available to frontend code.

2019-11-05 Thread Andres Freund
Make StringInfo available to frontend code. There's plenty places in frontend code that could benefit from a string buffer implementation. Some because it yields simpler and faster code, and some others because of the desire to share code between backend and frontend. While there is a string buff

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f71a

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4b5e58b86e3

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5c9b

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cb57

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/00ac

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1673

pgsql: doc: fix plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix plurality typo on bgwriter doc sentence Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.4 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0d8b

pgsql: Add "G" (server-side data generation) as an initialization step

2019-11-05 Thread Fujii Masao
Add "G" (server-side data generation) as an initialization step in pgbench. This commit allows --init-steps option in pgbench to accept "G" character meaning server-side data generation as an initialization step. With "G", only limited queries are sent from pgbench client and then data is actually

pgsql: doc: fix for plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix for plurality typo on bgwriter doc sentence Reported-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11, 12 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4d616b112704411ff059321c76f438691f

pgsql: doc: fix for plurality typo on bgwriter doc sentence

2019-11-05 Thread Bruce Momjian
doc: fix for plurality typo on bgwriter doc sentence Reported-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11, 12 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/793739180735a062d9eadec9ad03dbd5db

pgsql: Correct the command tags for ALTER ... RENAME COLUMN.

2019-11-05 Thread Fujii Masao
Correct the command tags for ALTER ... RENAME COLUMN. Previously ALTER MATERIALIZED VIEW / FOREIGN TABLE ... RENAME COLUMN ... returned "ALTER TABLE" as a command tag. This commit fixes them so that they return "ALTER MATERIALIZED VIEW" and "ALTER FOREIGN TABLE" as command tags, respectively. Thi

Re: pgsql: doc: Further clarify how recovery target parameters are applied

2019-11-05 Thread Fujii Masao
On Tue, Nov 5, 2019 at 10:28 PM Alvaro Herrera wrote: > > On 2019-Oct-18, Fujii Masao wrote: > > > > Thanks for improving the documentation. > > > > > > + In this mode, the parameters from both this section and > > + linkend="runtime-config-wal-recovery-target"/> will be used. > > > Par

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Request small targetlist for input to WindowAgg.

2019-11-05 Thread Andrew Gierth
Request small targetlist for input to WindowAgg. WindowAgg will potentially store large numbers of input rows into tuplestores to allow access to other rows in the frame. If the input is coming via an explicit Sort node, then unneeded columns will already have been discarded (since Sort requests a

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Fix timestamp of sent message for write context in logical decod

2019-11-05 Thread Michael Paquier
Fix timestamp of sent message for write context in logical decoding When sending data for logical decoding using the streaming replication protocol via a WAL sender, the timestamp of the sent write message is allocated at the beginning of the message when preparing for the write, and actually comp

pgsql: Remove unused function argument

2019-11-05 Thread Peter Eisentraut
Remove unused function argument The cache_plan argument to ri_PlanCheck has not been used since e8c9fd5fdf768323911f7088e8287f63b513c3c6. Reviewed-by: vignesh C Discussion: https://www.postgresql.org/message-id/flat/ec8a8b45-a30b-9193-cd4b-985d60d1497e%402ndquadrant.com Branch -- master D

Re: pgsql: doc: Further clarify how recovery target parameters are applied

2019-11-05 Thread Peter Eisentraut
On 2019-11-06 05:48, Fujii Masao wrote: Patch attached. As I argued upthread, IMO it's better to remove the latter description from the doc and the patch does that. Also the patch adds "mainly" into the former description. I think we should list explicitly what is applied and what is not. This