diff --git a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
index 05d675509b..d9fa6182e3 100644
--- a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
+++ b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
@@ -55,6 +55,30 @@ abstract class RelationshipPluginBase extends HandlerBase {
    */
   public $alias;
 
+  /**
+   * The full table alias.
+   *
+   * @var string
+   */
+  protected $fullAlias;
+
+  /**
+   * A shortened alias name.
+   *
+   * The shortened alias is used to conform to alias length limitations in some
+   * databases. E.g. PostgreSQL 63 characters.
+   * @var string
+   */
+  protected $shortAlias;
+
+
+  /**
+   * The size limit on table alias names.
+   *
+   * Aliases longer than this will be substituted with the short alias.
+   */
+  const ALIAS_LENGTH_LIMIT = 19;
+
   /**
    * Overrides \Drupal\views\Plugin\views\HandlerBase::init().
    *
@@ -155,10 +179,18 @@ public function query() {
     else {
       $id = 'standard';
     }
+
     $join = Views::pluginManager('join')->createInstance($id, $def);
 
-    // use a short alias for this:
     $alias = $def['table'] . '_' . $this->table;
+    $this->fullAlias = $alias;
+
+    if (strlen($alias) > self::ALIAS_LENGTH_LIMIT ) {
+      $hash = sha1($alias);
+
+      $alias = 'alias_' . substr($hash, 0, 8);
+      $this->shortAlias = $alias;
+    }
 
     $this->alias = $this->query->addRelationship($alias, $join, $this->definition['base'], $this->relationship);
 
@@ -180,8 +212,28 @@ public function calculateDependencies() {
     return $dependencies;
   }
 
-}
+  /**
+   * {@inheritdoc}
+   */
+  public function postExecute(&$values) {
 
-/**
- * @}
- */
+    if (empty($this->shortAlias)) {
+      return NULL;
+    }
+
+    foreach($values as $v) {
+      $properties = array_keys(get_object_vars($v));
+
+      foreach($properties as $property) {
+        if (str_starts_with($property, $this->shortAlias)) {
+          $new_property = str_replace($this->shortAlias, $this->fullAlias, $property);
+
+          $v->{$new_property} = $v->{$property};
+          unset($v->{$property});
+        }
+      }
+    }
+
+  }
+
+}
