Re: Update limitations for declarative partitioning
On Mon, Aug 31, 2020 at 11:18:55AM +0900, Michael Paquier wrote: > Indeed, there is no fix in the code tree. Alvaro? If there is no > update, I'll go fix that myself. For the archives: this has been done with 97dc0d1. (Thanks, Alvaro!) -- Michael signature.asc Description: PGP signature
Re: small clairifcation
On Thu, Aug 27, 2020 at 09:51:49PM -0700, David G. Johnston wrote: > On Thu, Aug 27, 2020 at 6:17 PM Tom Lane wrote: > > PG Doc comments form writes: > > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.5/ssh-tunnels.html > > Description: > > > "The first number in the -L argument, 6, is the port number of your > end > > of the tunnel; it can be any unused port. (IANA reserves ports 49152 > through > > 65535 for private use.) The second number, 5432, is the remote end of > the > > tunnel: the port number your server is using. " > > > as a beginner This took me some time to understand what do you mean by > "your > > server" "your end of the tunnel " > > Hm, do you have a suggestion for better wording? > > > > I agree on the need for a different perspective here since it reads just fine > once you know what it is talking about. > > But absent that maybe a slightly more tutorial flow would be good. I didn't think a tutorial flow was the right thing to here, so I reworded the section to be more details and have a clearer flow --- patch attached. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 6cda39f3ab..bc68ddc94b 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -2548,34 +2548,39 @@ openssl x509 -req -in server.csr -text -days 365 \ First make sure that an SSH server is running properly on the same machine as the PostgreSQL server and that you can log in using - ssh as some user. Then you can establish a secure - tunnel with a command like this from the client machine: + ssh as some user; you then can establish a + secure tunnel to the remote server. A secure tunnel listens on a + local port and forwards all traffic to a port on the remote machine. + Traffic sent to the remote port can arrive on its + localhost address, or different bind + address if desired; it does not appear as coming from your + local machine. This command creates a secure tunnel from the client + machine to the remote machine foo.com: ssh -L 6:localhost:5432 j...@foo.com The first number in the -L argument, 6, is the - port number of your end of the tunnel; it can be any unused port. - (IANA reserves ports 49152 through 65535 for private use.) The - second number, 5432, is the remote end of the tunnel: the port - number your server is using. The name or IP address between the - port numbers is the host with the database server you are going to - connect to, as seen from the host you are logging in to, which - is foo.com in this example. In order to connect - to the database server using this tunnel, you connect to port 6 - on the local machine: + local port number of the tunnel; it can be any unused port. (IANA + reserves ports 49152 through 65535 for private use.) The name or IP + address after this is the remote bind address you are connecting to, + i.e., localhost, which is the default. The second + number, 5432, is the remote end of the tunnel, e.g., the port number + your database server is using. In order to connect to the database + server using this tunnel, you connect to port 6 on the local + machine: psql -h localhost -p 6 postgres - To the database server it will then look as though you are really + To the database server it will then look as though you are user joe on host foo.com - connecting to localhost in that context, and it + connecting to the localhost bind address, and it will use whatever authentication procedure was configured for - connections from this user and host. Note that the server will not + connections by that user to that bind address. Note that the server will not think the connection is SSL-encrypted, since in fact it is not encrypted between the SSH server and the PostgreSQL server. This should not pose any - extra security risk as long as they are on the same machine. + extra security risk because they are on the same machine. @@ -2587,12 +2592,12 @@ psql -h localhost -p 6 postgres - You could also have set up the port forwarding as + You could also have set up port forwarding as ssh -L 6:foo.com:5432 j...@foo.com but then the database server will see the connection as coming in - on its foo.com interface, which is not opened by + on its foo.com bind address, which is not opened by the default setting listen_addresses = 'localhost'. This is usually not what you want.
Re: Add comma after e.g. and i.e.?
On Wed, Aug 26, 2020 at 10:38:30PM -0400, Bruce Momjian wrote: > On Tue, Aug 25, 2020 at 03:27:33PM -0400, Bruce Momjian wrote: > > I wasn't worried about enforcing going forward, but rather if we should > > make what we have now consistent. > > I plan to move forward with this, and will backpatch it so later patches > are easier to apply. I think we are fine with adding inconsistent > usages over time --- this is probably only something we will address in > mass every 10 years or so. Done. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: ALTER SYSTEM between upgrades
On Wed, Aug 26, 2020 at 12:22:25AM +0200, Daniel Gustafsson wrote: > >> One can argue whether those bulletpoints are sufficient for stressing the > >> importance, but it's at least mentioned. There is however no mention of > >> postgresql.auto.conf which clearly isn't helping anyone, so we should fix > >> that. > >> > >> Taking that a step further, maybe we should mention additional config files > >> which could be included via include directives? There are tools out there > >> who > >> avoid changing the users postgresql.conf by injecting an include directive > >> instead; they might've placed the included file alongside postgresql.conf. > > > > I have developed the attached pg_upgrade doc patch to address this. > > LGTM, thanks! Patch applied, -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: 35.9.2. Base Types in C-Language Functions
On Wed, Aug 26, 2020 at 07:09:04PM -0400, Bruce Momjian wrote: > On Wed, Aug 26, 2020 at 01:59:42PM +, PG Doc comments form wrote: > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/12/xfunc-c.html > > Description: > > > > In "Table 35-1. Equivalent C Types for Built-in SQL Types", when SQL type is > > "timestamp", the C type is reported to be "Timestamp * ", whereas it is > > actually "Timestamp". I experienced it in version 9.3 but I guess it is also > > the case in current version. > > Ah, yes, you are right --- Timestamp is an int64. I will fix that with > the attatched patch. Patch applied. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Create a Foreign Table for PostgreSQL CSV Logs
On Sat, Aug 22, 2020 at 01:51:56PM -0400, Bruce Momjian wrote: > On Fri, Aug 21, 2020 at 08:41:54PM -0700, David G. Johnston wrote: > > On Fri, Aug 21, 2020 at 2:58 PM Bruce Momjian wrote: > > Good idea. People have been confused about this before. Attached is a > > patch. > > > > > > + It is also possible to access the file as a foreign data wrapper > > + using . > > > > Seems more accurate to say "It is also possible to access the file as a > > foreign > > table, using the supplied module." > > > > The file_fdw -> config change looks good. > > OK, updated patch attached. Patch applied. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Openssl v3_ca
On Mon, Aug 24, 2020 at 04:52:24PM -0400, Bruce Momjian wrote: > > While true, there's certainly other reasons why someone might want to > > run intermediate CAs.. I'm not sure that we really need to go into the > > discussion about why they make sense to have. > > Agreed. If we wanted to get into that, we would need to make a new doc > section about it. Applied. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: "stable storage"
On Fri, Aug 21, 2020 at 11:44:44PM -0400, Stephen Frost wrote: > Greetings, > > * Peter Geoghegan (p...@bowt.ie) wrote: > > On Fri, Aug 21, 2020 at 3:12 PM Bruce Momjian wrote: > > > > Is "stable storage" the same as "durable storage"? Should we rename > > > > "stable storage" mentions to "durable storage"? > > > > > > I have developed the attached doc patch to change "stable storage" to > > > "durable storage". > > > > I agree that this is an improvement. The word "durable" is more > > descriptive than "stable". (The word "stable" might be more > > recognizable, but that in itself doesn't make the text any clearer.) > > +1. > > Thanks, Applied. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Subscript expressions do not have to evaluate to integers
On Sat, Aug 22, 2020 at 01:34:35PM -0700, David G. Johnston wrote: > On Sat, Aug 22, 2020 at 8:47 AM Bruce Momjian wrote: > > On Fri, Aug 21, 2020 at 07:21:30PM -0700, David G. Johnston wrote: > > On Fri, Aug 21, 2020 at 6:22 PM Tom Lane wrote: > > > > Bruce Momjian writes: > > > On Wed, Jul 22, 2020 at 02:59:18AM +, PG Doc comments form > wrote: > > >> I believe a more appropriate statement would acknowledge that at > least > > some > > >> values undergo an explicit-style conversion to an integer. > > > > > OK, how is the attached patch? > > > > "and" is not an improvement over "which". Otherwise seems OK. > > OK, done in the attached patch. > > > Works for me. Patch applied. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Typo in the Section "3.6. Inheritance"
On Fri, Aug 21, 2020 at 07:09:31PM -0700, David G. Johnston wrote: > On Fri, Aug 21, 2020 at 4:36 PM Bruce Momjian wrote: > > On Wed, Aug 5, 2020 at 11:29:31PM -0700, David G. Johnston wrote: > > > Removing "char" from the tutorial is a nice side-effect that we probably > want > > to do even if we keep "state". > > I think CHAR(2) is fine because it is always 2 characters. > > > You imply "it is always two non-blank characters" though that isn't what CHAR > (2) means. Adding CHECK (state ~ '^[A-Z]{2}$') and leaving the type as text > would be best from a pure model perspective - but this isn't the place to > teach > that and for the same reason char(2) isn't terrible. > > > How is the attached patch, based on your suggestions? > > > Works for me. Patch applied back through 9.5. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Procedures
On Tue, Aug 25, 2020 at 03:03:13PM -0400, Bruce Momjian wrote: > On Tue, Aug 25, 2020 at 08:38:11PM +0200, Peter Eisentraut wrote: > > On 2020-08-24 18:00, Bruce Momjian wrote: > > > -command, a procedure is called explicitly using > > > -the statement. > > > +command, a procedure is called in isolation using > > > +the command. If the CALL command is not > > > +part of an explicit transaction, a procedure can commit, rollback, > > > +and begin new transactions during its execution, which is not > > > possible > > > +in functions. > > > > There are additional conditions for when a procedure can do transaction > > control, and it also depends on the language. It's not clear how much > > detail we should give in a general section like this. Often people read > > this and then wonder why it doesn't work. > > I have updated the patch to mention it is dependend on the server-side > language. Patch applied back through PG 11. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: Installation on Cygwin
On Fri, Aug 28, 2020 at 09:40:59PM +0200, Daniel Gustafsson wrote: > I happened to stumble over the Cygwin section of the installation docs, and > was > surprised to see references to not entirely bleeding-edge Windows versions: > > "The adduser command is not supported; use the appropriate user management > application on Windows NT, 2000, or XP. Otherwise, skip this step." > > Not knowing the first thing about Cygwin I might be out cycling here; it does > sound like it's about due for an update to reflect current versions of > Windows, > or is this just relevant for older versions? Skimming backwards we have, with > various wordings, recommendeed against Cygwin since 8.0, the current wording > going back to 8.4 more or less unchanged. I am thinking the list of operating systems should just be removed. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Re: initdb - creating clusters
On 30.08.20 17:21, Tom Lane wrote: Do you have a feeling one way or the other about whether to repeat some of this text in each of the relevant sub-sections? I initially didn't want to do that, but thinking about how people consume the HTML docs, I'm afraid that anything not appearing on the same page won't get seen. If we do so but avoid redundant text parts, we can use the entity mechanism or the more modern XInclude mechanism. The attached patch uses both techniques in an example file: brin.sgml includes lorem.sgml two times. (In both cases we should avoid files with multiple root elements, eg. multiple or without a parent element, because this would violate the well-formed-ness of the included XML document.) -- J. Purtz diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 0401a515df..562f607190 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -132,8 +132,8 @@ endif html: html-stamp html-stamp: stylesheet.xsl postgres.sgml $(ALLSGML) $(ALL_IMAGES) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) cp $(ALL_IMAGES) html/ cp $(srcdir)/stylesheet.css html/ touch $@ @@ -167,12 +167,12 @@ postgres.pdf: XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/' %-A4.fo: stylesheet-fo.xsl %.sgml $(ALLSGML) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_FO_FLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^) %-US.fo: stylesheet-fo.xsl %.sgml $(ALLSGML) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^) %.pdf: %.fo $(ALL_IMAGES) $(FOP) -fo $< -pdf $@ diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index 4420794e5b..ac5ef96173 100644 --- a/doc/src/sgml/brin.sgml +++ b/doc/src/sgml/brin.sgml @@ -11,6 +11,13 @@ Introduction + + via entity mechanism: + + + via xinclude mechanism: + http://www.w3.org/2001/XInclude; href="lorem.sgml" /> + BRIN stands for Block Range Index. BRIN is designed for handling very large tables diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 64b5da0070..2e42197844 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -182,3 +182,5 @@ + + diff --git a/doc/src/sgml/lorem.sgml b/doc/src/sgml/lorem.sgml new file mode 100644 index 00..ffb557bf22 --- /dev/null +++ b/doc/src/sgml/lorem.sgml @@ -0,0 +1,5 @@ + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + An arbitrary xref-link: +