Re: call for applications: mentoring program for code contributors
On 20/06/2024 19:12, Robert Haas wrote: I'm working to start a mentoring program where code contributors can be mentored by current committers. Applications are now open: https://forms.gle/dgjmdxtHYXCSg6aB7 Periodically, someone -- most likely not me, since a few people have been kind enough to offer help -- will contact mentors and mentees to get feedback on how things are going. We'll use this feedback to improve the program, which might involve adjusting mentoring assignments, or might involve taking such other actions as the situation may suggest. I'm offering to help with this part. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: Proposal: Document ABI Compatibility
On 03/06/2024 21:21, David E. Wheeler wrote: On Jun 3, 2024, at 14:58, Andres Freund wrote: Hi, Hello Andres. Are there notes for the session? Yes, but not posted yet. Here’s what Andreas 'ads' Scherbaum sent me for that bit of the conversation: * Core is focused on core ABI stability * David: No "statement of stability" in Core * David/Jeremy/Tom: coding guidelines, style guidelines *useful to have docs in core about what's stable and what's not, what you should compile against or not, and ABI guarantees * Abigale: there are hooks, but no overall concept for extensions * Tom: Peter Eisentraut is working on tests for extensions stability * Jeremy: nothing is preventing people from installing incompatible versions The full "discussion" is here: https://wiki.postgresql.org/wiki/PGConf.dev_2024_Developer_Unconference#Improving_extensions_in_core And the ABI discussion here: https://wiki.postgresql.org/wiki/PGConf.dev_2024_Extension_Summit#ABI.2FAPI_discussion -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Find dangling membership roles in pg_dumpall
Hello, pg_dumpall.c has a function dumpRoleMembership() which dumps all membership roles. This function includes a piece of code which checks if the membership tree has an open end which can't be resolved. However that code is never used. The variable prev_remaining is initially set to 0, and then never changed. Which in turn never executes this code: if (remaining == prev_remaining) because the loop is only entered while "remaining > 0". The attached patch fixes this problem, and updates prev_remaining inside the loop. Co-Author: Artur Zakirov who reviewed the patch. Regards -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 71a1319865..1e2a32c39a 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -1044,6 +1044,9 @@ dumpRoleMembership(PGconn *conn) * graph whose vertices are grants and whose edges point from * grantors to members should be connected and acyclic. If we fail * to make progress, either we or the server have messed up. + * Initially $prev_remaining is 0, while initially $remaining can't + * be 0. If a subsequent loop produces no new results the loop + * aborts here. */ if (remaining == prev_remaining) { @@ -1052,6 +1055,7 @@ dumpRoleMembership(PGconn *conn) PQfinish(conn); exit_nicely(1); } + prev_remaining = remaining; /* Make one pass over the grants for this role. */ for (i = start; i < end; ++i)
Re: generate_series for timestamptz and time zone problem
On 31/01/2023 08:50, Gurjeet Singh wrote: On Mon, Jan 30, 2023 at 4:07 PM Tom Lane wrote: Gurjeet Singh writes: [ generate_series_with_timezone.v6.patch ] The cfbot isn't terribly happy with this. It looks like UBSan is detecting some undefined behavior. Possibly an uninitialized variable? It was the classical case of out-of-bounds access. I was trying to access 4th argument, even in the case where the 3-argument variant of generate_series() was called. Please see attached v7 of the patch. It now checks PG_NARGS() before accessing the optional parameter. This mistake would've been caught early if there were assertions preventing access beyond the number of arguments passed to the function. I'll send the assert_enough_args.patch, that adds these checks, in a separate thread to avoid potentially confusing cfbot. Tested this patch on current head. The patch applies, with a few offsets. Functionality wise it works as documented, also tried with "America/New_York" and "Europe/Berlin" as time zone. The included tests cover both an entire year (including a new year), and also a DST switch (date_add() for 2021-10-31 in Europe/Warsaw, which is the date the country switches to standard time). Minor nitpick: the texts use both "time zone" and "timezone". Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: Make ON_ERROR_STOP stop on shell script failure
On 16/02/2023 20:33, Andreas 'ads' Scherbaum wrote: On 23/11/2022 00:16, Matheus Alcantara wrote: --- Original Message --- On Tuesday, November 22nd, 2022 at 20:10, bt22nakamorit wrote: There was a mistake in the error message for \! so I updated the patch. Best, Tatsuhiro Nakamori Hi I was checking your patch and seems that it failed to be applied into the master cleanly. Could you please rebase it? Was also looking into this patch. Tatsuhiro: can you please send a rebased version? The email address is bouncing. That might be why ... -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: Make ON_ERROR_STOP stop on shell script failure
On 23/11/2022 00:16, Matheus Alcantara wrote: --- Original Message --- On Tuesday, November 22nd, 2022 at 20:10, bt22nakamorit wrote: There was a mistake in the error message for \! so I updated the patch. Best, Tatsuhiro Nakamori Hi I was checking your patch and seems that it failed to be applied into the master cleanly. Could you please rebase it? Was also looking into this patch. Tatsuhiro: can you please send a rebased version? Thanks -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: GSoC 2021 Proposal Document
Hello, On Sat, Apr 17, 2021 at 8:42 PM Nhi Dang wrote: > > Thank you for this document. It looks like there are a couple problems with this - at least if this was intended to be a submission for GSoC 2021: - The deadline for submissions was April 13th ( https://summerofcode.withgoogle.com/dashboard/timeline/ ) - Submissions need to be made using the GSoC website If you still want to work on this - outside of GSoC - I suggest also reading this thread here: https://www.postgresql.org/message-id/CAFwT4nAVEFJQF8nQ%2BmWc6M2Eh8nG2uEhV0bdY7wfaT2aLERUAQ%40mail.gmail.com This discusses a number of suggested changes, and might be useful for your proposal. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: [PATCH] Improvements to "Getting started" tutorial for Google Code-in task
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested This is a documentation update, no code changes. The initial idea came from the Google Code-In project, and the changes were modified and reviewed until the wording is appropriate. The new status of this patch is: Ready for Committer
Re: [PATCH] Improvements to "Getting started" tutorial for Google Code-in task
On 05.11.18 09:22, LAM JUN RONG wrote: New diff is attached. This still has the "hard" in it. Everything else looks fine. Once you changed that, please register the new patch in the Commitfest application. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: [PATCH] Improvements to "Getting started" tutorial for Google Code-in task
On 04.11.18 02:53, LAM JUN RONG wrote: Hi, I have made some changes based on Andreas’ suggestions. > + then one or more of the packages PostgreSQL requires is not installed. > + See for the required packages. > > How about: > then packages which are required to build > PostgreSQL are missing. > See for a list of requirements. This seems better than mine, I have included it. Ok. > If you are not sure whether PostgreSQL > - is already available or whether you can use it for your > - experimentation then you can install it yourself. Doing so is not > + is already available for your experimentation, > + you can install it yourself. Doing so is not > hard and it can be a good exercise. > > This change does not make much sense, given that you leave the > second part of the sentence. How’s this: If you are not sure whether PostgreSQL is already available for your experimentation, you can install it yourself, which is not hard. "you can install it by yourself, which is not complicated"? I don't like the "hard" there. > As is typical of client/server applications, the client and the > - server can be on different hosts. In that case they communicate > + server can be on different machines or networks. In that case they communicate > over a TCP/IP network connection. You should keep this in mind, > I think "hosts" is preferred here. The differentiation between machines > and networks is not necessary. > > > > - The path at your site might be different. Contact your site > + The path at your site's server might be different. Contact your site > administrator or check the installation instructions to > Dunno if this change improves the wording, or the understanding. > How about replacing "site" with "installation"? For the 2 points above, I decided that the original documentation seems fine. Ok. > PostgreSQL allows you to create any > - number of databases at a given site. Database names must have an > - alphabetic first character and are limited to 63 bytes in > - length. A convenient choice is to create a database with the same > - name as your current user name. Many tools assume that database > - name as the default, so it can save you some typing. To create > - that database, simply type: > + number of databases at a given site. Database names are limited to 63 bytes in > + length. Database names longer than 63 bytes will be truncated. A convenient > + choice is to create a database with the same name as your current user name. > + Many tools assume that database name as the default, so it > + can save you some typing. To create that database, simply type: > The part about "truncate" is correct, maybe you can include NAMEDATALEN here as well. > The part about the first character is correct - except you quote the name. > Then any name is allowed. If you rewrite this part, maybe include this as well. I’ve made some changes to include the part about NAMEDATALEN and quoting: However, if you would like to create databases with names that do not start with an alphabetic character, you will need to quote it like so: "1234". Database names are limited to 63 bytes in length. Database names longer than 63 bytes will be truncated. You can change this limit by modifying the NAMEDATALEN variable, but that would require recompiling PostgreSQL. you will need to quote the the identifier, like "1st database". Database names are limited to 63 bytes in length, or more specifically to the length defined in NAMEDATALEN. Changing this value requires recompiling the database. Names which are longer than that are truncated. A convenient choice ... Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: [PATCH] Improvements to "Getting started" tutorial for Google Code-in task
Hello, On 02.11.18 14:07, LAM JUN RONG wrote: I’m a student taking part in Google Code-in 2018. The <http://Code-in 2018. The> task I am currently working on, https://codein.withgoogle.com/dashboard/task-instances/6406170207059968/, requires that I review and improve the “Getting Started” tutorial in the PostgreSQL docs, and submit a patch to this mailing list. Thank you for picking up this task. After reviewing the documentation, I found some parts to be slightly unclear. For example, in section 1.3 on creating databases, I found “no response” a bit unclear or ambiguous, so I replaced it with “exit without any error messages”. After some experimentation, I found that a part of the documentation was incorrect. In Section 1.3, it was stated that “Database names must have an alphabetic first character”. However, I was able to create databases with names like “1234”, “$” or even “😀😀”. Hence, I decided to remove that sentence. A diff of my changes is attached. + then one or more of the packages PostgreSQL requires is not installed. + See for the required packages. How about: then packages which are required to build PostgreSQL are missing. See for a list of requirements. If you are not sure whether PostgreSQL - is already available or whether you can use it for your - experimentation then you can install it yourself. Doing so is not + is already available for your experimentation, + you can install it yourself. Doing so is not hard and it can be a good exercise. This change does not make much sense, given that you leave the second part of the sentence. As is typical of client/server applications, the client and the - server can be on different hosts. In that case they communicate + server can be on different machines or networks. In that case they communicate over a TCP/IP network connection. You should keep this in mind, I think "hosts" is preferred here. The differentiation between machines and networks is not necessary. - The path at your site might be different. Contact your site + The path at your site's server might be different. Contact your site administrator or check the installation instructions to Dunno if this change improves the wording, or the understanding. How about replacing "site" with "installation"? PostgreSQL allows you to create any - number of databases at a given site. Database names must have an - alphabetic first character and are limited to 63 bytes in - length. A convenient choice is to create a database with the same - name as your current user name. Many tools assume that database - name as the default, so it can save you some typing. To create - that database, simply type: + number of databases at a given site. Database names are limited to 63 bytes in + length. Database names longer than 63 bytes will be truncated. A convenient + choice is to create a database with the same name as your current user name. + Many tools assume that database name as the default, so it + can save you some typing. To create that database, simply type: The part about "truncate" is correct, maybe you can include NAMEDATALEN here as well. The part about the first character is correct - except you quote the name. Then any name is allowed. If you rewrite this part, maybe include this as well. The other changes look good. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: Installation instructions update (pg_ctl)
On 30.10.18 14:52, Andreas 'ads' Scherbaum wrote: On 30.10.18 09:04, Michael Banck wrote: Hi, On Tue, Oct 30, 2018 at 12:08:49AM +0100, Andreas 'ads' Scherbaum wrote: The installation instructions (short version) are not consistent with the "initdb" output. The first one still uses "postgres -D", even mentions "check initdb output", but "initdb" emits "pg_ctl" commands. The attached patch updates the short install instructions and replaces "postgres -D" with "pg_ctl" calls. Check. diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml index 62582effed..b5d2835a47 100644 --- a/doc/src/sgml/standalone-install.xml +++ b/doc/src/sgml/standalone-install.xml @@ -50,7 +50,7 @@ in the stand-alone version. That one though seems to be what's ending up in INSTALL, according to the comment at the beginning of the file. root# mkdir /usr/local/pgsql/data root# chown postgres /usr/local/pgsql/data root# su - postgres -postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +postgres$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data I'm confused here, the paragraph reads "Create a database installation with the initdb", so I think this hunk is not correct and should be removed? That's indeed one replacement too much. The attached patch is fixing this. @@ -77,25 +77,21 @@ postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The previous initdb step should have told you how to start up the database server. Do so now. The command should look something like: -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data - This will start the server in the foreground. To put the server - in the background use something like: -nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \ - </dev/null >>server.log 2>&1 </dev/null & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start To stop a server running in the background you can type: -kill `cat /usr/local/pgsql/data/postmaster.pid` +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop Create a database: -createdb testdb +/usr/local/pgsql/bin/createdb testdb Then enter: -psql testdb +/usr/local/pgsql/bin/psql testdb to connect to that database. At the prompt you can enter SQL commands and start experimenting. Check. Thank you for the review! Submitted this to the Commitfest, and took the liberty to add you as a reviewer. Thanks, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: INSTALL file
On 03.11.18 18:06, Stephen Frost wrote: Greetings, * Andreas 'ads' Scherbaum (a...@pgug.de) wrote: On 02.11.18 01:38, Stephen Frost wrote: * Andreas 'ads' Scherbaum (a...@pgug.de) wrote: How about the attached one? Picked up your draft, and cleaned it up a bit. (unsurprisingly) this is looking pretty good to me. A few additional notes: Incorporated. See the attached. If that works for you, I will submit it to the Commitfest. Yeah, looks pretty good to me, please register it in the CF system. Done. Added you for review. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: INSTALL file
On 02.11.18 01:38, Stephen Frost wrote: Greetings, * Andreas 'ads' Scherbaum (a...@pgug.de) wrote: How about the attached one? Picked up your draft, and cleaned it up a bit. (unsurprisingly) this is looking pretty good to me. A few additional notes: Incorporated. See the attached. If that works for you, I will submit it to the Commitfest. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project PostgreSQL Database Management System = This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. Download The latest version of this software, both in source code form and as binary packages for many platforms, may be obtained at https://www.postgresql.org/download/ PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download/products/2-drivers-and-interfaces/ For more information please visit https://www.postgresql.org/. Building on UNIX Detailed instructions for many Unix platforms are available here: https://www.postgresql.org/docs/current/static/installation.html To build PostgreSQL on most Unix variants, the following are required: GNU make, version 3.8 or newer ISO/ANSI C compilar (at least C99-compliant) Flex 2.5.31 or later, and Bison 1.875 or later (for building from git) Perl 5.8.3 (for building from git) PostgreSQL has many additional capabilities which can be enabled using configure --enable switches but many of those also depend on additional libraries. See the installation instructions for details. To build PostgreSQL, run the following commands: ./configure make PostgreSQL can then be installed using 'make install', which will require being a superuser to install into the default directory. The installation location can be changed by passing '--prefix' to 'configure'. Run './configure --help' for additional options. Building on Windows === Detailed instructions for building on Windows is available here: https://www.postgresql.org/docs/current/static/install-windows.html To build PostgreSQL on Windows, either Visual Studio Express 2017 for Windows Desktop or Microsoft Visual C++ 2005 (or later) should be installed. PostgreSQL can also be built using MinGW or Cygwin using the Unix instructions. There are different requirements for building on a 32-bit or 64-bit environment, check the documentation for details. Initializing your Database == Once the PostgreSQL software is installed, the first step to having a running database is to initialize a PostgreSQL database, using the 'initdb' command: initdb -D /path/to/mydatabase Where '/path/to/mydatabase' is the directory where the database is going to be installed. This directory can exist, but must be empty. If it does not exist, 'initdb' will create it. After the database system has been initialized, PostgreSQL can be started by using the pg_ctl command: pg_ctl -D /path/to/mydatabase -l logfile start Once PostgreSQL is running, you can connect to it using the psql command-line client. A default database called 'postgres' was created by 'initdb'. Building the PostgreSQL Documentation = Full documentation for PostgreSQL is available online here: https://www.postgresql.org/docs/current/static/index.html PostgreSQL uses DocBook to build the documentation. Therefore the DocBook tools must be installed. In addition, a working Java installation is required. To build PostgreSQL's documentation on Unix, run: ./configure make docs The documentation, once built by 'make docs', will be available in various formats in the 'doc/src/sgml' directory. diff --git a/README b/README index 12de3f1d73..09ac40fa1c 100644 --- a/README +++ b/README @@ -9,19 +9,107 @@ that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. + + +Download + + +The latest version of this software, both in source code form and as +binary packages for many platforms, may be obtained at + + https://www.postgresql.org/download/ + PostgreSQL has many language interfaces, many of which are listed here: - https://www.postgresql.org/download + https://www.postgresql.org/
Re: INSTALL file
On 01.11.18 18:41, Stephen Frost wrote: Greetings, * Andreas 'ads' Scherbaum (a...@pgug.de) wrote: On 01.11.18 07:26, Michael Paquier wrote: It includes links to the website, as well as the short version of the installation instructions. +The installation instructions are listed on the website: + +https://www.postgresql.org/docs/current/static/install-short.html I don't think we should link to the "Short version" directly here, the above URL should be the "installation.html" one.. With a caveat, see below. How about the attached one? Picked up your draft, and cleaned it up a bit. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project diff --git a/README b/README index 12de3f1d73..1f33303d80 100644 --- a/README +++ b/README @@ -13,14 +13,94 @@ PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download -See the file INSTALL for instructions on how to build and install -PostgreSQL. That file also lists supported operating systems and -hardware platforms and contains information regarding any other -software packages that are required to build or run the PostgreSQL -system. Copyright and license information can be found in the -file COPYRIGHT. A comprehensive documentation set is included in this -distribution; it can be read as described in the installation -instructions. + +Building on UNIX + + +Detailed instructions for many Unix platforms are available here: +https://www.postgresql.org/docs/current/static/installation.html + +To build PostgreSQL on most Unix variants, the following are required: + +GNU make, version 3.8 or newer +ISO/ANSI C compilar (at least C99-compliant) +Flex 2.5.31 or later, and Bison 1.875 or later (for building from git) +Perl 5.8.3 (for building from git) + +PostgreSQL has many additional capabilities which can be enabled using +configure --enable switches but many of those also depend on additional +libraries. See the installation instructions for details. + +To build PostgreSQL, run the following commands: + +./configure +make + +PostgreSQL can then be installed using 'make install', which will +require being a superuser to install into the default directory. +The installation location can be changed by passing '--prefix' to +'configure'. Run './configure --help' for additional options. + + +Building on Windows +=== + +Detailed instructions for building on Windows is available here: +https://www.postgresql.org/docs/current/static/install-windows.html + +To build PostgreSQL on Windows, either Visual Studio Express 2017 +for Windows Desktop or Microsoft Visual C++ 2005 (or later) should be +installed. PostgreSQL can also be build using MinGW or Cygwin using +the Unix instructions. + +There are different requirements for building on a 32-bit or 64-bit +environment, check the documentation for details. + + +Initializing your Database +== + +Once the PostgreSQL software is installed, the first step to having a +running database is to initialize a PostgreSQL database using the +'initdb' command, eg: + +initdb -D /path/to/mydatabase + +Where '/path/to/mydatabase' is the directory where the database is +going to be installed. This directory can exist, but must be empty. +If it does not exist, 'initdb' will create it. + +After the database system has been initialized, PostgreSQL can be +started by using the pg_ctl command: + +pg_ctl -D /path/to/mydatabase -l logfile start + +Once PostgreSQL is running, you can connect to it using the psql +command-line client. A default database called 'postgres' was created +by 'initdb'. + + +Building the PostgreSQL Documentation += + +Full documentation for PostgreSQL is available online here: +https://www.postgresql.org/docs/current/static/index.html + +PostgreSQL uses DocBook to build the documentation. Therefore the +DocBook tools must be installed. In addition, a working Java +installation is required. + +To build PostgreSQL's documentation on Unix, run: + +./configure +make docs + +The documentation, once built by 'make docs', will be available in +various formats in the 'doc/src/sgml' directory. + + +Download + The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our PostgreSQL Database Management System = This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqu
Re: INSTALL file
On 01.11.18 07:26, Michael Paquier wrote: On Thu, Nov 01, 2018 at 01:32:09AM +0100, Andreas 'ads' Scherbaum wrote: Picking up on this idea, attached is a first draft for changing the README. Why don't you add it to the upcoming commit fest? It would be good to get some traction with a formal review. I plan to do that, once I gathered some feedback here. It includes links to the website, as well as the short version of the installation instructions. +The installation instructions are listed on the website: + +https://www.postgresql.org/docs/current/static/install-short.html + +Short version: + +./configure +make +su +make install +adduser postgres +mkdir /usr/local/pgsql/data +chown postgres /usr/local/pgsql/data +su - postgres +/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start Adding a section about installation and another one about documentation are good things. Now for the installation section I disagree about adding this detailed way of doing things, and just adding a URL looks enough. Was thinking about this, but then decided to add it as an example, and see what people think. Pointing to the global installation recommendations would be a better fit also as a lot of things are platform-dependent. So this URL looks better: https://www.postgresql.org/docs/current/static/installation.html Now there is also a problem, the README would point out to the development version of the documentation. As this is made at working using git, I could personally live with having stable branches also refer to the development version, but it could also make sense to have each stable branch point to the URL of the versions they work on. That is a bit problematic. The README lives on git first, and therefore should point to the development version. The release process can replace this with links to the current version. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: INSTALL file
On 01.11.18 01:29, Michael Paquier wrote: On Wed, Oct 31, 2018 at 08:30:40AM -0400, Stephen Frost wrote: Agreed, we should really improve the README by merging the README.git into it and make the project, as a whole, more accessible to new developers. +1. I think as well that this approach would be a good thing. Picking up on this idea, attached is a first draft for changing the README. It includes links to the website, as well as the short version of the installation instructions. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project diff --git a/README b/README index 12de3f1d73..24814265e8 100644 --- a/README +++ b/README @@ -13,14 +13,47 @@ PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download -See the file INSTALL for instructions on how to build and install -PostgreSQL. That file also lists supported operating systems and -hardware platforms and contains information regarding any other -software packages that are required to build or run the PostgreSQL -system. Copyright and license information can be found in the -file COPYRIGHT. A comprehensive documentation set is included in this -distribution; it can be read as described in the installation -instructions. + +Installation + + +The installation instructions are listed on the website: + +https://www.postgresql.org/docs/current/static/install-short.html + +Short version: + +./configure +make +su +make install +adduser postgres +mkdir /usr/local/pgsql/data +chown postgres /usr/local/pgsql/data +su - postgres +/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start + +The list of supported platforms is available on the website: + +https://www.postgresql.org/docs/current/static/supported-platforms.html + +Copyright and license information can be found in the file COPYRIGHT. + + +Documentation += + +A comprehensive documentation set is included in this distribution; +it can be read as described in the installation instructions. + +The documentation for all versions of PostgreSQL is available on the website: + +https://www.postgresql.org/docs/ + + +Download + The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our
Re: Installation instructions update (pg_ctl)
On 30.10.18 09:04, Michael Banck wrote: Hi, On Tue, Oct 30, 2018 at 12:08:49AM +0100, Andreas 'ads' Scherbaum wrote: The installation instructions (short version) are not consistent with the "initdb" output. The first one still uses "postgres -D", even mentions "check initdb output", but "initdb" emits "pg_ctl" commands. The attached patch updates the short install instructions and replaces "postgres -D" with "pg_ctl" calls. Check. diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml index 62582effed..b5d2835a47 100644 --- a/doc/src/sgml/standalone-install.xml +++ b/doc/src/sgml/standalone-install.xml @@ -50,7 +50,7 @@ in the stand-alone version. That one though seems to be what's ending up in INSTALL, according to the comment at the beginning of the file. root# mkdir /usr/local/pgsql/data root# chown postgres /usr/local/pgsql/data root# su - postgres -postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +postgres$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data I'm confused here, the paragraph reads "Create a database installation with the initdb", so I think this hunk is not correct and should be removed? That's indeed one replacement too much. The attached patch is fixing this. @@ -77,25 +77,21 @@ postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/datainitdb step should have told you how to start up the database server. Do so now. The command should look something like: -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data - This will start the server in the foreground. To put the server - in the background use something like: -nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \ -</dev/null >>server.log 2>&1 </dev/null & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start To stop a server running in the background you can type: -kill `cat /usr/local/pgsql/data/postmaster.pid` +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop Create a database: -createdb testdb +/usr/local/pgsql/bin/createdb testdb Then enter: -psql testdb +/usr/local/pgsql/bin/psql testdb to connect to that database. At the prompt you can enter SQL commands and start experimenting. Check. Thank you for the review! -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 4487d0cfd1..c123b56dda 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -37,7 +37,7 @@ mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml index 62582effed..f584789f9a 100644 --- a/doc/src/sgml/standalone-install.xml +++ b/doc/src/sgml/standalone-install.xml @@ -77,25 +77,21 @@ postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/datainitdb step should have told you how to start up the database server. Do so now. The command should look something like: -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data - This will start the server in the foreground. To put the server - in the background use something like: -nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \ -</dev/null >>server.log 2>&1 </dev/null & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start To stop a server running in the background you can type: -kill `cat /usr/local/pgsql/data/postmaster.pid` +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop Create a database: -createdb testdb +/usr/local/pgsql/bin/createdb testdb Then enter: -psql testdb +/usr/local/pgsql/bin/psql testdb to connect to that database. At the prompt you can enter SQL commands and start experimenting.
Re: INSTALL file
On 30.10.18 11:49, Andrew Dunstan wrote: On 10/30/2018 06:14 AM, Andreas 'ads' Scherbaum wrote: On 30.10.18 04:11, Michael Paquier wrote: On Mon, Oct 29, 2018 at 01:01:47PM +0100, Andreas 'ads' Scherbaum wrote: That is not the first file people looking at. Especially not people looking at the GitHub copy: https://github.com/postgres/postgres I understand that there is documentation, but for the casual developer looking at this, it seems broken. FWIW, I think that people depend too much on github and what github thinks projects should do to be more presentable, like adding a markdown-style README or such. I get your point that people look at README first though, and that the current status is confusing. One idea would be to merge the contents of README.git into the README. However the current status also makes some sense, as INSTALL is part of an distributed tarball, while README.git is automatically removed when running "make distdir". Looking at README is the first thing I do when checking out any project or after decompressing any source code tarball, so things could be better. Right, thanks. That's why one of my proposals was to have an INSTALL file in place, and overwrite it during the tarball creation process. This way the general INSTALL file is there, and can contain "general" instructions, and later on is overwritten by a specific INSTALL file for the tarballs. That has the potential to be somewhat confusing: "The INSTALL file says ..." "Which INSTALL file are you referring to?" Merging README.git into README make sense. I think our attitude has generally been that if you're a developer you should build from git, in which case we assume you know what you're doing, and everyone else should build from a tarball. That's arguably somewhat old-fashioned, specially since you can download release tarballs/zips from places like <https://github.com/postgres/postgres/releases> Sadly, these won't have the artefacts created by "make dist". Maybe those too are less important these days. Most experienced developers will know, I think. This was raised during the Google Code-In project, where students stumbled over this, and asked where the INSTALL file is ... This has potential to confuse anyone new to PostgreSQL, and it's a burden which can easily be avoided. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: INSTALL file
On 30.10.18 04:11, Michael Paquier wrote: On Mon, Oct 29, 2018 at 01:01:47PM +0100, Andreas 'ads' Scherbaum wrote: That is not the first file people looking at. Especially not people looking at the GitHub copy: https://github.com/postgres/postgres I understand that there is documentation, but for the casual developer looking at this, it seems broken. FWIW, I think that people depend too much on github and what github thinks projects should do to be more presentable, like adding a markdown-style README or such. I get your point that people look at README first though, and that the current status is confusing. One idea would be to merge the contents of README.git into the README. However the current status also makes some sense, as INSTALL is part of an distributed tarball, while README.git is automatically removed when running "make distdir". Looking at README is the first thing I do when checking out any project or after decompressing any source code tarball, so things could be better. Right, thanks. That's why one of my proposals was to have an INSTALL file in place, and overwrite it during the tarball creation process. This way the general INSTALL file is there, and can contain "general" instructions, and later on is overwritten by a specific INSTALL file for the tarballs. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Installation instructions update (pg_ctl)
Hello, The installation instructions (short version) are not consistent with the "initdb" output. The first one still uses "postgres -D", even mentions "check initdb output", but "initdb" emits "pg_ctl" commands. The attached patch updates the short install instructions and replaces "postgres -D" with "pg_ctl" calls. The long version is left as it is, because it describes both "postgres -D" and "pg_ctl" as a wrapper. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 4487d0cfd1..c123b56dda 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -37,7 +37,7 @@ mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml index 62582effed..b5d2835a47 100644 --- a/doc/src/sgml/standalone-install.xml +++ b/doc/src/sgml/standalone-install.xml @@ -50,7 +50,7 @@ in the stand-alone version. root# mkdir /usr/local/pgsql/data root# chown postgres /usr/local/pgsql/data root# su - postgres -postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data +postgres$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data @@ -77,25 +77,21 @@ postgres$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/datainitdb step should have told you how to start up the database server. Do so now. The command should look something like: -/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data - This will start the server in the foreground. To put the server - in the background use something like: -nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \ -</dev/null >>server.log 2>&1 </dev/null & +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start To stop a server running in the background you can type: -kill `cat /usr/local/pgsql/data/postmaster.pid` +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop Create a database: -createdb testdb +/usr/local/pgsql/bin/createdb testdb Then enter: -psql testdb +/usr/local/pgsql/bin/psql testdb to connect to that database. At the prompt you can enter SQL commands and start experimenting.
Re: INSTALL file
On 28.10.18 20:39, Andrew Dunstan wrote: On 10/28/2018 08:13 AM, Andreas 'ads' Scherbaum wrote: Hello, while working with Google Code-In students, there is one task: "clone PostgreSQL from git repository, and build from source". This brought up an interesting problem: the README refers to an "INSTALL" file, which is present in packages, but not in the source repo. This is very confusing for beginners, and should be avoided. There are a couple options to fix this: 1. Update the README, and remove the "INSTALL" reference 2. Create a permanent INSTALL file, and possibly overwrite it during packaging 3. Add different INSTALL files, based on the platform (Linux, BSD, Windows, Source) Regards, See README.git That is not the first file people looking at. Especially not people looking at the GitHub copy: https://github.com/postgres/postgres I understand that there is documentation, but for the casual developer looking at this, it seems broken. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
INSTALL file
Hello, while working with Google Code-In students, there is one task: "clone PostgreSQL from git repository, and build from source". This brought up an interesting problem: the README refers to an "INSTALL" file, which is present in packages, but not in the source repo. This is very confusing for beginners, and should be avoided. There are a couple options to fix this: 1. Update the README, and remove the "INSTALL" reference 2. Create a permanent INSTALL file, and possibly overwrite it during packaging 3. Add different INSTALL files, based on the platform (Linux, BSD, Windows, Source) Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: [PoC PATCH] Parallel dump to /dev/null
On Mon, Mar 5, 2018 at 1:49 PM, Michael Banck wrote: > > In any case, new patch attached which does this. > The null device is already defined in port.h, as DEVNULL. No need to redefine it as NULL_DEVICE. Alternatively paths.h defines _PATH_DEVNULL. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
Re: [PATCH] Find additional connection service files in pg_service.conf.d directory
On Thu, Mar 1, 2018 at 7:40 PM, Curt Tilmes wrote: > On Thu, Mar 1, 2018 at 1:13 PM, Andres Freund wrote: > > > I'd also insist that the file ending is ".conf". > > New patch limits files to ".conf". > Looked over this patch and found that you limit the directory entries to files only. Would it make sense to allow links as well? That would allow other programs/distributions to place a link in the config directory and point to a service file in their own directory. Regards, -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project