Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Alan Hodgson
On Wed, 2021-06-23 at 17:25 -0500, Jerry LeVan wrote: > > So the question is: Why does using the short name evidently cause postresql > to use the ipv6 address > and using the full name use the ipv4 address? I'm thinking this might be coming from Avahi, which might be enabled on Fedora by default

Re: Partitioned Table Index Column Order

2021-06-23 Thread David Rowley
On Thu, 24 Jun 2021 at 11:56, Tom Lane wrote: > > David Rowley writes: > > On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera > > wrote: > >> It is not relevant from the partitioning point of view. Other factors > >> can be used to decide the column order. > > > I'm not so sure that's really 100% tr

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Tom Lane
Jerry LeVan writes: > bigbox has a freshly installed Fedora 34 system and it runs postgresql 13.3 > the following are being run ON bigbox > nslookup bigbox returns the correct ipv4 address > nslookup bigbox.skynet returns the correct ipv4 address > psql -h bigbox.skynet allows me to connect to

Re: Partitioned Table Index Column Order

2021-06-23 Thread Tom Lane
David Rowley writes: > On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote: >> It is not relevant from the partitioning point of view. Other factors >> can be used to decide the column order. > I'm not so sure that's really 100% true. There is at least one > partitioning feature that will work

Re: Partitioned Table Index Column Order

2021-06-23 Thread David Rowley
On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote: > > On 2021-Jun-23, Rumpi Gravenstein wrote: > > > As a best practice is it better to create the primary key starting or > > ending with the partition column? > > It is not relevant from the partitioning point of view. Other factors > can be use

Re: Partitioned Table Index Column Order

2021-06-23 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Jun-23, Rumpi Gravenstein wrote: >> As a best practice is it better to create the primary key starting or >> ending with the partition column? > It is not relevant from the partitioning point of view. Other factors > can be used to decide the column order. See i

Re: Is there something similar like flashback query from Oracle planned for PostgreSQL

2021-06-23 Thread Thomas Munro
On Thu, Jun 24, 2021 at 6:54 AM Dirk Krautschick wrote: > Is there something planned to get a behaviour like Oracle's flashback query > based on the old values > before deleted by vacuum? > > So a feature to recreate old versions of rows if still there? > > Or are there any related extensions or

Re: How to hash a large amount of data within Postgres?

2021-06-23 Thread Tomas Vondra
On 6/23/21 7:39 PM, Peter J. Holzer wrote: > On 2021-06-21 15:53:09 +0200, Thorsten Schöning wrote: >> Some years ago I implemented some SQL to read all files, build a table >> of SHA256 hashes and tell me how much data is redundant. The goal was >> to have a look at which files share the same hash

Re: Partitioned Table Index Column Order

2021-06-23 Thread Alvaro Herrera
On 2021-Jun-23, Rumpi Gravenstein wrote: > As a best practice is it better to create the primary key starting or > ending with the partition column? It is not relevant from the partitioning point of view. Other factors can be used to decide the column order. -- Álvaro Herrera Valdivia, C

Partitioned Table Index Column Order

2021-06-23 Thread Rumpi Gravenstein
All, I'm on PostgreSQL 13 and have a partitioned table with a primary key. create table t( a integer, b integer, c varchar, d .. ) partitioned by range( a ); As a best practice is it better to create the primary key starting or ending with the partition column? e.g. 1) t_pkey primary key (a, b

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Jerry LeVan
> On Jun 23, 2021, at 12:51 PM, Peter J. Holzer wrote: > > On 2021-06-21 19:44:16 -0500, Jerry Levan wrote: >> The below fails... the 'fe80' is the ip6 address of big box. >> [jerry@bigbox ~]$ psql -h bigbox >> psql: error: FATAL: no pg_hba.conf entry for host >> "fe80::fe3f:dbff:fed1:f6

Re: Is there something similar like flashback query from Oracle planned for PostgreSQL

2021-06-23 Thread Vijaykumar Jain
On Thu, 24 Jun 2021 at 00:24, Dirk Krautschick < dirk.krautsch...@trivadis.com> wrote: > Hi, > Is there something planned to get a behaviour like Oracle's flashback > query based on the old values > before deleted by vacuum? > > So a feature to recreate old versions of rows if still there? > > Or

Re: Postgres PANIC when it could not open file in pg_logical/snapshots directory

2021-06-23 Thread Vijaykumar Jain
On Tue, 22 Jun 2021 at 14:34, Vijaykumar Jain < vijaykumarjain.git...@gmail.com> wrote: > > On Tue, 22 Jun 2021 at 13:32, Mike Yeap wrote: > >> Hi all, >> >> I have a Postgres version 11.11 configured with both physical replication >> slots (for repmgr) as well as some logical replication slots (

Is there something similar like flashback query from Oracle planned for PostgreSQL

2021-06-23 Thread Dirk Krautschick
Hi, just a curious question... Is there something planned to get a behaviour like Oracle's flashback query based on the old values before deleted by vacuum? So a feature to recreate old versions of rows if still there? Or are there any related extensions or tools doing this? Thanks Dirk

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Peter J. Holzer
On 2021-06-21 19:44:16 -0500, Jerry Levan wrote: > The below fails... the 'fe80' is the ip6 address of big box. > [jerry@bigbox ~]$ psql -h bigbox > psql: error: FATAL: no pg_hba.conf entry for host > "fe80::fe3f:dbff:fed1:f62e%enp7s0", user "lxxx", database "lxxx", SSL off This looks like a

Re: How to hash a large amount of data within Postgres?

2021-06-23 Thread Peter J. Holzer
On 2021-06-21 15:53:09 +0200, Thorsten Schöning wrote: > Some years ago I implemented some SQL to read all files, build a table > of SHA256 hashes and tell me how much data is redundant. The goal was > to have a look at which files share the same hash with different LOIDs > and optionally change th

Re: [postgis-users] Exclusion constraint with custom operator not working as expected

2021-06-23 Thread Komяpa
Hello, The reason why constraint is not working is that GIST scan using your operator does not return what you expect. Deeper debugging needed on your side to fix that select to return the rows you need. 12:23:37 [kom] > explain select * from test_1 where g |*| 'LINESTRING(10 10,50 50)'; ┌──