Are advisory locks guaranteed to be First Come First Serve? And can the behavior be relied upon?

2020-08-26 Thread Hemil Ruparel
I was playing with Advisory locks. I opened three connections to the database And obtained a lock with the same key. I noticed that the locks were obtained in the order of requests. I was wondering whether the locks are guaranteed to be First Come First Serve and can this behaviour be relied upon.

Re: Calling a SQL function inside a C function

2020-08-26 Thread Pavel Stehule
Hi čt 27. 8. 2020 v 0:43 odesílatel Eric Zhu napsal: > How do I call a function defined using CREATE FUNCTION in SQL inside a C > function in an extension? I feel this should be possible as the query > parser is able to resolve the function names and arguments in a raw string > query. I want to

Re: Database cluster binary compatibility accross CPU platforms

2020-08-26 Thread Tom Lane
=?UTF-8?B?QWxlxaEgWmVsZW7DvQ==?= writes: > is it supported to restore binary backup (pg_basebackup) taken on an amd64 > platform on arm64 while using the same PostgreSQL version? I wouldn't say it's "supported", but you might get away with it, if the endianness and datatype alignment rules are

Calling a SQL function inside a C function

2020-08-26 Thread Eric Zhu
How do I call a function defined using CREATE FUNCTION in SQL inside a C function in an extension? I feel this should be possible as the query parser is able to resolve the function names and arguments in a raw string query. I want to know if there is a standard way to look up for user-defined

Database cluster binary compatibility accross CPU platforms

2020-08-26 Thread Aleš Zelený
Hello, is it supported to restore binary backup (pg_basebackup) taken on an amd64 platform on arm64 while using the same PostgreSQL version? I'd like to know, whether there is binary file compatibility to save time needed for dump & restore migration scenario or all the complexity of using

Re: Finding description pg_description

2020-08-26 Thread Tom Lane
Susan Hurst writes: > How do I find the source of an objoid from pg_catalog.pg_description? The classoid column holds the OID of the system catalog that contains the object's defining row. The objoid column is the OID of the object, ie the "oid" column of that row. (If you are working with a

Re: export to parquet

2020-08-26 Thread George Woodring
I don't know how many hoops you want to jump through, we use AWS and Athena to create them. - Export table as JSON - Put on AWS S3 - Create JSON table in Athena - Use the JSON table to create a parquet table The parquet files will be in S3 as well after the parquet table is created.

Re: export to parquet

2020-08-26 Thread Scott Ribe
> On Aug 26, 2020, at 1:11 PM, Chris Travers wrote: > > For simple exporting, the simplest thing is a single-node instance of Spark. Thanks. > You can read parquet files in Postgres using > https://github.com/adjust/parquet_fdw if you so desire but it does not > support writing as parquet

Re: export to parquet

2020-08-26 Thread Chris Travers
On Wed, Aug 26, 2020 at 9:00 PM Scott Ribe wrote: > I have no Hadoop, no HDFS. Just looking for the easiest way to export some > PG tables into Parquet format for testing--need to determine what kind of > space reduction we can get before deciding whether to look into it more. > > Any

export to parquet

2020-08-26 Thread Scott Ribe
I have no Hadoop, no HDFS. Just looking for the easiest way to export some PG tables into Parquet format for testing--need to determine what kind of space reduction we can get before deciding whether to look into it more. Any suggestions on particular tools? (PG 12, Linux) -- Scott Ribe

Finding description pg_description

2020-08-26 Thread Susan Hurst
How do I find the source of an objoid from pg_catalog.pg_description? I comment everything in my databases and can find most of the comments in pg_catalog.pd_description, which only gives me objoid and classoid for the source of a comment. If I could find the oid sources I could make this

aarch64 support is available on yum.postgresql.org

2020-08-26 Thread Devrim Gündüz
The yum.postgresql.org repository now includes support for aarch64(arm64) architecture. HUAWEI Cloud Services donated two arm64 build host with enough resources to build the arm64 packages at the same speed as the existing x86_64, i686, and ppc64le architectures. These new 2 repos include the