El 10/02/16 a las 21:46, Tom Lane escribió: > > Think you're outta luck on that. If we logged the duration before > commit, it would be entirely misleading for short commands, because > the time needed to commit wouldn't be included. So we log it after, > when there's no longer any active transaction. Any other way to log the DDL and DML statements (maybe delay writing the log until the xid is available)? Yes, I know the complexity of this, but I'm surprised this hasn't come up in the list before (maybe it did and i missed the mail). > We could maybe fix this by redefining %x as "the current or most recent > xid", so that it'd still be valid for messages issued post-commit. > But I'm afraid that would add about as many bad behaviors as it would > remove. In your example above, that would result in a pretty misleading > xid attached to the "begin" statement, since at that point we have > started a new transaction but not assigned it any xid. This really gives little use for recovery_target_xid. :( Regards, -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general