pgsql: Use pg_pwrite() in more places.

2020-02-10 Thread Thomas Munro
Use pg_pwrite() in more places.

This removes some lseek() system calls.

Author: Thomas Munro
Reviewed-by: Andres Freund
Discussion: 
https://postgr.es/m/CA%2BhUKGJ%2BoHhnvqjn3%3DHro7xu-YDR8FPr0FL6LF35kHRX%3D_bUzg%40mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/701a51fd4e01dbbd02067d8f01905a04bc571131

Modified Files
--
contrib/pg_stat_statements/pg_stat_statements.c |  7 ++-
src/backend/access/heap/rewriteheap.c   |  9 +---
src/backend/replication/walreceiver.c   | 28 +++--
src/backend/utils/init/miscinit.c   |  3 +--
4 files changed, 7 insertions(+), 40 deletions(-)



pgsql: Stamp 9.4.26.

2020-02-10 Thread Tom Lane
Stamp 9.4.26.

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/30ffdd24d7222bc01183a56d536c236240674516

Modified Files
--
configure| 18 +-
configure.in |  2 +-
doc/bug.template |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)



pgsql: Stamp 9.5.21.

2020-02-10 Thread Tom Lane
Stamp 9.5.21.

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/d9b89f1939cc33f14bb8c3f01ced946eb0febaa5

Modified Files
--
configure| 18 +-
configure.in |  2 +-
doc/bug.template |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)



pgsql: Stamp 9.6.17.

2020-02-10 Thread Tom Lane
Stamp 9.6.17.

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/d48d8ba2361c93378d49050ff9526c8a7f289e34

Modified Files
--
configure| 18 +-
configure.in |  2 +-
doc/bug.template |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)



pgsql: Stamp 10.12.

2020-02-10 Thread Tom Lane
Stamp 10.12.

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/95d2576d023ec2a8b984472191b4e4be4205516e

Modified Files
--
configure| 18 +-
configure.in |  2 +-
doc/bug.template |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)



pgsql: Stamp 11.7.

2020-02-10 Thread Tom Lane
Stamp 11.7.

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a8423a99122bae8e90a3874a4466c39031657a55

Modified Files
--
configure| 18 +-
configure.in |  2 +-
doc/bug.template |  2 +-
src/include/pg_config.h.in   |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
7 files changed, 22 insertions(+), 22 deletions(-)



pgsql: Stamp 12.2.

2020-02-10 Thread Tom Lane
Stamp 12.2.

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/45b88269a353ad93744772791feb6d01bc7e1e42

Modified Files
--
configure| 18 +-
configure.in |  2 +-
src/include/pg_config.h.in   |  2 +-
src/include/pg_config.h.win32|  8 
src/interfaces/libpq/libpq.rc.in |  8 
src/port/win32ver.rc |  4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)



pgsql: Canonicalize some URLs

2020-02-10 Thread Peter Eisentraut
Canonicalize some URLs

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/2102ba4b586350957bf95b371432583239000164

Modified Files
--
HISTORY | 2 +-
README  | 2 +-
README.git  | 2 +-
src/bin/psql/copy.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)



pgsql: psql: Remove one use of HAVE_UNIX_SOCKETS

2020-02-10 Thread Peter Eisentraut
psql: Remove one use of HAVE_UNIX_SOCKETS

This use was not protecting any unportable code, it was just omitting
the code because it wouldn't be used.  Remove the use to reduce code
complexity a bit.

Discussion: 
https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a...@2ndquadrant.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/541757f34ee099dd8e601b29dfad6302c6747d71

Modified Files
--
src/bin/psql/prompt.c | 7 ---
1 file changed, 7 deletions(-)



pgsql: Simplify passing of configure arguments to pg_config

2020-02-10 Thread Peter Eisentraut
Simplify passing of configure arguments to pg_config

The previous system had configure put the value into the makefiles and
then have the makefiles pass them to the build of pg_config.  That was
put in place when pg_config was a shell script.  We can simplify that
by having configure put the value into pg_config.h directly.  This
also makes the standard build system match how the MSVC build system
already does it.

Discussion: 
https://www.postgresql.org/message-id/flat/6e457870-cef5-5f1d-b57c-fc89cfb8a788%402ndquadrant.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/b691c189c671ca9b88743ed6546b60641e5199e4

Modified Files
--
configure  | 6 --
configure.in   | 2 +-
src/Makefile.global.in | 3 ---
src/common/Makefile| 1 -
src/common/config_info.c   | 6 +-
src/include/pg_config.h.in | 3 +++
src/tools/msvc/Solution.pm | 7 +--
7 files changed, 10 insertions(+), 18 deletions(-)



pgsql: Change signature of TupleHashTableHash().

2020-02-10 Thread Jeff Davis
Change signature of TupleHashTableHash().

Commit 4eaea3db introduced TupleHashTableHash(), but the signature
didn't match the other exposed functions. Separate it into internal
and external versions. The external version hides the details behind
an API more consistent with the other external functions, and the
internal version is still suitable for simplehash.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/11de6c903da99a4b2220acfa776fc26c7f384ccc

Modified Files
--
src/backend/executor/execGrouping.c | 35 +--
src/include/executor/executor.h |  4 ++--
2 files changed, 31 insertions(+), 8 deletions(-)



Re: pgsql: Fix page modification outside of critical section in GIN

2020-02-10 Thread Tom Lane
Alexander Korotkov  writes:
> Sorry for delayed response.  Yes, my fix for oversight contain
> oversight itself.  I confirm the fix you've committed is correct.
> Thank you!

Thanks for checking!

regards, tom lane




Re: pgsql: Fix page modification outside of critical section in GIN

2020-02-10 Thread Alexander Korotkov
On Sun, Feb 9, 2020 at 8:05 PM Tom Lane  wrote:
>
> I wrote:
> > Alexander Korotkov  writes:
> >> Fix page modification outside of critical section in GIN
>
> > I happened to notice, while reviewing stuff for the release notes,
> > that this patch does not do what the commit message says.  The
> > previous code modified the pd_prune_xid of the "dBuffer" page,
> > but now it's modifying the pd_prune_xid of the "lBuffer" page.
> > Is that actually correct?
>
> Since we're rapidly approaching the wrap deadline for this week's
> releases, I took it upon myself to review this code more carefully,
> and concluded that indeed it isn't correct.  I pushed a fix that
> moves the GinPageSetDeleteXid call again.

Sorry for delayed response.  Yes, my fix for oversight contain
oversight itself.  I confirm the fix you've committed is correct.
Thank you!

--
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




Re: pgsql: walreceiver uses a temporary replication slot by default

2020-02-10 Thread Peter Eisentraut

On 2020-01-23 21:49, Robert Haas wrote:

On Tue, Jan 14, 2020 at 8:57 AM Peter Eisentraut  wrote:

walreceiver uses a temporary replication slot by default

If no permanent replication slot is configured using
primary_slot_name, the walreceiver now creates and uses a temporary
replication slot.  A new setting wal_receiver_create_temp_slot can be
used to disable this behavior, for example, if the remote instance is
out of replication slots.

Reviewed-by: Masahiko Sawada 
Discussion: 
https://www.postgresql.org/message-id/CA%2Bfd4k4dM0iEPLxyVyme2RAFsn8SUgrNtBJOu81YqTY4V%2BnqZA%40mail.gmail.com


Neither the commit message for this patch nor any of the comments in
the patch seem to explain why this is a desirable change.

I assume that's probably discussed on the thread that is linked here,
but you shouldn't have to dig through the discussion thread to figure
out what the benefits of a change like this are.


You are right, this has gotten a bit lost in the big thread.

The rationale is basically the same as why client-side tools like 
pg_basebackup use a temporary slot: So that the WAL data that they are 
interested in doesn't disappear while they are connected.


--
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/ca902add69291b50fe4fc0d7c2bb57b6da13b3db

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8fa8e011563744f61d29024ab187a189124a6551

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/16316172361ce8fcbae4a9bd653bfbc9f96d1ab8

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/87d014da99bf7613ce76938a9d58e99ef984737a

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/1b2ae4bcd69deb08bbabd335558fa2ef779dc783

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/5575fc20817497a29732198c20b9364583407599

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: createuser: fix parsing of --connection-limit argument

2020-02-10 Thread Alvaro Herrera
createuser: fix parsing of --connection-limit argument

The original coding failed to quote the argument properly.

Reported-by: Daniel Gustafsson
Discussion: 1b8ae66c-85ab-4728-9bb4-612e8e61c...@yesql.se

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/6f1e443a6584ec57bd3eb57e54bb5fafbf51

Modified Files
--
src/bin/scripts/createuser.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: b0010b20ca9b3de3a7ca6e908948ffab7cd3f467

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/3a1acb6b70eb06820c826b0eebb8848be5bc26e8

Modified Files
--
src/backend/po/de.po  |  840 +-
src/backend/po/fr.po  | 1134 +--
src/backend/po/ru.po  | 1300 +
src/bin/pg_dump/po/fr.po  |  571 +-
src/bin/pg_dump/po/ru.po  |  251 
src/interfaces/libpq/po/ru.po |  140 ++---
6 files changed, 2135 insertions(+), 2101 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: fc4d6b13b6a369c443a8f573f3836c5759d1a919

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/7f97b5e891d23db0e44f3292177c62fcb57bd766

Modified Files
--
src/backend/po/de.po  | 1166 
src/backend/po/fr.po  | 1759 ++--
src/backend/po/ru.po  | 1957 +
src/backend/po/sv.po  | 1884 ---
src/bin/pg_ctl/po/de.po   |4 +-
src/bin/pg_ctl/po/ru.po   |2 +-
src/bin/pg_dump/po/fr.po  |  627 ++---
src/bin/pg_dump/po/ru.po  |  183 ++--
src/bin/pg_dump/po/sv.po  |  238 ++---
src/bin/pg_upgrade/po/ru.po   |   26 +-
src/bin/pg_waldump/po/ru.po   |   76 +-
src/interfaces/libpq/po/ru.po |  154 ++--
12 files changed, 4083 insertions(+), 3993 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: bcdfb83b81a7aa3c3948c0a5221f9c68d7010ac5

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/326431670a876925d699e2be7a216a23ee2d32bf

Modified Files
--
src/backend/po/de.po |  1807 ++--
src/backend/po/fr.po | 16076 ++-
src/backend/po/ja.po | 2 +-
src/backend/po/ko.po | 19063 +++--
src/backend/po/ru.po |  4111 +++
src/backend/po/sv.po |  4370 
src/backend/po/tr.po |  8158 +++---
src/bin/initdb/nls.mk| 2 +-
src/bin/initdb/po/ko.po  |  1018 ++
src/bin/initdb/po/uk.po  |   925 ++
src/bin/pg_archivecleanup/nls.mk | 2 +-
src/bin/pg_archivecleanup/po/fr.po   | 2 +-
src/bin/pg_archivecleanup/po/ko.po   |   179 +
src/bin/pg_archivecleanup/po/uk.po   |   161 +
src/bin/pg_basebackup/nls.mk | 2 +-
src/bin/pg_basebackup/po/fr.po   |  1706 +++
src/bin/pg_basebackup/po/ko.po   |  1508 +++
src/bin/pg_checksums/nls.mk  | 2 +-
src/bin/pg_checksums/po/fr.po|   328 +
src/bin/pg_checksums/po/ko.po|   318 +
src/bin/pg_config/po/ko.po   |67 +-
src/bin/pg_controldata/po/ko.po  |   259 +-
src/bin/pg_ctl/po/de.po  |   275 +-
src/bin/pg_ctl/po/fr.po  |   477 +-
src/bin/pg_ctl/po/ko.po  |   479 +-
src/bin/pg_ctl/po/ru.po  |   275 +-
src/bin/pg_ctl/po/sv.po  |   347 +-
src/bin/pg_dump/nls.mk   | 2 +-
src/bin/pg_dump/po/fr.po |  3175 ++
src/bin/pg_dump/po/ko.po |  2808 +
src/bin/pg_dump/po/ru.po |   164 +-
src/bin/pg_resetwal/nls.mk   | 2 +-
src/bin/pg_resetwal/po/fr.po |   785 ++
src/bin/pg_resetwal/po/ko.po |   657 ++
src/bin/pg_rewind/nls.mk | 2 +-
src/bin/pg_rewind/po/fr.po   |   990 ++
src/bin/pg_rewind/po/ko.po   |   855 ++
src/bin/pg_rewind/po/ru.po   |30 +-
src/bin/pg_test_fsync/po/fr.po   | 2 +-
src/bin/pg_test_fsync/po/ko.po   |98 +-
src/bin/pg_test_timing/po/fr.po  | 2 +-
src/bin/pg_test_timing/po/ko.po  | 8 +-
src/bin/pg_upgrade/po/fr.po  |  1009 +-
src/bin/pg_upgrade/po/ko.po  |   717 +-
src/bin/pg_upgrade/po/ru.po  |   155 +-
src/bin/pg_upgrade/po/sv.po  |   224 +-
src/bin/pg_waldump/nls.mk| 2 +-
src/bin/pg_waldump/po/fr.po  |   212 +-
src/bin/pg_waldump/po/ko.po  |   313 +
src/bin/pg_waldump/po/ru.po  |78 +-
src/bin/psql/nls.mk  | 2 +-
src/bin/psql/po/fr.po| 2 +-
src/bin/psql/po/ko.po|  6376 +++
src/bin/psql/po/uk.po|  4354 
src/bin/scripts/nls.mk   | 2 +-
src/bin/scripts/po/fr.po |  1278 +++
src/bin/scripts/po/ko.po |  1117 ++
src/interfaces/ecpg/ecpglib/po/fr.po | 2 +-
src/interfaces/ecpg/ecpglib/po/ko.po |12 +-
src/interfaces/ecpg/ecpglib/po/ru.po | 4 +-
src/interfaces/ecpg/preproc/po/fr.po | 2 +-
src/interfaces/ecpg/preproc/po/ko.po |   205 +-
src/interfaces/ecpg/preproc/po/uk.po |   176 +-
src/interfaces/libpq/po/fr.po|   499 +-
src/interfaces/libpq/po/ko.po|   537 +-
src/interfaces/libpq/po/ru.po|   211 +-
src/pl/plperl/po/ko.po   |99 +-
src/pl/plpgsql/src/po/ko.po  |   425 +-
src/pl/plpgsql/src/po/ru.po  |16 +-
src/pl/plpython/po/ko.po |   208 +-
src/pl/tcl/po/ko.po  |47 +-
71 files changed, 58994 insertions(+), 30789 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: cde576a776a749a424b649f24259486752c7884d

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a6e11f4a1a5967d2f06fe48716141bf25ae623df

Modified Files
--
src/backend/po/de.po  |  892 +-
src/backend/po/fr.po  | 3741 +
src/backend/po/ru.po  | 1593 +-
src/bin/pg_ctl/po/ru.po   |2 +-
src/bin/pg_dump/po/fr.po  |  585 +++
src/bin/pg_dump/po/ru.po  |  253 +--
src/interfaces/libpq/po/ru.po |  142 +-
7 files changed, 3629 insertions(+), 3579 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: f6ff77b5adca07948a26a4d512ba339243ecacab

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/384ecd6efed809fecce08224c7cd37241cc0c602

Modified Files
--
src/backend/po/de.po  |  922 -
src/backend/po/fr.po  | 4206 +
src/backend/po/ru.po  | 1676 
src/backend/po/sv.po  | 1575 +++
src/bin/pg_ctl/po/ru.po   |2 +-
src/bin/pg_dump/po/fr.po  |  641 +++
src/bin/pg_dump/po/ru.po  |  271 +--
src/bin/pg_dump/po/sv.po  |  362 ++--
src/interfaces/libpq/po/ru.po |  142 +-
9 files changed, 4935 insertions(+), 4862 deletions(-)



pgsql: Translation updates

2020-02-10 Thread Peter Eisentraut
Translation updates

Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: 85c682262712155b8026c05a3b09066e85a6af98

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/c59b0be9885b40e1a555ece5d3d848575542ee8d

Modified Files
--
src/backend/po/de.po  | 1453 ++--
src/backend/po/fr.po  | 2058 +
src/backend/po/ja.po  |2 +-
src/backend/po/ru.po  | 2277 +-
src/backend/po/sv.po  |  +-
src/backend/po/tr.po  | 5119 +
src/bin/pg_ctl/po/de.po   |4 +-
src/bin/pg_ctl/po/ru.po   |2 +-
src/bin/pg_dump/po/fr.po  |  761 +++---
src/bin/pg_dump/po/ru.po  |  183 +-
src/bin/pg_dump/po/sv.po  |  366 +--
src/bin/pg_upgrade/po/ru.po   |   26 +-
src/bin/pg_waldump/po/ru.po   |   76 +-
src/interfaces/libpq/po/ru.po |  154 +-
src/pl/plpgsql/src/po/ru.po   |   10 +-
15 files changed, 7412 insertions(+), 7301 deletions(-)