Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-18 Thread Frank Millman
Merlin Moncure wrote: On Thu, Sep 14, 2017 at 8:17 AM, Pavel Stehule wrote: > > > > > The PostgreSQL cannot to push join - in slow case, the UNIONS should be done > > first - and it requires full scan ar_tran_inv - used filter (posted AND > > (deleted_id = 0) is not too effective - maybe some comp

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-18 Thread Merlin Moncure
On Thu, Sep 14, 2017 at 8:17 AM, Pavel Stehule wrote: > 2017-09-14 15:09 GMT+02:00 Pavel Stehule : >> >> >> >> 2017-09-14 14:59 GMT+02:00 Frank Millman : >>> >>> Pavel Stehule wrote: >>> >>> 2017-09-14 10:14 GMT+02:00 Frank Millman : Hi all This is a follow-up to a recent quest

Re: [GENERAL] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Sep 18, 2017 at 12:36 PM, Tom Lane wrote: >> I wouldn't say it's desired behavior, exactly, but there's no very >> good way to improve it. pg_ctl has no visibility into what the postmaster >> is thinking. > The function signature (and docs) for pg_reload_co

Re: [GENERAL] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread David G. Johnston
On Mon, Sep 18, 2017 at 12:36 PM, Tom Lane wrote: > jotpe writes: > > A system administration applied an invalid line into the pg_hba.conf > > file and called "service postgresql reload". Since that command doesn't > > return any error and leaves with exit code 0 it seams that new > > configurat

Re: [GENERAL] looking for a globally unique row ID

2017-09-18 Thread Rafal Pietrak
W dniu 18.09.2017 o 17:26, Jehan-Guillaume (ioguix) de Rorthais pisze: > On Sat, 16 Sep 2017 12:15:46 +0200 > Rafal Pietrak wrote: > >> W dniu 16.09.2017 o 09:33, Jehan-Guillaume de Rorthais pisze: [-] > > About FK, just look at pgsql trigger code around real FK and adjust to your

Re: [GENERAL] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread Tom Lane
jotpe writes: > A system administration applied an invalid line into the pg_hba.conf > file and called "service postgresql reload". Since that command doesn't > return any error and leaves with exit code 0 it seams that new > configuration was applied. > Of course postgresql added a warning to

[GENERAL] reload postgresql with invalid pg_hba.conf

2017-09-18 Thread jotpe
A system administration applied an invalid line into the pg_hba.conf file and called "service postgresql reload". Since that command doesn't return any error and leaves with exit code 0 it seams that new configuration was applied. Of course postgresql added a warning to the log file: "pg_hba.c

[GENERAL] Call a builtin function from Devart's linqConnect

2017-09-18 Thread marcelo
Sorry I'm asking this question to the list, but the Devart's documentation is very sparse. I would like to call pg_try_advisory_lock( bigint ) and corresponding pg_advisory_unlock( bigint ) from my DAL library. Does someone use this ORM, and call server functions using it? How is it done, an

Re: [GENERAL] looking for a globally unique row ID

2017-09-18 Thread Jehan-Guillaume (ioguix) de Rorthais
On Sat, 16 Sep 2017 12:15:46 +0200 Rafal Pietrak wrote: > W dniu 16.09.2017 o 09:33, Jehan-Guillaume de Rorthais pisze: > > > [-] > > > > I wrote something about this some years ago, this might do the trick for > > you, maybe with some adjustments depending on your schema. The mai

Re: [GENERAL] Selecting a daily puzzle record - which type of column to add?

2017-09-18 Thread Melvin Davidson
On Mon, Sep 18, 2017 at 9:30 AM, Ron Johnson wrote: > On 09/18/2017 08:17 AM, Melvin Davidson wrote: > [snip] > > I don't have any specific suggestion for an additional column, other than > Berend's idea. However, I strongly advise against the use > of ENUM's. They can create a major problem in t

Re: [GENERAL] Selecting a daily puzzle record - which type of column to add?

2017-09-18 Thread Ron Johnson
On 09/18/2017 08:17 AM, Melvin Davidson wrote: [snip] I don't have any specific suggestion for an additional column, other than Berend's idea. However, I strongly advise against the use of ENUM's. They can create a major problem in the event one needs to be removed. Because it will internally

Re: [GENERAL] Selecting a daily puzzle record - which type of column to add?

2017-09-18 Thread Melvin Davidson
On Mon, Sep 18, 2017 at 7:59 AM, Berend Tober wrote: > Alexander Farber wrote: > >> Good evening, >> >> In a word game I store all player moves in the table: >> >> CREATE TYPE words_action AS ENUM ( >> 'play', >> 'skip', >> 'swap', >> 'resign', >> 'ban', >>

Re: [GENERAL] Selecting a daily puzzle record - which type of column to add?

2017-09-18 Thread Berend Tober
Alexander Farber wrote: Good evening, In a word game I store all player moves in the table: CREATE TYPE words_action AS ENUM ( 'play', 'skip', 'swap', 'resign', 'ban', 'expire' ); CREATE TABLE words_moves ( mid BIGSERIAL PRIMARY KEY,

Re: [GENERAL] pg_rewind issue

2017-09-18 Thread Michael Paquier
On Mon, Sep 18, 2017 at 1:36 PM, James Sewell wrote: > When Iook at timeline 15 I see this: > > 20 C74/4500no recovery target specified+ This refers to timeline 20. Are there other entries in this history file? Isn't timeline 15 a direct parent of timeline 20? > As 00150C730

Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory

2017-09-18 Thread milist ujang
Hi Craig, So, is it safe to drop those list from this query output? select riname from pg_replication_identifier where riname not in (select external_id from pg_replication_identifier_progress); I cannot read pg_get_replication_identifier_progress function, is it likely c function? On Fri, S