public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v3] Cleanup/remove/update references to OID column...
15+ messages / 8 participants
[nested] [flat]

* [PATCH v3] Cleanup/remove/update references to OID column...
@ 2019-04-03 00:13  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Justin Pryzby @ 2019-04-03 00:13 UTC (permalink / raw)

..in wake of 578b229718e8f.

See also
93507e67c9ca54026019ebec3026de35d30370f9
1464755fc490a9911214817fe83077a3689250ab

Author: Justin Pryzby <[email protected]>
Author: Daniel Verite <[email protected]>
---
 doc/src/sgml/information_schema.sgml | 4 ++--
 doc/src/sgml/ref/insert.sgml         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index 234a3bb..9c618b1 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -1312,8 +1312,8 @@
   <para>
    The view <literal>columns</literal> contains information about all
    table columns (or view columns) in the database.  System columns
-   (<literal>ctid</literal>, etc.) are not included.  Only those columns are
-   shown that the current user has access to (by way of being the
+   (<literal>ctid</literal>, etc.) are not included.  The only columns shown
+   are those to which the current user has access (by way of being the
    owner or having some privilege).
   </para>
 
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 189ce2a..f995a76 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -554,7 +554,7 @@ INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</repl
    The <replaceable class="parameter">count</replaceable> is the number of
    rows inserted or updated.  <replaceable>oid</replaceable> is always 0 (it
    used to be the <acronym>OID</acronym> assigned to the inserted row if
-   <replaceable>rows</replaceable> was exactly one and the target table was
+   <replaceable>count</replaceable> was exactly one and the target table was
    declared <literal>WITH OIDS</literal> and 0 otherwise, but creating a table
    <literal>WITH OIDS</literal> is not supported anymore).
   </para>
-- 
2.7.4


--TKYYegg/GYAC5JIZ--





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* [PATCH v2] Cleanup/remove/update references to OID column...
@ 2019-04-03 00:13  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Justin Pryzby @ 2019-04-03 00:13 UTC (permalink / raw)

..in wake of 578b229718e8f.

See also
93507e67c9ca54026019ebec3026de35d30370f9
1464755fc490a9911214817fe83077a3689250ab

Reviewed-by: Daniel Verite <[email protected]>
---
 doc/src/sgml/catalogs.sgml           |  2 +-
 doc/src/sgml/ddl.sgml                | 12 +++++-------
 doc/src/sgml/information_schema.sgml |  4 ++--
 doc/src/sgml/ref/create_trigger.sgml |  2 +-
 doc/src/sgml/ref/insert.sgml         | 12 +++++-------
 doc/src/sgml/ref/psql-ref.sgml       |  3 +++
 doc/src/sgml/spi.sgml                |  2 +-
 7 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 40ddec4..d544e60 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1047,7 +1047,7 @@
       <entry></entry>
       <entry>
        The number of the column.  Ordinary columns are numbered from 1
-       up.  System columns, such as <structfield>oid</structfield>,
+       up.  System columns, such as <structfield>ctid</structfield>,
        have (arbitrary) negative numbers.
       </entry>
      </row>
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 9e761db..244d5ce 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -1202,8 +1202,7 @@ CREATE TABLE circles (
       <structfield>ctid</structfield> will change if it is
       updated or moved by <command>VACUUM FULL</command>.  Therefore
       <structfield>ctid</structfield> is useless as a long-term row
-      identifier.  The OID, or even better a user-defined serial
-      number, should be used to identify logical rows.
+      identifier.  A primary key should be used to identify logical rows.
      </para>
     </listitem>
    </varlistentry>
@@ -3672,11 +3671,10 @@ VALUES ('Albany', NULL, NULL, 'NY');
       <para>
        Partitions cannot have columns that are not present in the parent.  It
        is not possible to specify columns when creating partitions with
-       <command>CREATE TABLE</command>, nor is it possible to add columns to
-       partitions after-the-fact using <command>ALTER TABLE</command>.  Tables may be
-       added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
-       only if their columns exactly match the parent, including any
-       <literal>oid</literal> column.
+       <command>CREATE TABLE</command>, to add columns to
+       partitions after-the-fact using <command>ALTER TABLE</command>, nor to
+       add a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
+       if its columns would not exactly match those of the parent.
       </para>
      </listitem>
 
diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index 1321ade..9c618b1 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -1312,8 +1312,8 @@
   <para>
    The view <literal>columns</literal> contains information about all
    table columns (or view columns) in the database.  System columns
-   (<literal>oid</literal>, etc.) are not included.  Only those columns are
-   shown that the current user has access to (by way of being the
+   (<literal>ctid</literal>, etc.) are not included.  The only columns shown
+   are those to which the current user has access (by way of being the
    owner or having some privilege).
   </para>
 
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index 6456105..3339a4b 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -465,7 +465,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
    that the <literal>NEW</literal> row seen by the condition is the current value,
    as possibly modified by earlier triggers.  Also, a <literal>BEFORE</literal>
    trigger's <literal>WHEN</literal> condition is not allowed to examine the
-   system columns of the <literal>NEW</literal> row (such as <literal>oid</literal>),
+   system columns of the <literal>NEW</literal> row (such as <literal>ctid</literal>),
    because those won't have been set yet.
   </para>
 
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 62e142f..3e1be4c 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -552,13 +552,11 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
 INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable>
 </screen>
    The <replaceable class="parameter">count</replaceable> is the
-   number of rows inserted or updated.  If <replaceable
-   class="parameter">count</replaceable> is exactly one, and the
-   target table has OIDs, then <replaceable
-   class="parameter">oid</replaceable> is the <acronym>OID</acronym>
-   assigned to the inserted row.  The single row must have been
-   inserted rather than updated.  Otherwise <replaceable
-   class="parameter">oid</replaceable> is zero.
+   number of rows inserted or updated.
+   <replaceable>oid</replaceable> used to be the object ID of the inserted row
+   if <replaceable>rows</replaceable> was 1 and the target table had OIDs, but
+   OIDs system columns are not supported anymore; therefore
+   <replaceable>oid</replaceable> is always 0.
   </para>
 
   <para>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 08f4bab..0e6e792 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -3794,6 +3794,9 @@ bar
         command. This variable is only guaranteed to be valid until
         after the result of the next <acronym>SQL</acronym> command has
         been displayed.
+        <productname>PostgreSQL</productname> servers since version 12 do not
+        support OID system columns in user tables, and LASTOID will always be 0
+        following <command>INSERT</command>.
         </para>
         </listitem>
       </varlistentry>
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index 9b2f516..66eced6 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete
 
   <para>
    If <parameter>colname</parameter> refers to a system column (e.g.,
-   <literal>oid</literal>) then the appropriate negative column number will
+   <literal>ctid</literal>) then the appropriate negative column number will
    be returned.  The caller should be careful to test the return value
    for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to
    detect an error; testing the result for less than or equal to 0 is
-- 
2.1.4


--dFWYt1i2NyOo1oI9--





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* [PATCH v1] Cleanup/remove/update references to OID column...
@ 2019-04-03 00:13  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Justin Pryzby @ 2019-04-03 00:13 UTC (permalink / raw)
  To: [email protected]

..in wake of 578b229718e8f.

See also
93507e67c9ca54026019ebec3026de35d30370f9
1464755fc490a9911214817fe83077a3689250ab
---
 doc/src/sgml/ddl.sgml          |  9 ++++-----
 doc/src/sgml/ref/insert.sgml   | 12 +++++-------
 doc/src/sgml/ref/psql-ref.sgml |  3 +++
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 9e761db..db044c5 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3672,11 +3672,10 @@ VALUES ('Albany', NULL, NULL, 'NY');
       <para>
        Partitions cannot have columns that are not present in the parent.  It
        is not possible to specify columns when creating partitions with
-       <command>CREATE TABLE</command>, nor is it possible to add columns to
-       partitions after-the-fact using <command>ALTER TABLE</command>.  Tables may be
-       added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
-       only if their columns exactly match the parent, including any
-       <literal>oid</literal> column.
+       <command>CREATE TABLE</command>, to add columns to
+       partitions after-the-fact using <command>ALTER TABLE</command>, nor to
+       add a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
+       if its columns would not exactly match those of the parent.
       </para>
      </listitem>
 
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 62e142f..3e1be4c 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -552,13 +552,11 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
 INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable>
 </screen>
    The <replaceable class="parameter">count</replaceable> is the
-   number of rows inserted or updated.  If <replaceable
-   class="parameter">count</replaceable> is exactly one, and the
-   target table has OIDs, then <replaceable
-   class="parameter">oid</replaceable> is the <acronym>OID</acronym>
-   assigned to the inserted row.  The single row must have been
-   inserted rather than updated.  Otherwise <replaceable
-   class="parameter">oid</replaceable> is zero.
+   number of rows inserted or updated.
+   <replaceable>oid</replaceable> used to be the object ID of the inserted row
+   if <replaceable>rows</replaceable> was 1 and the target table had OIDs, but
+   OIDs system columns are not supported anymore; therefore
+   <replaceable>oid</replaceable> is always 0.
   </para>
 
   <para>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 08f4bab..0e6e792 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -3794,6 +3794,9 @@ bar
         command. This variable is only guaranteed to be valid until
         after the result of the next <acronym>SQL</acronym> command has
         been displayed.
+        <productname>PostgreSQL</productname> servers since version 12 do not
+        support OID system columns in user tables, and LASTOID will always be 0
+        following <command>INSERT</command>.
         </para>
         </listitem>
       </varlistentry>
-- 
2.1.4


--fUYQa+Pmc3FrFX/N--





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* [PATCH v3 12/12] Cleanup/remove/update references to OID column...
@ 2019-04-03 00:13  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Justin Pryzby @ 2019-04-03 00:13 UTC (permalink / raw)

..in wake of 578b229718e8f.

See also
93507e67c9ca54026019ebec3026de35d30370f9
1464755fc490a9911214817fe83077a3689250ab
f6b39171f3d65155b9390c2c69bc5b3469f923a8
---
 doc/src/sgml/catalogs.sgml           | 2 +-
 doc/src/sgml/information_schema.sgml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index d544e60..0f9c6f2 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -610,7 +610,7 @@
       <entry><structfield>oid</structfield></entry>
       <entry><type>oid</type></entry>
       <entry></entry>
-      <entry>Row identifier (hidden attribute; must be explicitly selected)</entry>
+      <entry>Row identifier</entry>
      </row>
 
      <row>
diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index 234a3bb..9c618b1 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -1312,8 +1312,8 @@
   <para>
    The view <literal>columns</literal> contains information about all
    table columns (or view columns) in the database.  System columns
-   (<literal>ctid</literal>, etc.) are not included.  Only those columns are
-   shown that the current user has access to (by way of being the
+   (<literal>ctid</literal>, etc.) are not included.  The only columns shown
+   are those to which the current user has access (by way of being the
    owner or having some privilege).
   </para>
 
-- 
2.7.4


--cWoXeonUoKmBZSoM--





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* [PATCH v1] Cleanup/remove/update references to OID column...
@ 2019-05-08 18:57  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Justin Pryzby @ 2019-05-08 18:57 UTC (permalink / raw)

..in wake of 578b229718e8f.

See also
93507e67c9ca54026019ebec3026de35d30370f9
1464755fc490a9911214817fe83077a3689250ab
f6b39171f3d65155b9390c2c69bc5b3469f923a8

Author: Justin Pryzby <[email protected]>
---
 doc/src/sgml/catalogs.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index d544e60..0f9c6f2 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -610,7 +610,7 @@
       <entry><structfield>oid</structfield></entry>
       <entry><type>oid</type></entry>
       <entry></entry>
-      <entry>Row identifier (hidden attribute; must be explicitly selected)</entry>
+      <entry>Row identifier</entry>
      </row>
 
      <row>
-- 
2.7.4


--eDB11BtaWSyaBkpc--





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* drop postmaster symlink
@ 2022-11-23 07:52  Peter Eisentraut <[email protected]>
  0 siblings, 1 reply; 15+ messages in thread

From: Peter Eisentraut @ 2022-11-23 07:52 UTC (permalink / raw)
  To: pgsql-hackers

A little while ago we discussed briefly over in the meson thread whether 
we could remove the postmaster symlink [0].  The meson build system 
currently does not install a postmaster symlink.  (AFAICT, the MSVC 
build system does not either.)  So if we want to elevate the meson build 
system, we either need to add the postmaster symlink, or remove it from 
the other build system(s) as well.  Seeing that it's been deprecated for 
a long time, I propose we just remove it.  See attached patches.


[0]: 
https://www.postgresql.org/message-id/[email protected]
From 179eaab96dc5215970b2b3485cf77f1a58f9d337 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Sun, 13 Nov 2022 20:52:00 +0100
Subject: [PATCH 1/2] Remove gratuitous references to postmaster instead of
 postgres

---
 contrib/start-scripts/freebsd | 2 +-
 contrib/start-scripts/linux   | 2 +-
 src/port/path.c               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/start-scripts/freebsd b/contrib/start-scripts/freebsd
index 3323237a54b4..5e22b2d2f0e4 100644
--- a/contrib/start-scripts/freebsd
+++ b/contrib/start-scripts/freebsd
@@ -29,7 +29,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # What to use to start up the postmaster.  (If you want the script to wait
 # until the server has started, you could use "pg_ctl start" here.)
-DAEMON="$prefix/bin/postmaster"
+DAEMON="$prefix/bin/postgres"
 
 # What to use to shut down the postmaster
 PGCTL="$prefix/bin/pg_ctl"
diff --git a/contrib/start-scripts/linux b/contrib/start-scripts/linux
index a7757162fc4b..9292855df716 100644
--- a/contrib/start-scripts/linux
+++ b/contrib/start-scripts/linux
@@ -61,7 +61,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # What to use to start up the postmaster.  (If you want the script to wait
 # until the server has started, you could use "pg_ctl start" here.)
-DAEMON="$prefix/bin/postmaster"
+DAEMON="$prefix/bin/postgres"
 
 # What to use to shut down the postmaster
 PGCTL="$prefix/bin/pg_ctl"
diff --git a/src/port/path.c b/src/port/path.c
index 05fe812f757b..fb64873c7a43 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -651,7 +651,7 @@ dir_strcmp(const char *s1, const char *s2)
  * For example:
  *		target_path  = '/usr/local/share/postgresql'
  *		bin_path	 = '/usr/local/bin'
- *		my_exec_path = '/opt/pgsql/bin/postmaster'
+ *		my_exec_path = '/opt/pgsql/bin/postgres'
  * Given these inputs, the common prefix is '/usr/local/', the tail of
  * bin_path is 'bin' which does match the last directory component of
  * my_exec_path, so we would return '/opt/pgsql/share/postgresql'
-- 
2.38.1


From 6118b4098a50b78ca7437938117cc3ab41b72e08 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Sun, 13 Nov 2022 20:52:56 +0100
Subject: [PATCH 2/2] Don't install postmaster symlink anymore

Also remove man page.
---
 doc/src/sgml/ref/postmaster.sgml | 44 --------------------------------
 doc/src/sgml/reference.sgml      |  1 -
 src/backend/Makefile             |  8 +-----
 3 files changed, 1 insertion(+), 52 deletions(-)
 delete mode 100644 doc/src/sgml/ref/postmaster.sgml

diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml
deleted file mode 100644
index 7b544ed0b613..000000000000
--- a/doc/src/sgml/ref/postmaster.sgml
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
-doc/src/sgml/ref/postmaster.sgml
-PostgreSQL documentation
--->
-
-<refentry id="app-postmaster">
- <indexterm zone="app-postmaster">
-  <primary>postmaster</primary>
- </indexterm>
-
- <refmeta>
-  <refentrytitle><application>postmaster</application></refentrytitle>
-  <manvolnum>1</manvolnum>
-  <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
-  <refname>postmaster</refname>
-  <refpurpose><productname>PostgreSQL</productname> database server</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>postmaster</command>
-   <arg rep="repeat"><replaceable>option</replaceable></arg>
-  </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
-  <title>Description</title>
-
-  <para>
-   <command>postmaster</command> is a deprecated alias of <command>postgres</command>.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>See Also</title>
-
-  <para>
-   <xref linkend="app-postgres"/>
-  </para>
- </refsect1>
-</refentry>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index a3b743e8c1e7..e11b4b613075 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -289,7 +289,6 @@ <title>PostgreSQL Server Applications</title>
    &pgupgrade;
    &pgwaldump;
    &postgres;
-   &postmaster;
 
  </reference>
 
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 181c217fae4c..ed364543b74e 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -208,12 +208,6 @@ endif
 
 install-bin: postgres $(POSTGRES_IMP) installdirs
 	$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
-ifneq ($(PORTNAME), win32)
-	@rm -f '$(DESTDIR)$(bindir)/postmaster$(X)'
-	ln -s postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
-else
-	$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
-endif
 ifeq ($(MAKE_EXPORTS), true)
 	$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
 	$(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
@@ -242,7 +236,7 @@ endif
 ##########################################################################
 
 uninstall:
-	rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
+	rm -f '$(DESTDIR)$(bindir)/postgres$(X)'
 ifeq ($(MAKE_EXPORTS), true)
 	rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
 	rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
-- 
2.38.1



Attachments:

  [text/plain] 0001-Remove-gratuitous-references-to-postmaster-instead-o.patch (2.1K, ../../[email protected]/2-0001-Remove-gratuitous-references-to-postmaster-instead-o.patch)
  download | inline diff:
From 179eaab96dc5215970b2b3485cf77f1a58f9d337 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Sun, 13 Nov 2022 20:52:00 +0100
Subject: [PATCH 1/2] Remove gratuitous references to postmaster instead of
 postgres

---
 contrib/start-scripts/freebsd | 2 +-
 contrib/start-scripts/linux   | 2 +-
 src/port/path.c               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/start-scripts/freebsd b/contrib/start-scripts/freebsd
index 3323237a54b4..5e22b2d2f0e4 100644
--- a/contrib/start-scripts/freebsd
+++ b/contrib/start-scripts/freebsd
@@ -29,7 +29,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # What to use to start up the postmaster.  (If you want the script to wait
 # until the server has started, you could use "pg_ctl start" here.)
-DAEMON="$prefix/bin/postmaster"
+DAEMON="$prefix/bin/postgres"
 
 # What to use to shut down the postmaster
 PGCTL="$prefix/bin/pg_ctl"
diff --git a/contrib/start-scripts/linux b/contrib/start-scripts/linux
index a7757162fc4b..9292855df716 100644
--- a/contrib/start-scripts/linux
+++ b/contrib/start-scripts/linux
@@ -61,7 +61,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # What to use to start up the postmaster.  (If you want the script to wait
 # until the server has started, you could use "pg_ctl start" here.)
-DAEMON="$prefix/bin/postmaster"
+DAEMON="$prefix/bin/postgres"
 
 # What to use to shut down the postmaster
 PGCTL="$prefix/bin/pg_ctl"
diff --git a/src/port/path.c b/src/port/path.c
index 05fe812f757b..fb64873c7a43 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -651,7 +651,7 @@ dir_strcmp(const char *s1, const char *s2)
  * For example:
  *		target_path  = '/usr/local/share/postgresql'
  *		bin_path	 = '/usr/local/bin'
- *		my_exec_path = '/opt/pgsql/bin/postmaster'
+ *		my_exec_path = '/opt/pgsql/bin/postgres'
  * Given these inputs, the common prefix is '/usr/local/', the tail of
  * bin_path is 'bin' which does match the last directory component of
  * my_exec_path, so we would return '/opt/pgsql/share/postgresql'
-- 
2.38.1



  [text/plain] 0002-Don-t-install-postmaster-symlink-anymore.patch (3.0K, ../../[email protected]/3-0002-Don-t-install-postmaster-symlink-anymore.patch)
  download | inline diff:
From 6118b4098a50b78ca7437938117cc3ab41b72e08 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Sun, 13 Nov 2022 20:52:56 +0100
Subject: [PATCH 2/2] Don't install postmaster symlink anymore

Also remove man page.
---
 doc/src/sgml/ref/postmaster.sgml | 44 --------------------------------
 doc/src/sgml/reference.sgml      |  1 -
 src/backend/Makefile             |  8 +-----
 3 files changed, 1 insertion(+), 52 deletions(-)
 delete mode 100644 doc/src/sgml/ref/postmaster.sgml

diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml
deleted file mode 100644
index 7b544ed0b613..000000000000
--- a/doc/src/sgml/ref/postmaster.sgml
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
-doc/src/sgml/ref/postmaster.sgml
-PostgreSQL documentation
--->
-
-<refentry id="app-postmaster">
- <indexterm zone="app-postmaster">
-  <primary>postmaster</primary>
- </indexterm>
-
- <refmeta>
-  <refentrytitle><application>postmaster</application></refentrytitle>
-  <manvolnum>1</manvolnum>
-  <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
-  <refname>postmaster</refname>
-  <refpurpose><productname>PostgreSQL</productname> database server</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>postmaster</command>
-   <arg rep="repeat"><replaceable>option</replaceable></arg>
-  </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
-  <title>Description</title>
-
-  <para>
-   <command>postmaster</command> is a deprecated alias of <command>postgres</command>.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>See Also</title>
-
-  <para>
-   <xref linkend="app-postgres"/>
-  </para>
- </refsect1>
-</refentry>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index a3b743e8c1e7..e11b4b613075 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -289,7 +289,6 @@ <title>PostgreSQL Server Applications</title>
    &pgupgrade;
    &pgwaldump;
    &postgres;
-   &postmaster;
 
  </reference>
 
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 181c217fae4c..ed364543b74e 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -208,12 +208,6 @@ endif
 
 install-bin: postgres $(POSTGRES_IMP) installdirs
 	$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
-ifneq ($(PORTNAME), win32)
-	@rm -f '$(DESTDIR)$(bindir)/postmaster$(X)'
-	ln -s postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
-else
-	$(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postmaster$(X)'
-endif
 ifeq ($(MAKE_EXPORTS), true)
 	$(INSTALL_DATA) $(POSTGRES_IMP) '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
 	$(INSTALL_PROGRAM) $(MKLDEXPORT) '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
@@ -242,7 +236,7 @@ endif
 ##########################################################################
 
 uninstall:
-	rm -f '$(DESTDIR)$(bindir)/postgres$(X)' '$(DESTDIR)$(bindir)/postmaster'
+	rm -f '$(DESTDIR)$(bindir)/postgres$(X)'
 ifeq ($(MAKE_EXPORTS), true)
 	rm -f '$(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)'
 	rm -f '$(DESTDIR)$(pgxsdir)/$(MKLDEXPORT_DIR)/mkldexport.sh'
-- 
2.38.1



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 14:18  Joe Conway <[email protected]>
  parent: Peter Eisentraut <[email protected]>
  0 siblings, 1 reply; 15+ messages in thread

From: Joe Conway @ 2022-11-23 14:18 UTC (permalink / raw)
  To: Peter Eisentraut <[email protected]>; pgsql-hackers; Devrim GUNDUZ <[email protected]>

On 11/23/22 02:52, Peter Eisentraut wrote:
> A little while ago we discussed briefly over in the meson thread whether
> we could remove the postmaster symlink [0].  The meson build system
> currently does not install a postmaster symlink.  (AFAICT, the MSVC
> build system does not either.)  So if we want to elevate the meson build
> system, we either need to add the postmaster symlink, or remove it from
> the other build system(s) as well.  Seeing that it's been deprecated for
> a long time, I propose we just remove it.  See attached patches.

I am a big +1 on removing the symlink, however it is worth pointing out 
that the PGDG RPMs still use the symlink in the included systemd service 
file:

8<----------
ExecStart=/usr/pgsql-15/bin/postmaster -D ${PGDATA}
8<----------

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 14:28  Devrim Gündüz <[email protected]>
  parent: Joe Conway <[email protected]>
  0 siblings, 1 reply; 15+ messages in thread

From: Devrim Gündüz @ 2022-11-23 14:28 UTC (permalink / raw)
  To: Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

Hi,

On Wed, 2022-11-23 at 09:18 -0500, Joe Conway wrote:
> I am a big +1 on removing the symlink, however it is worth pointing
> out 
> that the PGDG RPMs still use the symlink in the included systemd
> service 
> file:
> 
> 8<----------
> ExecStart=/usr/pgsql-15/bin/postmaster -D ${PGDATA}


...and it helps us to find the "main" process a bit easily.

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachments:

  [application/pgp-signature] signature.asc (833B, ../../[email protected]/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 15:07  Tom Lane <[email protected]>
  parent: Devrim Gündüz <[email protected]>
  0 siblings, 1 reply; 15+ messages in thread

From: Tom Lane @ 2022-11-23 15:07 UTC (permalink / raw)
  To: Devrim Gündüz <[email protected]>; +Cc: Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= <[email protected]> writes:
> ...and it helps us to find the "main" process a bit easily.

Hmm, that's a nontrivial point perhaps.  It's certain that this
will break some other people's start scripts too.  On the whole,
is it really that hard to add the symlink to the meson build?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 19:50  Andres Freund <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 2 replies; 15+ messages in thread

From: Andres Freund @ 2022-11-23 19:50 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Devrim Gündüz <[email protected]>; Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

Hi,

On 2022-11-23 10:07:49 -0500, Tom Lane wrote:
> Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= <[email protected]> writes:
> > ...and it helps us to find the "main" process a bit easily.
> 
> Hmm, that's a nontrivial point perhaps.  It's certain that this
> will break some other people's start scripts too.

OTOH, postmaster has been deprecated for ~15 years.


> On the whole, is it really that hard to add the symlink to the meson build?

No. Meson has a builtin command for it, just not in the meson version we're
currently requiring. We can create the symlink ourselves instead. The problem
is just detecting systems where we can't symlink and what to fall back to
there.

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 20:10  Robert Haas <[email protected]>
  parent: Andres Freund <[email protected]>
  1 sibling, 2 replies; 15+ messages in thread

From: Robert Haas @ 2022-11-23 20:10 UTC (permalink / raw)
  To: Andres Freund <[email protected]>; +Cc: Tom Lane <[email protected]>; Devrim Gündüz <[email protected]>; Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

On Wed, Nov 23, 2022 at 2:50 PM Andres Freund <[email protected]> wrote:
> On 2022-11-23 10:07:49 -0500, Tom Lane wrote:
> > Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= <[email protected]> writes:
> > > ...and it helps us to find the "main" process a bit easily.
> >
> > Hmm, that's a nontrivial point perhaps.  It's certain that this
> > will break some other people's start scripts too.
>
> OTOH, postmaster has been deprecated for ~15 years.

Yeah. Also, I don't think it's generally too hard to find the parent
process anyway, because at least on my system, the other ones end up
with ps display that looks like "postgres: logical replication
launcher" or whatever. The main process doesn't set the ps status
display, so that's the only one that shows a full path to the
executable in the ps status, which is how I usually spot it. That has
the advantage that it doesn't matter which name was used to launch it,
too.

I don't actually care very much whether we get rid of the postmaster
symlink or not, but if we aren't going to, we should stop calling it
deprecated. If 15 years isn't enough time to remove it, what ever will
be? I tend to think it's fairly pointless and perhaps also a bit
confusing, because the product is postgres not postmaster and people
can reasonably expect the binary name to match the product name. But
if we keep it, I don't think anything too dire will happen, either.

-- 
Robert Haas
EDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 20:32  Joe Conway <[email protected]>
  parent: Robert Haas <[email protected]>
  1 sibling, 0 replies; 15+ messages in thread

From: Joe Conway @ 2022-11-23 20:32 UTC (permalink / raw)
  To: Robert Haas <[email protected]>; Andres Freund <[email protected]>; +Cc: Tom Lane <[email protected]>; Devrim Gündüz <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

On 11/23/22 15:10, Robert Haas wrote:
> On Wed, Nov 23, 2022 at 2:50 PM Andres Freund <[email protected]> wrote:
>> On 2022-11-23 10:07:49 -0500, Tom Lane wrote:
>> > Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= <[email protected]> writes:
>> > > ...and it helps us to find the "main" process a bit easily.
>> >
>> > Hmm, that's a nontrivial point perhaps.  It's certain that this
>> > will break some other people's start scripts too.
>>
>> OTOH, postmaster has been deprecated for ~15 years.
> 
> Yeah. Also, I don't think it's generally too hard to find the parent
> process anyway, because at least on my system, the other ones end up
> with ps display that looks like "postgres: logical replication
> launcher" or whatever. The main process doesn't set the ps status
> display, so that's the only one that shows a full path to the
> executable in the ps status, which is how I usually spot it. That has
> the advantage that it doesn't matter which name was used to launch it,
> too.

Same here

> I don't actually care very much whether we get rid of the postmaster
> symlink or not, but if we aren't going to, we should stop calling it
> deprecated. If 15 years isn't enough time to remove it, what ever will
> be? I tend to think it's fairly pointless and perhaps also a bit
> confusing, because the product is postgres not postmaster and people
> can reasonably expect the binary name to match the product name. But
> if we keep it, I don't think anything too dire will happen, either.

FWIW, the reason I took note of the postmaster symlink in the first 
place a few years ago was because selinux treats execution of programs 
from symlinks differently than from actual files.

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 20:48  Tom Lane <[email protected]>
  parent: Andres Freund <[email protected]>
  1 sibling, 1 reply; 15+ messages in thread

From: Tom Lane @ 2022-11-23 20:48 UTC (permalink / raw)
  To: Andres Freund <[email protected]>; +Cc: Devrim Gündüz <[email protected]>; Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

Andres Freund <[email protected]> writes:
> On 2022-11-23 10:07:49 -0500, Tom Lane wrote:
>> On the whole, is it really that hard to add the symlink to the meson build?

> No. Meson has a builtin command for it, just not in the meson version we're
> currently requiring. We can create the symlink ourselves instead. The problem
> is just detecting systems where we can't symlink and what to fall back to
> there.

This isn't a hill I want to die on, either way.  But "it's a bit
more complicated in meson" seems like a poor reason for changing
the user-visible installed fileset.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-23 21:08  Andres Freund <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 0 replies; 15+ messages in thread

From: Andres Freund @ 2022-11-23 21:08 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Devrim Gündüz <[email protected]>; Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

Hi,

On 2022-11-23 15:48:04 -0500, Tom Lane wrote:
> Andres Freund <[email protected]> writes:
> > On 2022-11-23 10:07:49 -0500, Tom Lane wrote:
> >> On the whole, is it really that hard to add the symlink to the meson build?
>
> > No. Meson has a builtin command for it, just not in the meson version we're
> > currently requiring. We can create the symlink ourselves instead. The problem
> > is just detecting systems where we can't symlink and what to fall back to
> > there.
>
> This isn't a hill I want to die on, either way.  But "it's a bit
> more complicated in meson" seems like a poor reason for changing
> the user-visible installed fileset.

I wouldn't even have thought about proposing dropping the symlink if it hadn't
been deprecated forever, and I suspect Peter wouldn't have either...

I think this is a bit more more complicated than "changing the user-visible
installed fileset" because we didn't have logic to create 'postmaster' on
windows before, afaik the only OS without reliable symlink support.

Anyway, my current thinking is to have dumb OS dependent behaviour and create
a symlink everywhere but windows, where we'd just copy the file.

Or we could just continue to not install 'postmaster' on windows, because of
the potential confusion that 'postmaster.exe' differing from 'postgres.exe'
could cause.

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: drop postmaster symlink
@ 2022-11-24 00:15  Daniel Gustafsson <[email protected]>
  parent: Robert Haas <[email protected]>
  1 sibling, 0 replies; 15+ messages in thread

From: Daniel Gustafsson @ 2022-11-24 00:15 UTC (permalink / raw)
  To: Robert Haas <[email protected]>; +Cc: Andres Freund <[email protected]>; Tom Lane <[email protected]>; Devrim Gündüz <[email protected]>; Joe Conway <[email protected]>; Peter Eisentraut <[email protected]>; pgsql-hackers

> On 23 Nov 2022, at 21:10, Robert Haas <[email protected]> wrote:

> I don't actually care very much whether we get rid of the postmaster
> symlink or not, but if we aren't going to, we should stop calling it
> deprecated. If 15 years isn't enough time to remove it, what ever will
> be?

+1.  If we actively add support for something then it isn't really all that
deprecated IMHO.

--
Daniel Gustafsson		https://vmware.com/






^ permalink  raw  reply  [nested|flat] 15+ messages in thread


end of thread, other threads:[~2022-11-24 00:15 UTC | newest]

Thread overview: 15+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 00:13 [PATCH v1] Cleanup/remove/update references to OID column... Justin Pryzby <[email protected]>
2019-04-03 00:13 [PATCH v3 12/12] Cleanup/remove/update references to OID column... Justin Pryzby <[email protected]>
2019-04-03 00:13 [PATCH v3] Cleanup/remove/update references to OID column... Justin Pryzby <[email protected]>
2019-04-03 00:13 [PATCH v2] Cleanup/remove/update references to OID column... Justin Pryzby <[email protected]>
2019-05-08 18:57 [PATCH v1] Cleanup/remove/update references to OID column... Justin Pryzby <[email protected]>
2022-11-23 07:52 drop postmaster symlink Peter Eisentraut <[email protected]>
2022-11-23 14:18 ` Re: drop postmaster symlink Joe Conway <[email protected]>
2022-11-23 14:28   ` Re: drop postmaster symlink Devrim Gündüz <[email protected]>
2022-11-23 15:07     ` Re: drop postmaster symlink Tom Lane <[email protected]>
2022-11-23 19:50       ` Re: drop postmaster symlink Andres Freund <[email protected]>
2022-11-23 20:10         ` Re: drop postmaster symlink Robert Haas <[email protected]>
2022-11-23 20:32           ` Re: drop postmaster symlink Joe Conway <[email protected]>
2022-11-24 00:15           ` Re: drop postmaster symlink Daniel Gustafsson <[email protected]>
2022-11-23 20:48         ` Re: drop postmaster symlink Tom Lane <[email protected]>
2022-11-23 21:08           ` Re: drop postmaster symlink Andres Freund <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox