Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 16DDC200C0C for ; Mon, 30 Jan 2017 20:52:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 15634160B4D; Mon, 30 Jan 2017 19:52:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 39D73160B35 for ; Mon, 30 Jan 2017 20:52:00 +0100 (CET) Received: (qmail 74682 invoked by uid 500); 30 Jan 2017 19:51:59 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 74670 invoked by uid 99); 30 Jan 2017 19:51:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2017 19:51:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8F1031A0294 for ; Mon, 30 Jan 2017 19:51:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pivotal-io.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lc7eapHiH8SK for ; Mon, 30 Jan 2017 19:51:55 +0000 (UTC) Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1112B5F46D for ; Mon, 30 Jan 2017 19:51:54 +0000 (UTC) Received: by mail-qk0-f169.google.com with SMTP id 11so141087212qkl.3 for ; Mon, 30 Jan 2017 11:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TGsoFVDSyxK924pR3ImXTTG3YWTDj46h6HGsTFxaHX8=; b=taSHndjDgLjCqZJhUJZV2NcjbOJO4oDKlA943BFTCq82dpwjEpdFsJ1AQm5YRdrJGO IsF0tjjYgurZg8gCQLcp2cwK1sGXc/UTQ1viS43uPaiL2RmqePMW8rSvx2ZDA0B40XLc DLkta34UQlqMlgOwh/EKXqWEiHFRD/4BuURGoS88oHy2tNNdZJDqwtBmSZ+UElJZXAph 0dwJyFV0BJwH31mwaviXaUM6/MoihX2aYuDxbbLrYXwQ7Ri6jH2ldMn1XtNdLOZNOOPJ clxUAfi0orzXhZHqInItnu0e8DgnPBtT3XA8zgGKaHT7tjgO03CqnVti/Lk0Ah9gtLyB S1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TGsoFVDSyxK924pR3ImXTTG3YWTDj46h6HGsTFxaHX8=; b=lm/heN3VMoV+Gf4NavhftOzcvftpKz7WW8gK0iHNzs307Vn+stdfA5cQIMDAPN7Usk e5owML+aP18hu1/Rhgbbx0rwZfxlzvkVnYFr0hPAfX30ny79urjkOye/lA89gbxpphUH v2FQqdxVCL6cFVrC83/b+M7pZRfXnJthCluMxBQjgUJ4GuwsIC0lZ4IRuIuGNRZcI8e7 94fSdPQKF4sPUBZP4+FUXmfFBxzwLFSQaOnR6r9U3QJ7J73Z5mnr8lE9MsAHtTtgB9Is npeXerMqXID0fbRgGxE+IxyaOZOKItfG8z1Im0nEcC3lJjOAhFtxLOCiMLGldphPhuil nrMA== X-Gm-Message-State: AIkVDXI6Sb90X0tzkrM/fqZUj7FRkzpUmgLVRaT9o10oeSo7cTkBEDaQj95etpVtyB1GSBnGzcDc7tRU6KjV9K42 X-Received: by 10.233.216.68 with SMTP id u65mr23210917qkf.68.1485805913748; Mon, 30 Jan 2017 11:51:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.81.135 with HTTP; Mon, 30 Jan 2017 11:51:53 -0800 (PST) In-Reply-To: References: From: "Alex (Oleksandr) Diachenko" Date: Mon, 30 Jan 2017 11:51:53 -0800 Message-ID: Subject: Re: PXF HCatalog Issue for Non-Super User To: dev@hawq.incubator.apache.org Cc: user@hawq.incubator.apache.org Content-Type: multipart/alternative; boundary=94eb2c043ac6b211860547552544 archived-at: Mon, 30 Jan 2017 19:52:01 -0000 --94eb2c043ac6b211860547552544 Content-Type: text/plain; charset=UTF-8 Gagan, Correct, that's was a mandatory condition for HCatalog intergration to work properly before the HAWQ-1130 fix. Regards, Alex. On Mon, Jan 30, 2017 at 11:30 AM, Gagan Brahmi wrote: > Appreciate that info Alex. Granting SELECT or SUPERUSER only viable > workaround for this problem for now. Is that a right understanding? > > > Regards, > Gagan Brahmi > > On Mon, Jan 30, 2017 at 12:07 PM, Alex (Oleksandr) Diachenko < > odiachenko@pivotal.io> wrote: > > > Hi Gagan, > > > > The issue you described was a real limitation before > > https://issues.apache.org/jira/browse/HAWQ-1130 was reported. > > As for now the issue was resolved and targeted for next > 2.1.0.0-incubating > > open-source release. > > > > Regards, Alex. > > > > > > On Mon, Jan 30, 2017 at 10:08 AM, Gagan Brahmi > > wrote: > > > >> Hi All, > >> > >> I am not sure if anyone has faced issue for a non-privileged HAWQ user > >> while access hive table using HCatalog. The issue is encountered when a > >> non-privileged user tries to query the hive table (hive_table) under any > >> database (default in this example) using hcatalog > >> (hcatalog.default.hive_table). > >> > >> However, when you describe the table (\d) there is no issue encountered. > >> > >> I have tested this on HDB 2.0.0 and HDB 2.0.1. > >> > >> For the non-privileged user the following is the behavior when trying to > >> access the data using SELECT: > >> > >> -------------------- > >> > >> postgres=> SELECT * FROM hcatalog.default.hive_table; > >> ERROR: permission denied for relation pg_authid > >> LINE 1: SELECT COUNT(*) FROM hcatalog.default.hive_table; > >> ^ > >> CONTEXT: SQL statement "SELECT max(oid) FROM (SELECT max(oid) AS oid > FROM > >> pg_extprotocol UNION ALL SELECT max(oid) AS oid FROM pg_partition UNION > >> ALL > >> SELECT max(oid) AS oid FROM pg_partition_rule UNION ALL SELECT max(oid) > AS > >> oid FROM pg_filespace UNION ALL SELECT max(oid) AS oid FROM > pg_compression > >> UNION ALL SELECT max(oid) AS oid FROM pg_filesystem UNION ALL SELECT > >> max(oid) AS oid FROM pg_foreign_data_wrapper UNION ALL SELECT max(oid) > AS > >> oid FROM pg_foreign_server UNION ALL SELECT max(oid) AS oid FROM > >> pg_database UNION ALL SELECT max(oid) AS oid FROM pg_type UNION ALL > SELECT > >> max(oid) AS oid FROM pg_proc UNION ALL SELECT max(oid) AS oid FROM > >> pg_class > >> UNION ALL SELECT max(oid) AS oid FROM pg_attrdef UNION ALL SELECT > max(oid) > >> AS oid FROM pg_constraint UNION ALL SELECT max(oid) AS oid FROM > >> pg_operator > >> UNION ALL SELECT max(oid) AS oid FROM pg_opclass UNION ALL SELECT > max(oid) > >> AS oid FROM pg_am UNION ALL SELECT max(oid) AS oid FROM pg_language > UNION > >> ALL SELECT max(oid) AS oid FROM pg_rewrite UNION ALL SELECT max(oid) AS > >> oid > >> FROM pg_trigger UNION ALL SELECT max(oid) AS oid FROM pg_cast UNION ALL > >> SELECT max(oid) AS oid FROM pg_namespace UNION ALL SELECT max(oid) AS > oid > >> FROM pg_conversion UNION ALL SELECT max(oid) AS oid FROM pg_tablespace > >> UNION ALL SELECT max(oid) AS oid FROM pg_resqueue UNION ALL SELECT > >> max(oid) > >> AS oid FROM pg_authid UNION ALL SELECT max(oid) AS oid FROM > >> pg_user_mapping) AS x" > >> > >> postgres=> SELECT * FROM hcatalog.default.hive_table; > >> ERROR: database does not have enough available Oids to support HCatalog > >> queries > >> LINE 1: SELECT * FROM hcatalog.default.hive_table; > >> ^ > >> HINT: Database VACUUM may recycle unused Oids. > >> > >> > >> postgres=> \d hcatalog.default.hive_table > >> > >> PXF Hive Table > >> "default.hive_table" > >> Column | Type > >> --------+------ > >> id | int4 > >> fname | text > >> lname | text > >> > >> -------------------- > >> > >> I was able to get around this problem by granting SELECT on pg_authid > and > >> pg_user_mapping table which fixes the underlying query to grab the max > >> Oid. > >> > >> Is this is a known issue or is there any better workaround for this > >> behavior? Or anything other than granting the user SUPERUSER privileges? > >> > >> > >> Regards, > >> Gagan Brahmi > >> > > > > > --94eb2c043ac6b211860547552544--