| Age | Commit message (Collapse) | Author |
|
Also update typedefs.list and README.pgpool.
|
|
Major changes of PostgreSQL 18 parser include:
- Allow generated columns to be virtual
- Add OLD/NEW support to RETURNING in DML queries
- Addition of various constraints (e.g. WITHOUT OVERLAPS, ENFORCED / NOT ENFORCED)
- etc.
|
|
|
|
Major changes of PostgreSQL 17 parser include:
- Allow MERGE to use NOT MATCHED BY SOURCE and RETURNING clause:
MERGE INTO ... WHEN NOT MATCHED BY SOURCE ...
MERGE INTO ... RETURNING ...
- Add new COPY option ON_ERROR ignore and LOG_VERBOSITY:
COPY ... WITH (ON_ERROR ignore);
COPY ... WITH (LOG_VERBOSITY verbose);
- Allow to use '*' to specify the COPY FROM options FORCE_NOT_NULL and FORCE_NULL for all columns.
COPY ... WITH (FORCE_NOT_NULL *);
COPY ... WITH (FORCE_NULL *);
- Add EXPLAIN option SERIALIZE and MEMORY
EXPLAIN (MEMORY) ...
EXPLAIN (ANALYZE, SERIALIZE ...) ...
- Allow ALTER TABLE to use SET STATISTICS DEFAULT to set a column to the default statistics target
ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DEFAULT;
- Allow ALTER TABLE to change a column's generation expression
ALTER TABLE ... ALTER COLUMN ... SET EXPRESSION;
- Add DEFAULT setting for ALTER TABLE .. SET ACCESS METHOD
ALTER TABLE ... SET STATISTICS DEFAULT;
- Allow event triggers to use login event:
CREATE EVENT TRIGGER ... ON login ...
- Add event trigger support for REINDEX.
|
|
https://github.com/pgpool/pgpool2/issues/52
|
|
Major changes of PostgreSQL 16 parser include:
- Add new option DEFAULT to COPY FROM
COPY ... FROM stdin WITH (default 'xx');
- Allow the STORAGE type to be specified by CREATE TABLE
CREATE TABLE t1 (
c1 VARCHAR(10) STORAGE PLAIN,
c2 TEXT STORAGE EXTENDED
);
- Add EXPLAIN option GENERIC_PLAN to display the generic plan for a parameterized query
EXPLAIN (GENERIC_PLAN) SELECT ...;
- Allow subqueries in the FROM clause to omit aliases
SELECT COUNT(*) FROM (SELECT ... FROM ...);
- Add SQL/JSON constructors
- Add VACUUM options
SKIP_DATABASE_STATS, ONLY_DATABASE_STATS to skip or update all frozen statistics
PROCESS_MAIN to only process TOAST tables
VACUUM (SKIP_DATABASE_STATS);
VACUUM (PROCESS_MAIN FALSE) t1 ;
|
|
In native replication mode, Pgpool-II need to rewrite Date/Time functions to timestamp in WRITE queries.
CTE SEARCH and CYCLE rewrites were missing.
|
|
In native replication/snapshot isolation mode, any write query
including timestamp/date/time data are rewritten so that all
PostgreSQL servers accept same timestamp etc. value. From 4.4 outfuncs
module which is used to generate rewritten query was broken for
boolean data. In a parse tree constant data is represented as
"A_Const". 4.4 updated the module by using PostgreSQL 15's outfuncs
module. Starting from PostgreSQL 15 A_Const handles more data type
including boolean. Unfortunately the pgpool's outfuncs module did not
adopt the change. As a result boolean constant was ignored and turned
into empty string in the rewritten query string, which caused syntax
errors.
This commit fixes the issue. Also modify _outA_Const() so that it uses
_out* functions to handle other data types to save a few lines of
code.
Per report from Michiel van Leening.
Discussion: at: https://www.pgpool.net/pipermail/pgpool-general/2022-December/008581.html
Back-patch to: 4.4.
|
|
Previously it mistakenly judge by the value of the pointer itself is
NULL, which is not allowed by our coding standard.
|
|
Major changes of PostgreSQL 15 parser include:
- Add new SQL MERGE command
MERGE INTO ... USING ...
- Add new option HEADER MATCH to COPY FROM
COPY ... FROM stdin WITH (HEADER MATCH);
- Allow foreign key ON DELETE SET actions
CREATE TABLE t1 (
...
FOREIGN KEY (c1, c2) REFERENCES t2 ON DELETE SET NULL (c2)
);
- Allow SET ACCESS METHOD in ALTER TABLE
ALTER TABLE ... SET ACCESS METHOD ...;
|
|
Currently there are two string manipulation modules: pool_string and
StringInfo. StringInfo is more feature rich and PostgreSQL compatible
because it was imported from PostgreSQL. So replace all usages of
pool_string by StringInfo. This also solves a problem reported by
Peng: i.e. struct name "String" collision: pool_string uses "String"
and PostgreSQL 15's parser also uses "String".
|
|
Major changes of PostgreSQL 14 parser include:
- Allow an alias to be used to a JOIN ... USING
SELECT ... FROM t1 JOIN t2 USING (a, b, c) AS x
- Allow DISTINCT to be added to GROUP BY
SELECT c1, max(c2) FROM t1 GROUP BY DISTINCT c1;
- New SEARCH and CYCLE clauses for common table expressions
|
|
Fixes for source code files including *.[chl] and regression scripts,
not only for comments but variable names and function names.
Documents (sgml and some text files) are also fixed.
See:
https://github.com/pgpool/pgpool2/pull/38
for more details.
Patch contributed by Josh Soref. Fixes for Japanese sgml files by me.
|
|
replication mode.
per bug 654.
|
|
Major changes of PostgreSQL 13 parser include:
- Remove an object's dependency on an extension
ALTER TRIGGER ... NO DEPENDS ON EXTENSION ...
ALTER FUNCTION ... NO DEPENDS ON EXTENSION ...
- Allow FETCH FIRST to use WITH TIES
FETCH FIRST ... WITH TIES
- Add ALTER TABLE clause DROP EXPRESSION
ALTER TABLE ... DROP EXPRESSION
- Allow setting statistics target for extended statistics
ALTER STATISTICS ... SET STATISTICS
- Allow ALTER VIEW to rename view columns
ALTER VIEW ... RENAME COLUMN ... TO ...
- Add CREATE DATABASE clause LOCALE option
CREATE DATABASE ... LOCALE
- Add DROP DATABASE clause WITH FORCE option
DROP DATABASE ... WITH (force)
- Add VACUUM clause PARALLEL option
VACUUM (PARALLEL 1) ...
|
|
|
|
|
|
|
|
Pointed out by Coverity.
|
|
The attached patch imports PostgreSQL12 beta2 parser to Pgpool-II 4.1.
Major chanegs of PostgreSQL 12 parser include:
- Add new VACUUM options:
-- SKIP_LOCKED
-- INDEX_CLEANUP
-- TRUNCATE
- Add COMMIT AND CHAIN and ROLLBACK AND CHAIN commands
- Add a WHERE clause to COPY FROM
- Allow to use CREATE OR REPLACE AGGREGATE command
- Allow to use mcv (most-common-value) in CREATE STATISTICS
- ADD REINDEX option CONCURRENTLY
- Add EXPLAIN option SETTINGS
- etc.
|
|
"EXCLUDE" in frame clauses.
This occurs only in native replication mode.
Thanks to Yugo Nagata for the bug reporting.
|
|
standard_conforming_strings
in native replication mode.
per bug467.
|
|
|
|
and "IN (SELECT ...)" in WHERE clause.
In native replication, queries including now() etc. are rewritten to a timestamp constant value.
However, Pgpool-II didn't support queries including now() etc. and "IN (SELECT ...)" in WHERE clause.
Per bug433.
|
|
|
|
Fix and unify indentation by using PostgreSQL 11's pgindent command.
|
|
|
|
This reverts commit d9b35160a66b1e9c4c32cd0363e2099c93c968b6.
|
|
|
|
|
|
|
|
When a function is used in FROM, the parser makes a RangeFunction
node whose functions member is a list whose last element is NIL.
This caused segfault in foreach loop in _outListWith().
PRPARE statements in streaming-reaplication mode and INSERT/UPDATE
with SELECT in native-replication mode were affected. For example:
- prepare p as select * from generate_series(1,1);
- insert into tbl select now(), * from generate_series(1,1);
|
|
In addition, timestamp-rewrite supports
- INSERT ... ON CONFLICT
- INSERT/UPDATE/DELETE with WITH clause
- GROUPING SETS, CUBE, ROLLUP, TABLESAMPLE in SELECT statement
in WITH clause
- INSERT/UPDATE/DELETE in WITH clause
- RETURNING clause
- UPDATE xxx SET (y,z) = (SELECT u,w from zzz)
Othres:
- Table alias in INSTER query
- WITH clause including INSERT/UPDATE
- SELECT ... TABLESAMPLE is not allowed to be query-cached
|
|
This commit removes all occurrences of pool_error() and replace those with ereport().
The checking also integrates the exception manager to watchdog code, which was the last
remaining TODO of importing the exception and memory managers to pgpool-II
|
|
Fix coverity issue:1111377 Unchecked return value
Fix coverity issue:1111381 Logically dead code
Fix coverity issue:1222992 Unchecked return value
Fix coverity issue:1222993 Unchecked return value
Fix coverity issue:1222996 Printf arg type mismatch
Fix coverity issue:1222997 Printf arg type mismatch
For the coverity issue 1222996 and 1222997 the return type of NameListToString function
is changed from string* to char*, and defination of the which is the return type of the function in PostgreSQL source.
and appropriate changes have been made in the code to incorporate this function return type change.
For coverity issue:1222992 1222993 the return type of do_query() function is changed to void from POOL_STATUS.
The function’s return value became insignificant after the introduction of elog API,
After the API do_query() only returns in a successful scenarios and throws an ereport
in case of any error within the function.
|
|
Fix coverity issue:1111382 Logically dead code
Fix coverity issue:1111402 Explicit null dereferenced
Fix coverity issue:1111405 Explicit null dereferenced
Fix coverity issue:1111407 Dereference after null check
Fix coverity issue:1111408 Explicit null dereferenced
Fix coverity issue:1111409 Dereference after null check
Fix coverity issue:1111383 Logically dead code
Fix coverity issue:1111492 Structurally dead code
Fix coverity issue:1111417 Nesting level does not match indentation
Fix coverity issue:1111379 Logically dead code
Fix coverity issue:1111406 Explicit null dereferenced
Fix coverity issue:1111396 Explicit null dereferenced
Fix coverity issue:1111397 Explicit null dereferenced
|
|
Fix coverity issue:1111388 Explicit null dereferenced
Fix coverity issue:1111411 Missing break in switch
Fix coverity issue:1111412 Missing break in switch
Fix coverity issue:1111450 Resource leak
Fix coverity issue:1111451 Resource leak
Fix coverity issue:1111472 Dereference before null check
Fix coverity issue:1111473 Dereference before null check
Fix coverity issue:1111474 Dereference before null check
Fix coverity issue:1111475 Wrong sizeof argument
Fix coverity issue:1111495 Use after free
Fix coverity issue:1111496 Use after free
Fix coverity issue:1222989 Bad bit shift operation
Fix coverity issue:1222990 Bad bit shift operation
Fix coverity issue:1222994 Explicit null dereferenced
Fix coverity issue:1222995 Printf format string issue
The commit also contains a tiny fix for compiler warning of missing prototype
for ExceptionalCondition() function.
|
|
|
|
|
|
and memory manager in pgpool.
This checkin includes the following items.
1-- Exception manager API of Postgres is added to pgpool, The API consists of elog.c and elog.h files.
Since this API is very extensive and is designed for PostgreSQL, So to fit it properly into pgpool I have
modified it a little bit, and most of the modifications are related to removal of code which is not required for pgpool.
2-- Added on_proc_exit callback mechanism of Postgres. To facilitate the cleanup at exit time.
3-- Added PostgreSQL's memory manager (palloc API). This includes the client side palloc functions placed in 'src/tools' directory (fe_memutils)
4-- Removed the existing memory manager which was very minimalistic and was not integrated in all parts of the code.
5-- The checkin also refectors some portions of code to make the code more readable at first glance. That includes
-- Dividing the main.c file into two files main.c and pgpool_main.c, Now the main.c file only contains the code
related to early initialisations of pgpool and parsing of the command line options.
The actual logic of the pgpool main process is moved to new pgpool_main.c file.
-- Breaking up some large functions in child.c into smaller functions.
-- Rewrite the pgpool's main loop logic to make the code more readable.
Remaining TODOs on this front.
1-- The current checkin only integrates the memory and exception manager in main process and connection creation
segment of pgpool child process. And the next TODO is to integrate it in pcp and worker child process.
2-- Integration of newly added API into query processor logic in child processes.
3-- elog.c and elog.h files needs some cleanups and changes (To remove unwanted functions and data members of ErrorData structure).
|
|
Adjust for recent changes in the repository by Tatsuo Ishii.
|