Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Fabien COELHO
Hello Dagfinn, The attached patch applies cleanly, doc generation is ok. I'm ok with adding such links systematically. makes the first mention of another system catalog or view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier navigation. Why only the first mention? It se

Re: suggest to rename enable_incrementalsort

2020-06-21 Thread Julien Rouhaud
On Sun, Jun 21, 2020 at 8:26 AM Peter Eisentraut wrote: > > I suggest to rename enable_incrementalsort to enable_incremental_sort. > This is obviously more readable and also how we have named recently > added multiword planner parameters. > > See attached patch. +1, this is a way better name (and

tag typos in "catalog.sgml"

2020-06-21 Thread Fabien COELHO
Hello, While reviewing a documentation patch, I noticed that a few tags where wrong in "catalog.sgml". Attached patch fixes them. -- Fabien.diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 700271fd40..5a66115df1 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/s

Missing "Up" navigation link between parts and doc root?

2020-06-21 Thread Fabien COELHO
Hello devs, I've been annoyed that the documentation navigation does not always has an "Up" link. It has them inside parts, but the link disappears and you have to go for the "Home" link which is far on the right when on the root page of a part? Is there a good reason not to have the "Up"

Raising stop and warn limits

2020-06-21 Thread Noah Misch
In brief, I'm proposing to raise xidWrapLimit-xidStopLimit to 3M and xidWrapLimit-xidWarnLimit to 40M. Likewise for mxact counterparts. PostgreSQL has three "stop limit" values beyond which only single-user mode will assign new values of a certain counter: - xidStopLimit protects pg_xact, pg_co

Re: pg_regress cleans up tablespace twice.

2020-06-21 Thread Michael Paquier
On Sun, Jun 21, 2020 at 12:08:37PM +1200, Thomas Munro wrote: > I'm not sure what needs to change, but in the meantime I told it to > comment out the offending test from the schedule files: > > +before_test: > + - 'perl -p -i.bak -e "s/^test: tablespace/#test: tablespace/" > src/test/regress/seri

Re: new heapcheck contrib module

2020-06-21 Thread Dilip Kumar
On Sat, Jun 13, 2020 at 2:36 AM Mark Dilger wrote: > > > > > On Jun 11, 2020, at 11:35 PM, Dilip Kumar wrote: > > > > On Fri, Jun 12, 2020 at 12:40 AM Mark Dilger > > wrote: > >> > >> > >> > >>> On Jun 11, 2020, at 9:14 AM, Dilip Kumar wrote: > >>> > >>> I have just browsed through the patch an

Re: tag typos in "catalog.sgml"

2020-06-21 Thread Michael Paquier
On Sun, Jun 21, 2020 at 09:10:35AM +0200, Fabien COELHO wrote: > While reviewing a documentation patch, I noticed that a few tags where wrong > in "catalog.sgml". Attached patch fixes them. Good catches, thanks Fabien. I will fix that tomorrow or so. -- Michael signature.asc Description: PGP si

Re: pg_regress cleans up tablespace twice.

2020-06-21 Thread Thomas Munro
On Sun, Jun 21, 2020 at 8:42 PM Michael Paquier wrote: > On Sun, Jun 21, 2020 at 12:08:37PM +1200, Thomas Munro wrote: > > I'm not sure what needs to change, but in the meantime I told it to > > comment out the offending test from the schedule files: > > > > +before_test: > > + - 'perl -p -i.bak

Re: suggest to rename enable_incrementalsort

2020-06-21 Thread Tomas Vondra
On Sun, Jun 21, 2020 at 09:05:32AM +0200, Julien Rouhaud wrote: On Sun, Jun 21, 2020 at 8:26 AM Peter Eisentraut wrote: I suggest to rename enable_incrementalsort to enable_incremental_sort. This is obviously more readable and also how we have named recently added multiword planner parameters.

Re: [PATCH] Initial progress reporting for COPY command

2020-06-21 Thread Josef Šimánek
po 15. 6. 2020 v 2:18 odesílatel Michael Paquier napsal: > Hi Josef, > > On Sun, Jun 14, 2020 at 02:32:33PM +0200, Josef Šimánek wrote: > > Hello, as proposed by Pavel Stěhule and discussed on local czech > PostgreSQL > > maillist ( > > > https://groups.google.com/d/msgid/postgresql-cz/CAFj8pRCZ4

Re: [PATCH] Initial progress reporting for COPY command

2020-06-21 Thread Josef Šimánek
po 15. 6. 2020 v 6:39 odesílatel Fujii Masao napsal: > > > On 2020/06/14 21:32, Josef Šimánek wrote: > > Hello, as proposed by Pavel Stěhule and discussed on local czech > PostgreSQL maillist ( > https://groups.google.com/d/msgid/postgresql-cz/CAFj8pRCZ42CBCa1bPHr7htffSV%2BNAcgcHHG0dVqOog4bsu2LFw

Re: [PATCH] Initial progress reporting for COPY command

2020-06-21 Thread Josef Šimánek
po 15. 6. 2020 v 2:18 odesílatel Michael Paquier napsal: > Hi Josef, > > On Sun, Jun 14, 2020 at 02:32:33PM +0200, Josef Šimánek wrote: > > Hello, as proposed by Pavel Stěhule and discussed on local czech > PostgreSQL > > maillist ( > > > https://groups.google.com/d/msgid/postgresql-cz/CAFj8pRCZ4

Re: [PATCH] Initial progress reporting for COPY command

2020-06-21 Thread Josef Šimánek
po 15. 6. 2020 v 7:34 odesílatel Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> napsal: > > I'm using ftell to get current position in file to populate > file_bytes_processed without error handling (ftell can return -1L and also > populate errno on problems). > > > > 1. Is that a good

Re: Possible NULL pointer deferenced (src/interfaces/libpq/fe-exec.c (line 563)

2020-06-21 Thread Ranier Vilela
Em dom., 21 de jun. de 2020 às 02:16, Tom Lane escreveu: > Ranier Vilela writes: > > The res->curBlock pointer possibly, can be NULL here (line 563). > > No, it can't. > > To get to that line, nBytes has to be > 0, which means res->spaceLeft > has to be > 0, which cannot happen while res->curBlo

Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Dagfinn Ilmari Mannsåker
Hi Fabien, Fabien COELHO writes: >> It's the first mention in the introductory paragraph of _each_ catalog >> table/view page, not the first mention in the entire catalogs.sgml file. >> E.g. https://www.postgresql.org/docs/current/catalog-pg-aggregate.html >> has two mentions of pg_proc one word

Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Tom Lane
Fabien COELHO writes: >> I didn't think there was much point in linkifying both in that case, and >> other similar situations. > The point is that the user reads a sentence, attempts to jump but > sometimes can't, because the is not the first occurrence. I'd go for all > mentions of another rel

vs for command line tools in the docs

2020-06-21 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, While I was looking at linkifying SQL commands in the system catalog docs, I noticed that catalog.sgml uses the tag to refer to initdb, while I'd expected it to use . Looking for patterns, I grepped for the two tags with contents consisting only of lower-case letters, numbers, hyphen

Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Alvaro Herrera
On 2020-Jun-21, Tom Lane wrote: > That has not been our practice up to now, eg in comparable cases in > discussions of GUC variables, only the first reference is xref-ified. > I think it could be kind of annoying to make every reference a link, > both for regular readers (the link decoration is to

Re: vs for command line tools in the docs

2020-06-21 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > While I was looking at linkifying SQL commands in the system catalog > docs, I noticed that catalog.sgml uses the tag to refer to > initdb, while I'd expected it to use . I agree that the latter is what we generally use.

vs formatting in the docs

2020-06-21 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, While looking at making more SQL into links, I noticed that loses the monospace formatting of , and can't itself be wrapped in . This becomes particularly apparent when you have one link that can be an next to another that's ... because it's actually referring to a specific variant

Re: vs formatting in the docs

2020-06-21 Thread Alvaro Herrera
On 2020-Jun-21, Dagfinn Ilmari Mannsåker wrote: > While looking at making more SQL into links, I > noticed that loses the monospace formatting of , and > can't itself be wrapped in . Ouch. > By some trial and error I found that putting inside the > tag propagates the formatting to the conten

Re: vs for command line tools in the docs

2020-06-21 Thread Chapman Flack
On 06/21/20 11:16, Tom Lane wrote: > ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >> docs, I noticed that catalog.sgml uses the tag to refer to >> initdb, while I'd expected it to use . > > I agree that the latter is what we generally use. 'The latter' is in the Subject

Re: vs formatting in the docs

2020-06-21 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > On 2020-Jun-21, Dagfinn Ilmari Mannsåker wrote: > >> While looking at making more SQL into links, I >> noticed that loses the monospace formatting of , and >> can't itself be wrapped in . > > Ouch. > >> By some trial and error I found that putting inside the >> tag pro

Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical () at walsender.c:2762

2020-06-21 Thread Jonathan S. Katz
Hi, On 6/5/20 11:51 AM, Alvaro Herrera wrote: > On 2020-Jun-05, Dave Cramer wrote: > >> On Thu, 4 Jun 2020 at 19:46, Alvaro Herrera >> wrote: > >>> Ouch ... so they made IDENT in the replication grammar be a trigger to >>> enter the regular grammar. Crazy. No way to put those worms back in >>

Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > On 2020-Jun-21, Tom Lane wrote: > >> That has not been our practice up to now, eg in comparable cases in >> discussions of GUC variables, only the first reference is xref-ified. >> I think it could be kind of annoying to make every reference a link, >> both for regular re

Re: [PATCH] Add support for choosing huge page size

2020-06-21 Thread Odin Ugedal
> Documentation syntax error "2MB" shows up as: Ops, sorry, should be fixed now. > The build is currently failing on Windows: Ahh, thanks. Looks like the Windows stuff isn't autogenerated, so maybe this new patch works.. > When using huge_pages=on, huge_page_size=1GB, but default shared_buffers

Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical () at walsender.c:2762

2020-06-21 Thread Andres Freund
Hi, On 2020-06-21 13:45:36 -0400, Jonathan S. Katz wrote: > The PG13 RMT had a discussion about this thread, and while the initial > crash has been fixed, we decided to re-open the Open Item around whether > we should allow physical replication to be initiated in a logical > replication session.

Re: [PATCH] Add support for choosing huge page size

2020-06-21 Thread Andres Freund
Hi, On 2020-06-18 16:00:49 +1200, Thomas Munro wrote: > Unfortunately I can't access the TLB miss counters on this system due > to virtualisation restrictions, and the systems where I can don't have > 1GB pages. According to cpuid(1) this system has a fairly typical > setup: > >cache and TLB

Re: [PATCH] Missing links between system catalog documentation pages

2020-06-21 Thread Fabien COELHO
Hello Tom, I didn't think there was much point in linkifying both in that case, and other similar situations. The point is that the user reads a sentence, attempts to jump but sometimes can't, because the is not the first occurrence. I'd go for all mentions of another relation should be li

Re: Parallel Seq Scan vs kernel read ahead

2020-06-21 Thread David Rowley
On Sat, 20 Jun 2020 at 08:00, Robert Haas wrote: > > On Thu, Jun 18, 2020 at 10:10 PM David Rowley wrote: > > Here's a patch which caps the maximum chunk size to 131072. If > > someone doubles the page size then that'll be 2GB instead of 1GB. I'm > > not personally worried about that. > > Maybe

Re: suggest to rename enable_incrementalsort

2020-06-21 Thread David Rowley
On Sun, 21 Jun 2020 at 23:22, Tomas Vondra wrote: > > On Sun, Jun 21, 2020 at 09:05:32AM +0200, Julien Rouhaud wrote: > >On Sun, Jun 21, 2020 at 8:26 AM Peter Eisentraut > > wrote: > >> > >> I suggest to rename enable_incrementalsort to enable_incremental_sort. > >> This is obviously more readable

Get rid of runtime handling of AlternativeSubPlan?

2020-06-21 Thread Tom Lane
Back in bd3daddaf232d95b0c9ba6f99b0170a0147dd8af, which introduced AlternativeSubPlans, I wrote: There is a lot more that could be done based on this infrastructure: in particular it's interesting to consider switching to the hash plan if we start out using the non-hashed plan but find a

Re: Get rid of runtime handling of AlternativeSubPlan?

2020-06-21 Thread David Rowley
On Mon, 22 Jun 2020 at 12:20, Tom Lane wrote: > > Back in bd3daddaf232d95b0c9ba6f99b0170a0147dd8af, which introduced > AlternativeSubPlans, I wrote: > > There is a lot more that could be done based on this infrastructure: in > particular it's interesting to consider switching to the hash plan

Re: Improve planner cost estimations for alternative subplans

2020-06-21 Thread Tom Lane
I wrote: > Nope. The entire reason why we have that kluge is that we don't know > until much later how many times we expect to execute the subplan. > AlternativeSubPlan allows the decision which subplan form to use to be > postponed till runtime; but when we're doing things like estimating the > c

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-06-21 Thread Justin Pryzby
On Sun, Jun 07, 2020 at 10:07:19AM +0200, Fabien COELHO wrote: > Hello Justin, > > Rebased onto 7b48f1b490978a8abca61e9a9380f8de2a56f266 and renumbered OIDs. Rebased again on whatever broke func.sgml. > pg_stat_file() and pg_stat_dir_files() now return a char type, as well as > the function which

Re: [PATCH] Initial progress reporting for COPY command

2020-06-21 Thread Fujii Masao
On 2020/06/21 20:33, Josef Šimánek wrote: po 15. 6. 2020 v 6:39 odesílatel Fujii Masao mailto:masao.fu...@oss.nttdata.com>> napsal: On 2020/06/14 21:32, Josef Šimánek wrote: > Hello, as proposed by Pavel Stěhule and discussed on local czech PostgreSQL maillist (https://groups.g

Re: Resetting spilled txn statistics in pg_stat_replication

2020-06-21 Thread Amit Kapila
On Sun, Jun 21, 2020 at 3:27 AM Tomas Vondra wrote: > > On Thu, Jun 18, 2020 at 12:21:17PM +0530, Amit Kapila wrote: > >On Thu, Jun 18, 2020 at 8:01 AM Masahiko Sawada > > wrote: > >> > >> On Wed, 17 Jun 2020 at 20:14, Amit Kapila wrote: > >> > > >> > > >> > I had written above in the context of

Re: Resetting spilled txn statistics in pg_stat_replication

2020-06-21 Thread Amit Kapila
On Mon, Jun 22, 2020 at 8:22 AM Amit Kapila wrote: > > On Sun, Jun 21, 2020 at 3:27 AM Tomas Vondra > wrote: > > > > On Thu, Jun 18, 2020 at 12:21:17PM +0530, Amit Kapila wrote: > > >On Thu, Jun 18, 2020 at 8:01 AM Masahiko Sawada > > > wrote: > > >> > > >> On Wed, 17 Jun 2020 at 20:14, Amit Kapi

proposal: unescape_text function

2020-06-21 Thread Pavel Stehule
Hi There is one user request for unescape function in core. https://stackoverflow.com/questions/20124393/convert-escaped-unicode-character-back-to-actual-character-in-postgresql/20125412?noredirect=1#comment110502526_20125412 This request is about possibility that we do with string literal via f

Re: Add support for INDEX_CLEANUP and TRUNCATE to vacuumdb

2020-06-21 Thread Michael Paquier
On Fri, Jun 19, 2020 at 10:57:01AM +0900, Michael Paquier wrote: > Thanks. This flavor looks good to me in terms of code, and the test > coverage is what's needed for all the code paths added. This version > is using my suggestion of upthread for the option names: --no-truncate > and --no-index-c

Re: tag typos in "catalog.sgml"

2020-06-21 Thread Michael Paquier
On Sun, Jun 21, 2020 at 07:31:16PM +0900, Michael Paquier wrote: > Good catches, thanks Fabien. I will fix that tomorrow or so. And applied to HEAD. -- Michael signature.asc Description: PGP signature

Re: I'd like to discuss scaleout at PGCon

2020-06-21 Thread Sumanta Mukherjee
Hi, I read through the symfora paper and it is a nice technique. I am not very sure about where Hyder is used commercially but given that it has come out of Microsoft Research so some microsoft products might be using it/some of these concepts already. With Regards, Sumanta Mukherjee. EnterpriseD

Backpatch b61d161c14

2020-06-21 Thread Amit Kapila
I propose to backpatch b61d161c14 [1] (Introduce vacuum errcontext to display additional information.). In the recent past, we have seen an error report similar to "ERROR: found xmin 2157740646 from before relfrozenxid 1197" from multiple EDB customers. A similar report is seen on pgsql-bugs as w

Re: Failures with wal_consistency_checking and 13~

2020-06-21 Thread Michael Paquier
On Sat, Jun 20, 2020 at 05:43:19PM +0300, Alexander Korotkov wrote: > I have discovered and fixed the issue in a44dd932ff. spg_mask() > masked unused space only when pagehdr->pd_lower > > SizeOfPageHeaderData. But during the vacuum regression tests, one > page has been erased completely and pageh

Re: min_safe_lsn column in pg_replication_slots view

2020-06-21 Thread Michael Paquier
On Sat, Jun 20, 2020 at 03:53:54PM +0900, Michael Paquier wrote: > On Sat, Jun 20, 2020 at 09:45:52AM +0530, Amit Kapila wrote: >> Isn't this information specific to checkpoints, so maybe better to >> display in view pg_stat_bgwriter? > > Not sure that's a good match. If we decide to expose that,

Re: Parallel Seq Scan vs kernel read ahead

2020-06-21 Thread David Rowley
On Mon, 22 Jun 2020 at 16:54, David Rowley wrote: > I also tested this an AMD machine running Ubuntu 20.04 on kernel > version 5.4.0-37. I used the same 100GB table I mentioned in [1], but > with the query "select * from t where a < 0;", which saves having to > do any aggregate work. I just want

[PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-06-21 Thread Bharath Rupireddy
Hi, When a query on foreign table is executed from a local session using postgres_fdw, as expected the local postgres backend opens a connection which causes a remote session/backend to be opened on the remote postgres server for query execution. One observation is that, even after the query is f

Re: [POC] Fast COPY FROM command for the table with foreign partitions

2020-06-21 Thread Andrey Lepikhov
19.06.2020 19:58, Etsuro Fujita пишет: On Tue, Jun 2, 2020 at 2:51 PM Andrey Lepikhov wrote: Hiding the COPY code under the buffers management machinery allows us to generalize buffers machinery, execute one COPY operation on each buffer and simplify error handling. I'm not sure that it's r

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-06-21 Thread Dilip Kumar
On Tue, Jun 16, 2020 at 2:37 PM Amit Kapila wrote: > > On Mon, Jun 15, 2020 at 6:29 PM Amit Kapila wrote: > > > > I have few more comments on the patch > > 0013-Change-buffile-interface-required-for-streaming-.patch: > > > > Review comments on 0014-Worker-tempfile-use-the-shared-buffile-infrastru

Testing big endian code with Travis CI's new s390x support

2020-06-21 Thread Thomas Munro
Hi, This is something I've wanted several times in the past, so I thought others here could be interested: if you're looking for a way to run your development branch through check-world on a big endian box, the new s390x support[1] on Travis is good for that. Capacity is a bit limited, so I don'

pg_resetwal --next-transaction-id may cause database failed to restart.

2020-06-21 Thread movead...@highgo.ca
hello hackers, When I try to use pg_resetwal tool to skip some transaction ID, I get a problem that is the tool can accept all transaction id I offered with '-x' option, however, the database may failed to restart because of can not read file under $PGDATA/pg_xact. For example, the 'NextXID' in